-
Notifications
You must be signed in to change notification settings - Fork 700
[ci] dynamic ci #4135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sharder996
wants to merge
13
commits into
main
Choose a base branch
from
dynamic-ci
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[ci] dynamic ci #4135
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4135 +/- ##
=======================================
Coverage 89.31% 89.31%
=======================================
Files 259 259
Lines 15708 15708
=======================================
Hits 14029 14029
Misses 1679 1679 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Addresses #4042. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR revamps how our GitHub workflows are invoked so that only the necessary workflows are run and we avoid situations where a change to the
README.md
gets blocked on an Apple runner failing to compile Multipass due to a spurious seg fault.This setup works by having a single orchestration workflow which filters the changed files with dorny/paths-filter, defines relevant outputs, and then spawns the relevant workflows. A "Finalize" job in the orchestration workflow then checks the return statuses of the spawned workflows and sets it own return status accordingly.
Regarding branch protection rules, the idea is that we would protect on
Dynamic-CI \ Filter changed files
andDynamic-CI \ Finalize
to make sure that the PR is properly analyzed and and errors from spawned workflows are propagated up, effectively gating the PR from being merged.Below are some example draft PRs demonstrating various scenarios and how the new CI setup reacts to them.
Merge queues aren't officially supported in the
dorny/paths-filter
action, but there are several user submitted examples of people using the action in this manner. Because of repository permissions this has yet to have been tested.Another GitHub action; tj-actions/changed-files was considered for added functionality of being able to spawn workflows. However, I chose not to go with it due to it's increased complexity and granularity of control that isn't strictly needed in our setup.
One other thing,
docs/readthedocs.com:canonical-multipass
will continue to be built for every PR regardless of changed files. The trigger for this workflow is managed by ReadtheDocs which does not offer the granularity or control of being able to selectively control when the workflow is run.Future development
One slight improvement that can be made to further optimization CI only running necessary builds is to bisect
windows-macos.yml
and further filter on files that only affect Windows or macOS builds. However, care would need to be taken in order to ensure that there is no unnoticed cross-platform dependencies in these filtered files.MULTI-1932
Closes #4136
Closes #4143
Closes #4137
Closes #4142
Closes #4144