This repository was archived by the owner on Aug 30, 2022. It is now read-only.
Add logic to generate Renovate postUpgradeTasks#62
Merged
Conversation
simu
added a commit
to projectsyn/commodore
that referenced
this pull request
Mar 18, 2022
This commit adjusts the initial modulesync config generated by the component template to match the changes introduced by projectsyn/modulesync-control#62 which facilitate keeping the Renovate `postUpgradeTasks` updated when new matrix tests are added.
Merged
4 tasks
7546223 to
c712142
Compare
simu
added a commit
to projectsyn/commodore
that referenced
this pull request
Mar 18, 2022
This commit adjusts the initial modulesync config generated by the component template to match the changes introduced by projectsyn/modulesync-control#62 which facilitate keeping the Renovate `postUpgradeTasks` updated when new matrix tests are added.
c712142 to
7da8104
Compare
simu
added a commit
to projectsyn/commodore
that referenced
this pull request
Mar 18, 2022
This commit adjusts the initial modulesync config generated by the component template to match the changes introduced by projectsyn/modulesync-control#62 which facilitate keeping the Renovate `postUpgradeTasks` updated when new matrix tests are added.
bastjan
approved these changes
Mar 18, 2022
bastjan
reviewed
Mar 18, 2022
Member
bastjan
left a comment
There was a problem hiding this comment.
Maybe we could track the test targets in the Makefile too?
Something like make gen-golden-all would speed up the workflow considerably for some components. Bonus: Less complicated json rendering for renovate tasks.
Member
Author
I actually already implemented this for a component at some point, but forgot about it until you mentioned it. I'll redo the PR to implement the |
Until now, the test matrix has been defined in a local variable for the `.github/workflows/test.yaml` template. In preparation for generating Renovate `postUpgradeTasks` and a list of test instances in a make variable, we need to be able to access the matrix test configuration in other templates. This commit moves the test matrix configuration to global variable `testMatrix`. For now, the GitHub actions template will continue to read the test matrix from the file-level variable `matrix`, but will fall back to the global variable `testMatrix` if the file-level variable is missing. All already onboarded components should migrate their test matrix (if any) to global parameter `testMatrix`.
808fddf to
77a146b
Compare
simu
added a commit
to projectsyn/commodore
that referenced
this pull request
Mar 18, 2022
This commit adjusts the initial modulesync config generated by the component template to match the changes introduced by projectsyn/modulesync-control#62 which facilitate keeping the Renovate `postUpgradeTasks` updated when new matrix tests are added.
These targets use a static list of test instances in make variable `test_instances`. The contents of this variable are generated from the modulesync parameter `testMatrix.entries`. We use a generic recursive make target based on the `test_instances` make variable to implement the new targets. This allows us to reuse the existing `golden-diff` and `gen-golden` targets. The new targets are only added for components which have golden and matrix tests configured and which have migrated their matrix test configuration to modulesync parameter `testMatrix`.
We generate section `postUpgradeTasks` in `renovate.json` for components which have golden tests enabled. To determine the command to execute, we check if the component has matrix tests configured (based on parameter `testMatrix`). We use the `make gen-golden-all` as the command for components with matrix tests and `make gen-golden` for other components.
77a146b to
40f563c
Compare
bastjan
approved these changes
Mar 21, 2022
2 tasks
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Until now, the test matrix has been defined in a local variable for the
.github/workflows/test.yamltemplate. To allow us to generate RenovatepostUpgradeTasksand a list of test instances in a make variable, we need to be able to access the matrix test configuration in other templates.This PR moves the test matrix configuration to global variable
testMatrix. For now, the GitHub actions template will continue to read the test matrix from the file-level variablematrix, but will fall back to the global variabletestMatrixif the file-level variable is missing.Additionally, the PR adds new make targets
golden-diff-allandgen-golden-all. These targets use a static list of test instances in make variabletest_instances. The contents of this variable are generated from the modulesync parametertestMatrix.entries.We use a generic recursive make target based on the
test_instancesmake variable to implement the new targets. This allows us to reuse the existinggolden-diffandgen-goldentargets.The new targets are only added for components which have matrix tests configured and which have migrated their matrix test configuration to modulesync parameter
testMatrix.Finally, this PR adds logic to generate section
postUpgradeTasksinrenovate.jsonfor componentswhich have golden tests enabled. To determine the command to execute, we check if the component has matrix tests configured (based on parameter
testMatrix). We use themake gen-golden-allas the command for components with matrix tests andmake gen-goldenfor other components.Commodore component-template PR: projectsyn/commodore#424
Checklist
bug,enhancement,documentation,change,breaking,dependencyas they show up in the changelog