[MDBF-523] protect branches against cross-version pushes Created: 2023-01-16 Updated: 2023-01-30 |
|
| Status: | Open |
| Project: | MariaDB Foundation Development |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Critical |
| Reporter: | Sergei Golubchik | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
last weekend a 10.5 merge was mistakenly pushed into 10.4. To fix that I had to force-push into the main 10.4 branch. This is a very expensive fix and it would be best if branch protection would prevent such pushes in the future. To this it buildbot needs to ensure that a 10.5 commit, won't be allowed into 10.4. To do it buildbot can provide a set of dummy builders that don't build anything but only look at the VERSION file and immediately return whether it matched the builder name. That is, builder names are, like, ok-10.3, ok-10.4, ok-10.5, etc. Then any bb-10.5-merge push will pass ok-10.5, but will fail ok-10.4, and the latter builder will be required for any push into 10.4 |
| Comments |
| Comment by Daniel Black [ 2023-01-17 ] | ||||||||||||||
|
Could also use a check app. A GH Action might be a quick way. .github/workflows/versioncheck.yml
So only dbart can bump VERSION in a pull request. As a required workflow in branch protection. | ||||||||||||||
| Comment by Daniel Black [ 2023-01-18 ] | ||||||||||||||
|
The case that caused the failure was:
| ||||||||||||||
| Comment by Daniel Black [ 2023-01-20 ] | ||||||||||||||
|
serg, as buildbot the github status checks only run on committed code, the only way to prevent changes like the mistake that happened is to "Require a pull request before merging" in the branch protection. With this failures will occur like https://github.com/grooverdan/mariadb-server/pull/5 For the convenience of workflows github has an automerge which enabled those with write access to the repository. After a PR is created those with access have an option to mark the PR as automerge where passing the protected branches (and the version check) will auto merge the PR. | ||||||||||||||
| Comment by Daniel Black [ 2023-01-30 ] | ||||||||||||||
|
Protection of submodule changes (e.g. dc646c23897802bb634a1c95afde6f854a49ebb1) could be done also. Who's on the list for this? (if desired). |