Skip to content

ci: allow any command for Renovate post-upgrade tasks#782

Merged
devversion merged 1 commit intoangular:mainfrom
gkalpak:ci-renovate-allowed-cmds
Aug 19, 2022
Merged

ci: allow any command for Renovate post-upgrade tasks#782
devversion merged 1 commit intoangular:mainfrom
gkalpak:ci-renovate-allowed-cmds

Conversation

@gkalpak
Copy link
Member

@gkalpak gkalpak commented Aug 19, 2022

The allowedPostUpgradeCommands pattern list is used to determine whether a post-upgrade task command is allowed to be run by Renovate. Having to explicitly allow each command creates unnecessary friction.

This commit allows any command to be run in a post-upgrade task, which saves us the trouble of having to update the allowed commands pattern list every time we want to add a new post-upgrade task.
Since adding/modifying Renovate post-upgrade tasks is subject to the regular PR review workflow, unwanted commands will be caught there.

INFO: Internal discussion

The [allowedPostUpgradeCommands][1] pattern list is used to determine
whether a [post-upgrade task][2] command is allowed to be run by
Renovate. Having to explicitly allow each command creates unnecessary
friction.

This commit allows any command to be run in a post-upgrade task, which
saves us the trouble of having to update the allowed commands pattern
list every time we want to add a new post-upgrade task.
Since adding/modifying Renovate post-upgrade tasks is subject to the
regular PR review workflow, unwanted commands will be caught there.

[1]: https://docs.renovatebot.com/self-hosted-configuration/#allowedpostupgradecommands
[2]: https://docs.renovatebot.com/configuration-options/#postupgradetasks
@gkalpak gkalpak marked this pull request as ready for review August 19, 2022 09:28
// See https://github.com/angular/angular/pull/47040.
'^yarn --cwd=aio/tools/examples/shared run sync-deps$',
],
allowedPostUpgradeCommands: ['.'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to use .* or something? I don't know if Renovate expects a full match or if a partial is fine.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't think Renovate expects a full match. For example, we were using '^yarn run ' before and it worked fine afaict.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense!

@devversion devversion merged commit 6b0fa50 into angular:main Aug 19, 2022
@gkalpak gkalpak deleted the ci-renovate-allowed-cmds branch August 20, 2022 09:58
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants