feat(ci): skip persist.format args if defaults already configured#1042
feat(ci): skip persist.format args if defaults already configured#1042matejchalk merged 2 commits intomainfrom
Conversation
|
👋 If I get this right, for each project in the monorepo code pushup ci would run, in sequence, a config command before. On a monorepo of a 100 project, given a median time of 2s, that's 200s before collect starts. Could we instead provide an option to ci entrypoint like |
Yes, but other than before replacing after, this PR doesn't change any of that. We're running the Since we were already reading each project's persist config, I decided it was simplest to reuse that data to check the configured formats. For bulk collect for current state in monorepo mode, that required me to swap the order, for other collect executions (including bulk collect for previous state)
Correct me if I'm wrong, but I'm assuming it's just the extra processing time (which isn't new) that's the problem? Or does it make a difference if it's before or after collect?
As mentioned above, I think such a change is beyond the scope of this PR, because the Your suggestion of having the user set a "all my projects are configured in this way, trust me and don't waste time checking it, please" option could apply to persist configs in general, for example. Another solution I can think of is to have some alternative way for Either way, the We could also revisit running |
Final piece from larger effort to avoid CLI arguments which reduce chances of Nx cache hits in default setup. See also:
The CLI arguments
--persist.format=json --persist.format=mdwere being set in case user-defined config omitted report formats which@code-pushup/cirelies on. After this refactor, the configured formats are first checked inprint-configoutput, and then only set if some format is missing - in monorepo mode with bulk collect, every project must have default formats configured in order to skip the CLI arguments.TLDR:
--persist.formatargs are now skipped unless user has some unusual config.