-
Notifications
You must be signed in to change notification settings - Fork 3.5k
GH action for updating logstash version #18035
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
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
|
This pull request does not have a backport label. Could you fix it @donoghuc? 🙏
|
|
Use of updatecli for dep bumps was based on this comment #17945 (comment) |
|
To test locally: install updatecli generate config file: run |
410469e to
2514eec
Compare
0c6def8 to
1292374
Compare
|
This was tested with #18050 and produced a PR with a version bump! Ready for review. |
956fd79 to
38c0131
Compare
.ci/updatecli/values.d/scm.yml
Outdated
| # begin updatecli-compose policy values | ||
| user: 'github-actions[bot]' | ||
| email: '41898282+github-actions[bot]@users.noreply.github.com' | ||
| # end updatecli-compose policy values No newline at end of file |
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.
You don't need those values, that's when using a shared policy with updatecli, in this case, you only added the .ci/updatecli/bump-logstash-version.yml manifest.
| # begin updatecli-compose policy values | |
| user: 'github-actions[bot]' | |
| email: '41898282+github-actions[bot]@users.noreply.github.com' | |
| # end updatecli-compose policy values |
| @@ -1,19 +1,34 @@ | |||
| name: Stub GH action for devoping new workflows [STUB] | |||
|
|
|||
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.
duplicates .github/workflows/bump-version.yml?
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.
same comment as #18035 (comment)
| pull_request: | ||
| types: [opened, synchronize, reopened] |
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.
IIUC, this event will not work with forked PRs, since the GH token will never have any elevated access but read-only.
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.
Yeah, the idea here was that this "stub" action is already checked in with a pull_request trigger. I was hoping that by doing that and targeting that workflow file from a branch that pushed to the elastic master copy of logstash would be enough to actually give a valid token for raising a PR. It may not actually be necessary though. Either way I will be removing the "stub" before this is actually ready for review.
This commit adds a GH action for bumping the logstash version. It uses the updatescli based on a suggestion for how the beats team is doing file updates. There is a workflow_dispatch trigger that accepts a new logstash version. Both the versions.yml and lock file are updated. If it is a branch where we are not vendoring a lockfile that file is skipped without failing the workflow step.
use pattern suggested in code review
| @@ -0,0 +1,81 @@ | |||
| --- | |||
| name: Update logstash version files | |||
| pipelineid: "logstash/version-updates" | |||
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.
If you run this manifest targeting multiple branches, then the pipelineid should be unique. I'd recommend using LOGSTASH_BRANCH.
| pipelineid: "logstash/version-updates" | |
| pipelineid: "logstash/version-updates-{{ requiredEnv "LOGSTASH_BRANCH" }}" |
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.
Updated.
.ci/updatecli/values.d/scm.yml
Outdated
| enabled: true | ||
| owner: elastic | ||
| repository: logstash | ||
| commitusingapi: true |
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.
nit: this is hardcoded in the updatecli manifest
| commitusingapi: true |
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.
updated
.ci/updatecli/values.d/scm.yml
Outdated
| @@ -0,0 +1,5 @@ | |||
| scm: | |||
| enabled: true | |||
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.
nit: unused
| enabled: true |
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.
updated
| workflow_dispatch: | ||
| inputs: | ||
| logstash_version: | ||
| description: 'Logstash version' |
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.
Do you think adding an example might be useful here?
| description: 'Logstash version' | |
| description: 'Logstash version (i.e: 1.2.3)' |
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.
yep, added one
| required: true | ||
| type: string | ||
| logstash_branch: | ||
| description: 'Logstash branch' |
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.
| description: 'Logstash branch' | |
| description: 'Logstash branch (i.e: 8.19)' |
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.
yep, added one
|
💚 Build Succeeded
History
|
|
@v1v Could you take another pass at reviewing this? I updated based on your comments, and used the test action to do all the version bumps this cycle! |
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.
LGTM, thanks for this PR, it's wonderful!
|
@Mergifyio backport 8.18 8.19 9.0 9.1 |
✅ Backports have been created
|
* GH action for updating logstash version This commit adds a GH action for bumping the logstash version. It uses the updatescli based on a suggestion for how the beats team is doing file updates. There is a workflow_dispatch trigger that accepts a new logstash version. Both the versions.yml and lock file are updated. If it is a branch where we are not vendoring a lockfile that file is skipped without failing the workflow step. * use stub workflow to test * Separate step when modifying * dont track temp updatecli file and install action * restore stub * Refactor updatecli workflow use pattern suggested in code review * Use test stub to validate changes * fix inputs section * fix branch * dont fail if file is not present * try with no global conditionals * file condition * name conditional * split into separate pipeline files * remove unused scmid * no explicit pr action? * add back PR * try sources pattern * explicitly connect target with scmid * ensure lock file lookup executes from checkout * Cleanup * test * restore LOGSTASH_BRANCH * codereview feedback (cherry picked from commit ad20032)
* GH action for updating logstash version This commit adds a GH action for bumping the logstash version. It uses the updatescli based on a suggestion for how the beats team is doing file updates. There is a workflow_dispatch trigger that accepts a new logstash version. Both the versions.yml and lock file are updated. If it is a branch where we are not vendoring a lockfile that file is skipped without failing the workflow step. * use stub workflow to test * Separate step when modifying * dont track temp updatecli file and install action * restore stub * Refactor updatecli workflow use pattern suggested in code review * Use test stub to validate changes * fix inputs section * fix branch * dont fail if file is not present * try with no global conditionals * file condition * name conditional * split into separate pipeline files * remove unused scmid * no explicit pr action? * add back PR * try sources pattern * explicitly connect target with scmid * ensure lock file lookup executes from checkout * Cleanup * test * restore LOGSTASH_BRANCH * codereview feedback (cherry picked from commit ad20032)
* GH action for updating logstash version This commit adds a GH action for bumping the logstash version. It uses the updatescli based on a suggestion for how the beats team is doing file updates. There is a workflow_dispatch trigger that accepts a new logstash version. Both the versions.yml and lock file are updated. If it is a branch where we are not vendoring a lockfile that file is skipped without failing the workflow step. * use stub workflow to test * Separate step when modifying * dont track temp updatecli file and install action * restore stub * Refactor updatecli workflow use pattern suggested in code review * Use test stub to validate changes * fix inputs section * fix branch * dont fail if file is not present * try with no global conditionals * file condition * name conditional * split into separate pipeline files * remove unused scmid * no explicit pr action? * add back PR * try sources pattern * explicitly connect target with scmid * ensure lock file lookup executes from checkout * Cleanup * test * restore LOGSTASH_BRANCH * codereview feedback (cherry picked from commit ad20032)
* GH action for updating logstash version This commit adds a GH action for bumping the logstash version. It uses the updatescli based on a suggestion for how the beats team is doing file updates. There is a workflow_dispatch trigger that accepts a new logstash version. Both the versions.yml and lock file are updated. If it is a branch where we are not vendoring a lockfile that file is skipped without failing the workflow step. * use stub workflow to test * Separate step when modifying * dont track temp updatecli file and install action * restore stub * Refactor updatecli workflow use pattern suggested in code review * Use test stub to validate changes * fix inputs section * fix branch * dont fail if file is not present * try with no global conditionals * file condition * name conditional * split into separate pipeline files * remove unused scmid * no explicit pr action? * add back PR * try sources pattern * explicitly connect target with scmid * ensure lock file lookup executes from checkout * Cleanup * test * restore LOGSTASH_BRANCH * codereview feedback (cherry picked from commit ad20032)
* GH action for updating logstash version This commit adds a GH action for bumping the logstash version. It uses the updatescli based on a suggestion for how the beats team is doing file updates. There is a workflow_dispatch trigger that accepts a new logstash version. Both the versions.yml and lock file are updated. If it is a branch where we are not vendoring a lockfile that file is skipped without failing the workflow step. * use stub workflow to test * Separate step when modifying * dont track temp updatecli file and install action * restore stub * Refactor updatecli workflow use pattern suggested in code review * Use test stub to validate changes * fix inputs section * fix branch * dont fail if file is not present * try with no global conditionals * file condition * name conditional * split into separate pipeline files * remove unused scmid * no explicit pr action? * add back PR * try sources pattern * explicitly connect target with scmid * ensure lock file lookup executes from checkout * Cleanup * test * restore LOGSTASH_BRANCH * codereview feedback (cherry picked from commit ad20032) Co-authored-by: Cas Donoghue <[email protected]>
* GH action for updating logstash version This commit adds a GH action for bumping the logstash version. It uses the updatescli based on a suggestion for how the beats team is doing file updates. There is a workflow_dispatch trigger that accepts a new logstash version. Both the versions.yml and lock file are updated. If it is a branch where we are not vendoring a lockfile that file is skipped without failing the workflow step. * use stub workflow to test * Separate step when modifying * dont track temp updatecli file and install action * restore stub * Refactor updatecli workflow use pattern suggested in code review * Use test stub to validate changes * fix inputs section * fix branch * dont fail if file is not present * try with no global conditionals * file condition * name conditional * split into separate pipeline files * remove unused scmid * no explicit pr action? * add back PR * try sources pattern * explicitly connect target with scmid * ensure lock file lookup executes from checkout * Cleanup * test * restore LOGSTASH_BRANCH * codereview feedback (cherry picked from commit ad20032) Co-authored-by: Cas Donoghue <[email protected]>
* GH action for updating logstash version This commit adds a GH action for bumping the logstash version. It uses the updatescli based on a suggestion for how the beats team is doing file updates. There is a workflow_dispatch trigger that accepts a new logstash version. Both the versions.yml and lock file are updated. If it is a branch where we are not vendoring a lockfile that file is skipped without failing the workflow step. * use stub workflow to test * Separate step when modifying * dont track temp updatecli file and install action * restore stub * Refactor updatecli workflow use pattern suggested in code review * Use test stub to validate changes * fix inputs section * fix branch * dont fail if file is not present * try with no global conditionals * file condition * name conditional * split into separate pipeline files * remove unused scmid * no explicit pr action? * add back PR * try sources pattern * explicitly connect target with scmid * ensure lock file lookup executes from checkout * Cleanup * test * restore LOGSTASH_BRANCH * codereview feedback (cherry picked from commit ad20032) Co-authored-by: Cas Donoghue <[email protected]>
* GH action for updating logstash version This commit adds a GH action for bumping the logstash version. It uses the updatescli based on a suggestion for how the beats team is doing file updates. There is a workflow_dispatch trigger that accepts a new logstash version. Both the versions.yml and lock file are updated. If it is a branch where we are not vendoring a lockfile that file is skipped without failing the workflow step. * use stub workflow to test * Separate step when modifying * dont track temp updatecli file and install action * restore stub * Refactor updatecli workflow use pattern suggested in code review * Use test stub to validate changes * fix inputs section * fix branch * dont fail if file is not present * try with no global conditionals * file condition * name conditional * split into separate pipeline files * remove unused scmid * no explicit pr action? * add back PR * try sources pattern * explicitly connect target with scmid * ensure lock file lookup executes from checkout * Cleanup * test * restore LOGSTASH_BRANCH * codereview feedback (cherry picked from commit ad20032) Co-authored-by: Cas Donoghue <[email protected]>
* GH action for updating logstash version This commit adds a GH action for bumping the logstash version. It uses the updatescli based on a suggestion for how the beats team is doing file updates. There is a workflow_dispatch trigger that accepts a new logstash version. Both the versions.yml and lock file are updated. If it is a branch where we are not vendoring a lockfile that file is skipped without failing the workflow step. * use stub workflow to test * Separate step when modifying * dont track temp updatecli file and install action * restore stub * Refactor updatecli workflow use pattern suggested in code review * Use test stub to validate changes * fix inputs section * fix branch * dont fail if file is not present * try with no global conditionals * file condition * name conditional * split into separate pipeline files * remove unused scmid * no explicit pr action? * add back PR * try sources pattern * explicitly connect target with scmid * ensure lock file lookup executes from checkout * Cleanup * test * restore LOGSTASH_BRANCH * codereview feedback





This commit adds a GH action for bumping the logstash version. It uses the updatescli based on a suggestion for how the beats team is doing file updates. There is a workflow_dispatch trigger that accepts a new logstash version. Both the versions.yml and lock file are updated. If it is a branch where we are not vendoring a lockfile that file is skipped without failing the workflow step.
Implements https://github.com/elastic/ingest-dev/issues/5977