Skip to content

ci: fix Renovate post-upgrade task command#47040

Closed
gkalpak wants to merge 1 commit intoangular:mainfrom
gkalpak:ci-aio-fix-post-upgrade
Closed

ci: fix Renovate post-upgrade task command#47040
gkalpak wants to merge 1 commit intoangular:mainfrom
gkalpak:ci-aio-fix-post-upgrade

Conversation

@gkalpak
Copy link
Member

@gkalpak gkalpak commented Aug 4, 2022

Since Renovate runs from the project directory, it cannot find the sync-deps yarn script inside aio/tools/examples/shared/: example failure

Update the post-upgrade task command to run inside that directory instead of the project root.

NOTE:
For this to take effect, a corresponding change is needed in angular/dev-infra > .github/ng-renovate/runner-config.js.

UPDATE:
Candidate dev-infra PRs:

@gkalpak gkalpak force-pushed the ci-aio-fix-post-upgrade branch from 5881434 to 0841090 Compare August 4, 2022 09:42
Since Renovate runs from the project directory, it cannot find the
`sync-deps` yarn script inside `aio/tools/examples/shared/`:
[example failure][1]

Update the post-upgrade task command to run inside that directory
instead of the project root.

[1]: angular#46707 (comment)
@gkalpak gkalpak marked this pull request as ready for review August 4, 2022 10:16
@gkalpak gkalpak added type: bug/fix area: build & ci Related the build and CI infrastructure of the project action: review The PR is still awaiting reviews from at least one requested reviewer comp: docs-infra target: patch This PR is targeted for the next patch release labels Aug 4, 2022
@ngbot ngbot bot modified the milestone: Backlog Aug 4, 2022
@gkalpak gkalpak changed the title ci(docs-infra): fix Renovate post-upgrade task command ci: fix Renovate post-upgrade task command Aug 4, 2022
gkalpak added a commit to gkalpak/dev-infra that referenced this pull request Aug 4, 2022
The [allowedPostUpgradeCommands][1] pattern list is used to determine
whether a [post-upgrade task][2] command is allowed to be run by
Renovate. Using a regex to try and limit the type of commands that can
be run is not a viable strategy.

This commit hard-codes the exact command that needs to run for
angular.io docs examples dependencies (see angular/angular#47040).

Hard-coding commands requires updates in multiple places when a
post-upgrade task is added/modified, but adds one more later of
protection against running unwanted commands as part of the Renovate
update process.

[1]: https://docs.renovatebot.com/self-hosted-configuration/#allowedpostupgradecommands
[2]: https://docs.renovatebot.com/configuration-options/#postupgradetasks
gkalpak added a commit to gkalpak/dev-infra that referenced this pull request Aug 4, 2022
The [allowedPostUpgradeCommands][1] pattern list is used to determine
whether a [post-upgrade task][2] command is allowed to be run by
Renovate. Using a regex to try and limit the type of commands that can
be run is not a viable strategy.

This commit hard-codes the exact command that needs to run for
angular.io docs examples dependencies (see angular/angular#47040).

Hard-coding commands requires updates in multiple places when a
post-upgrade task is added/modified, but adds one more layer of
protection against running unwanted commands as part of the Renovate
update process.

[1]: https://docs.renovatebot.com/self-hosted-configuration/#allowedpostupgradecommands
[2]: https://docs.renovatebot.com/configuration-options/#postupgradetasks
gkalpak added a commit to angular/dev-infra that referenced this pull request Aug 4, 2022
The [allowedPostUpgradeCommands][1] pattern list is used to determine
whether a [post-upgrade task][2] command is allowed to be run by
Renovate. Using a regex to try and limit the type of commands that can
be run is not a viable strategy.

This commit hard-codes the exact command that needs to run for
angular.io docs examples dependencies (see angular/angular#47040).

Hard-coding commands requires updates in multiple places when a
post-upgrade task is added/modified, but adds one more layer of
protection against running unwanted commands as part of the Renovate
update process.

[1]: https://docs.renovatebot.com/self-hosted-configuration/#allowedpostupgradecommands
[2]: https://docs.renovatebot.com/configuration-options/#postupgradetasks
@gkalpak gkalpak added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 4, 2022
@dylhunn
Copy link
Contributor

dylhunn commented Aug 4, 2022

This PR was merged into the repository by commit f9b30df.

@dylhunn dylhunn closed this in f9b30df Aug 4, 2022
dylhunn pushed a commit that referenced this pull request Aug 4, 2022
Since Renovate runs from the project directory, it cannot find the
`sync-deps` yarn script inside `aio/tools/examples/shared/`:
[example failure][1]

Update the post-upgrade task command to run inside that directory
instead of the project root.

[1]: #46707 (comment)

PR Close #47040
@gkalpak gkalpak deleted the ci-aio-fix-post-upgrade branch August 17, 2022 07:11
@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 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project target: patch This PR is targeted for the next patch release type: bug/fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants