-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fix verifications #1197
base: release-process-enhancement
Are you sure you want to change the base?
Fix verifications #1197
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release-process-enhancement #1197 +/- ##
==============================================================
Coverage ? 83.58%
==============================================================
Files ? 82
Lines ? 7117
Branches ? 0
==============================================================
Hits ? 5949
Misses ? 939
Partials ? 229
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
6ad8c1e
to
d5f630f
Compare
bfb1432
to
e0c52d5
Compare
* With some modifications. verify-manfiests calls the targets verify bundle, controller-gen and helm Signed-off-by: dd di cesare <[email protected]>
Signed-off-by: dd di cesare <[email protected]>
Signed-off-by: dd di cesare <[email protected]>
branches * Instead of calling it from verification workflows Signed-off-by: dd di cesare <[email protected]>
9ad97f8
to
4c06e91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A part from the question I am asking in the other comments there is one question that I have that does not fit neatly to any line change. Why is there two more workflows being added? They don't seem to give any value that the test.yaml
can not give. They are increasing the stuff that would need to be maintained. So are they really needed?
merge_group: | ||
types: [ checks_requested ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the removal of this?
.PHONY: verify-manifests ## Verify controller-gen, bundle and helm charts manifests. | ||
verify-manifests: ## Verify manifests update. | ||
make verify-controller-manifests | ||
make verify-bundle | ||
make verify-helm-charts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this being done this way?
.PHONY: verify-manifests ## Verify controller-gen, bundle and helm charts manifests. | |
verify-manifests: ## Verify manifests update. | |
make verify-controller-manifests | |
make verify-bundle | |
make verify-helm-charts | |
.PHONY: verify-manifests ## Verify controller-gen, bundle and helm charts manifests. | |
verify-manifests: ## Verify manifests update. | |
make manifests | |
make bundle | |
make helm-charts | |
git diff --exit-code . |
But I would also look at my other comments
.PHONY: verify-controller-manifests | ||
verify-controller-manifests: manifests ## Verify controller-gen manifests update. | ||
git diff --exit-code ./config | ||
[ -z "$$(git ls-files --other --exclude-standard --directory --no-empty-directory ./config)" ] | ||
|
||
.PHONY: verify-bundle | ||
verify-bundle: bundle ## Verify bundle update. | ||
git diff --exit-code ./bundle | ||
[ -z "$$(git ls-files --other --exclude-standard --directory --no-empty-directory ./bundle)" ] | ||
|
||
.PHONY: verify-helm-charts | ||
verify-helm-charts: helm-build ## Verify helm charts update. | ||
git diff --exit-code ./charts | ||
[ -z "$$(git ls-files --other --exclude-standard --directory --no-empty-directory ./charts)" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a number of things here that we need to discussed.
The two main things are:
The use of the bundle make target was only left in the codebase to not break the nightly pipelines. And the next action should be getting the nightly pipelines to support the release.yaml file. Which could mean the removal of these base make targets completely.
The second thing that is interesting is around the developer experiences within the project. On a number of occasions now I have being asked why is there so many make targets within the project. They say it is hard to know what should be done, what order to do things in, where to even start. These comments came from people within the project, but also external to the project. They are the more interesting ones.
So I am going to ask. Is there a different way that this can be done that reduces the number of make targets, and stream lines the experiences of others.
verify-release: | ||
name: Validate release data | ||
if: needs.pre-job.outputs.should_skip != 'true' | ||
needs: pre-job | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.22.x | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.22.x | ||
id: go | ||
- name: Checkout code at git ref | ||
uses: actions/checkout@v4 | ||
- name: Check bundles and manifests | ||
run: make verify-prepare-release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this from all PRs?
- name: Checkout code at git ref | ||
uses: actions/checkout@v4 | ||
- name: Check bundles and manifests | ||
run: make verify-manifests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use this make target over the verify-prepare-release? If the verification calls to github checking the existing of versions seems to expensive I would argue that is not a good enough reason. There are will be external call to quay by opm render when the bundle make target is called.
There is also the feature of the scripts used in the prepare-release make target to grep and only run a given script. If the cost of a check was that high problematic (thinking getting rate limited), it would make more sense to add the feature to filter out scripts over trying to maintain two versions. Then how I would see that being used would be something like make verify-prepare-release --exclude script-a script-b
. Stating the list of scripts that would be exclude also makes it easier for someone in 6 months, a year to understand what is and is not happening.
This PR re introduces the make targets that were asserting the validity of manifests such as bundle, controller-gen and helm-charts in order to be used in the main verify workflow. Asserting the healthiness of manifests on every PR to main or triggered manually with workflow_dispatch. A second workflow that will be triggered for push or PR to a release branch, will be running the battery of scripts for asserting the validity of a release. There's also a refactor the the original test workflow, that will be running the tests and code validations for every PR and push to release branches and main. The reason behind is that for releases we run the
prepare-release
target, which executes the battery of scripts for preparing the manifests for a release, that involves GH API calls to its dependencies and other assertions that are not needed for a non release PR.So, it looks like this: