github-actions(updatecli): use oblt-actions, pin version and avoid diverging PRs#43743
github-actions(updatecli): use oblt-actions, pin version and avoid diverging PRs#43743
Conversation
|
This pull request doesn't have a |
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
|
||
| - name: Run Updatecli in Apply mode | ||
| run: updatecli --experimental apply --config .github/workflows/updatecli.d/bump-elastic-stack-snapshot.yml --values .github/workflows/updatecli.d/values.d/scm.yml | ||
| - uses: elastic/oblt-actions/updatecli/run-and-notify@v1 |
There was a problem hiding this comment.
We maintain elastic/oblt-actions so we can avoid the burden of bumping versions
| BRANCH: ${{ matrix.branch }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - if: ${{ failure() }} |
There was a problem hiding this comment.
elastic/oblt-actions/updatecli/run-and-notify does the notification if any failures, DRY
| username: '{{ requiredEnv "GITHUB_ACTOR" }}' | ||
| token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
| branch: main | ||
| branch: '{{ .scm.branch }}' |
There was a problem hiding this comment.
default to main, but let's avoid being hardcoded here, so we can use the config file locally
| @@ -0,0 +1 @@ | |||
| updatecli v0.97.0 No newline at end of file | |||
There was a problem hiding this comment.
I'll create a follow-up to bump this version as we do in some other places
| token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
| branch: "7.17" | ||
| commitusingapi: true | ||
| force: false |
There was a problem hiding this comment.
Is this what would prevent the force-push that closes the PR?
There was a problem hiding this comment.
Correct, that's the alternative, already added to the description, but see this link:
This solves the problem partially, as it will not create any new updates with a new version either updating the existing open PR or creating a new of if an existing open PR exists.
I need to see if using an old version of updatecli, as mentioned at updatecli/updatecli#2211 (comment), reverts to the original approach (see https://github.com/elastic/beats/pull/41241/commits).
|
Looks good, I'll wait the conflicts to be fixed then I'll approve the PR |
|
@AndersonQ , this is now ready 🙏 |
Proposed commit message
.tool-versionsforce: false, see See Running parallel pipelines with different parameters some are skipped updatecli/updatecli#2211 (comment)This should avoid issues when the changes diverge and then PRs are closed:
Therefore, it will not update those PRs but keep the ones that are open.
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Disruptive User Impact
Author's Checklist
How to test this PR locally
Updatecli
I deleted the branch for #43744 then I ran:
GITHUB_TOKEN=$(gh auth token) \ GITHUB_ACTOR=v1v \ BRANCH=8.x \ updatecli --experimental apply \ --config .github/workflows/updatecli.d/bump-elastic-stack-snapshot.yml \ --values .github/workflows/updatecli.d/values.d/scm.ymlCI
See
Related issues
Use cases
Screenshots
Logs