feat(ci): add --skip-tasks flag + opt-in [skip-tasks] commit token to bit ci pr#10436
feat(ci): add --skip-tasks flag + opt-in [skip-tasks] commit token to bit ci pr#10436davidfirst wants to merge 7 commits into
Conversation
Exposes the existing builder skipTasks mechanism on `bit ci pr`, letting a PR build skip named build/publish tasks. On the throwaway PR lane the schema and preview artifacts and the npm publish aren't needed (they're regenerated on the final export to main), so skipping them speeds up the job. Wire bit_pr CI to skip ExtractSchema, GeneratePreview, GenerateEnvTemplate and PublishComponents (~8-10m). Flag is general/user-facing and reaches both the build and snap/tag pipelines.
PR Summary by Qodofeat(ci): add --skip-tasks to Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo
1. Skipping tasks uses chalk
|
The schema/preview artifacts and npm publish are generally useful (browsable preview, API schema, installable packages); we're deliberately skipping them on the PR validation lane to optimize for speed, not because they're never needed. They're still produced on the final export to main.
|
Code review by qodo was updated up to the latest commit 9e9b50b |
|
Code review by qodo was updated up to the latest commit 4511d7d |
|
Code review by qodo was updated up to the latest commit 08ae96c |
|
Code review by qodo was updated up to the latest commit abff5ab |
|
Code review by qodo was updated up to the latest commit f86dad6 |
Invert the default: bit ci pr now runs the full pipeline by default. A developer opts into skipping specific tasks for a single PR by adding a [skip-tasks: <names>] token to the commit message (e.g. [skip-tasks: GeneratePreview,ExtractSchema]) — no CircleCI YAML change needed. The token is parsed in snapPrCommit, merges with any --skip-tasks flag, and is stripped from the snap message. Removes the hardcoded --skip-tasks list from the bit_pr job. Adds a pure parser (extractSkipTasksFromMessage) with unit specs, plus an e2e for the token path.
|
Code review by qodo was updated up to the latest commit f68d99c |
Adds a way to skip specific build/publish tasks on
bit ci pr, reusing the builder's existingskipTasksmechanism (which reaches both the build pipeline and the snap/tag pipeline, so it covers schema/preview artifacts and publishing).Skipping is opt-in. PR builds run the full pipeline by default — the schema/preview artifacts and publish are generally useful (browsable preview, API schema, installable lane packages). A developer who wants to trade specific tasks for speed on a single PR does so without touching the CircleCI YAML, two ways:
[skip-tasks: GeneratePreview,ExtractSchema]to the commit message.bit ci prparses it, merges it with any--skip-tasksflag, and strips the token from the snap message.--skip-tasks <names>flag: general/user-facing, for explicit invocations.Stacks on the
--skip-cleanupwork (#10431).Tests:
extractSkipTasksFromMessage) — list parsing, case-insensitivity, token stripping, edge cases.PackComponents) confirms the pipeline still ran.