Skip to content

ci: migrate rebase-pr CI script to the circleci directory#39592

Closed
josephperrott wants to merge 2 commits into
angular:masterfrom
josephperrott:circleci-rebase-pr
Closed

ci: migrate rebase-pr CI script to the circleci directory#39592
josephperrott wants to merge 2 commits into
angular:masterfrom
josephperrott:circleci-rebase-pr

Conversation

@josephperrott
Copy link
Copy Markdown
Member

@josephperrott josephperrott commented Nov 6, 2020

Migrate the rebase-pr script used on CI out of tools and into the circleci
directory. Additionally removes its support for running in the local
repository as this is now better handled by ng-dev pr rebase <pr-number>.

@josephperrott josephperrott added the area: build & ci Related the build and CI infrastructure of the project label Nov 6, 2020
@ngbot ngbot Bot added this to the needsTriage milestone Nov 6, 2020
@google-cla google-cla Bot added the cla: yes label Nov 6, 2020
@josephperrott josephperrott force-pushed the circleci-rebase-pr branch 2 times, most recently from eb736d2 to 861be94 Compare November 6, 2020 21:39
@josephperrott josephperrott changed the title test ci: migrate rebase-pr CI script to the circleci directory Nov 6, 2020
@josephperrott josephperrott marked this pull request as ready for review November 6, 2020 21:44
@josephperrott josephperrott added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Nov 6, 2020
@josephperrott josephperrott requested a review from gkalpak November 6, 2020 21:46
Copy link
Copy Markdown
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

A couple of minor comments/questions. Otherwise lgtm 👍
Also, consider adding a comment on why we don't use the ng-dev command on CI.

Comment thread .circleci/rebase-pr.js Outdated
Comment thread .circleci/rebase-pr.js Outdated
Comment thread tools/rebase-pr.js Outdated
Comment thread .circleci/rebase-pr.js Outdated
@AndrewKushnir AndrewKushnir added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Nov 23, 2020
@AndrewKushnir
Copy link
Copy Markdown
Contributor

FYI, adding "cleanup" label based on comments from @gkalpak. Thank you.

Migrate the rebase-pr script used on CI out of tools and into the circleci
directory.  Additionally removes its support for running in the local
repository as this is now better handled by `ng-dev pr rebase <pr-number>`.
@josephperrott josephperrott removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Nov 23, 2020
AndrewKushnir pushed a commit that referenced this pull request Nov 23, 2020
Migrate the rebase-pr script used on CI out of tools and into the circleci
directory.  Additionally removes its support for running in the local
repository as this is now better handled by `ng-dev pr rebase <pr-number>`.

PR Close #39592
gkalpak added a commit to gkalpak/angular that referenced this pull request Dec 16, 2020
As part of the `setup` CI job (which is a prerequisite for all other CI
jobs), we rebase the current code on master to make sure the PR changes
are compatible with the latest code from master, even if the PR has not
been rebased recently.

When it is not possible to automatically rebase (i.e. when there are
conflicts that need to be resolved manually), the job and subsequently
the entire workflow should fail.

This behavior has been accidentally broken in angular#39592, so that the job
would succeed even if the rebase operation failed.

This commit fixes it by ensuring the `exec()` helper used in
`rebase-pr.js` will throw an error if the underlying command execution
fails. Previously, the function would always return stdout output as a
string and attach a `code` property indicating the exit code of the
command.

Since the exit code isn't necessary in the `rebase-pr.js` script, this
commit simplifies the `exec()` helper by making it return the stdout
output as a plain string (without extra properties) and re-throw any
errors (unless the `ignoreError` argument is set to `true`).

(Initially reported [here][1] by @JoostK.)

[1]: https://angular-team.slack.com/archives/C042EU9T5/p1608070403128900
josephperrott pushed a commit that referenced this pull request Dec 17, 2020
As part of the `setup` CI job (which is a prerequisite for all other CI
jobs), we rebase the current code on master to make sure the PR changes
are compatible with the latest code from master, even if the PR has not
been rebased recently.

When it is not possible to automatically rebase (i.e. when there are
conflicts that need to be resolved manually), the job and subsequently
the entire workflow should fail.

This behavior has been accidentally broken in #39592, so that the job
would succeed even if the rebase operation failed.

This commit fixes it by ensuring the `exec()` helper used in
`rebase-pr.js` will throw an error if the underlying command execution
fails. Previously, the function would always return stdout output as a
string and attach a `code` property indicating the exit code of the
command.

Since the exit code isn't necessary in the `rebase-pr.js` script, this
commit simplifies the `exec()` helper by making it return the stdout
output as a plain string (without extra properties) and re-throw any
errors (unless the `ignoreError` argument is set to `true`).

(Initially reported [here][1] by @JoostK.)

[1]: https://angular-team.slack.com/archives/C042EU9T5/p1608070403128900

PR Close #40161
josephperrott pushed a commit that referenced this pull request Dec 17, 2020
As part of the `setup` CI job (which is a prerequisite for all other CI
jobs), we rebase the current code on master to make sure the PR changes
are compatible with the latest code from master, even if the PR has not
been rebased recently.

When it is not possible to automatically rebase (i.e. when there are
conflicts that need to be resolved manually), the job and subsequently
the entire workflow should fail.

This behavior has been accidentally broken in #39592, so that the job
would succeed even if the rebase operation failed.

This commit fixes it by ensuring the `exec()` helper used in
`rebase-pr.js` will throw an error if the underlying command execution
fails. Previously, the function would always return stdout output as a
string and attach a `code` property indicating the exit code of the
command.

Since the exit code isn't necessary in the `rebase-pr.js` script, this
commit simplifies the `exec()` helper by making it return the stdout
output as a plain string (without extra properties) and re-throw any
errors (unless the `ignoreError` argument is set to `true`).

(Initially reported [here][1] by @JoostK.)

[1]: https://angular-team.slack.com/archives/C042EU9T5/p1608070403128900

PR Close #40161
@angular-automatic-lock-bot
Copy link
Copy Markdown

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 Dec 24, 2020
@pullapprove pullapprove Bot removed the area: build & ci Related the build and CI infrastructure of the project label Dec 24, 2020
@pullapprove pullapprove Bot added the area: dev-infra Issues related to Angular's own dev infra (build, test, CI, releasing) label Dec 24, 2020
@ngbot ngbot Bot modified the milestones: needsTriage, Backlog Dec 24, 2020
@josephperrott josephperrott deleted the circleci-rebase-pr branch January 25, 2021 20:58
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: dev-infra Issues related to Angular's own dev infra (build, test, CI, releasing) cla: yes target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants