Skip to content
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

Upmerge fix #1649

Merged
merged 7 commits into from
Aug 9, 2024
Merged

Upmerge fix #1649

merged 7 commits into from
Aug 9, 2024

Conversation

brooke-hamilton
Copy link
Contributor

Description

Fixes an issue in which the Upmerge samples to edge action completes with an error when there are no changes to merge.

Type of change

  • This pull request fixes a bug in Radius and has an approved issue (issue link required).

Fixes: #1632

Changes

  • The upmerge.yaml file has been updated to check for changes before attempting to create a new PR.
  • Comments added to explain context and actions taken in the workflow.
  • Merge and commit in one git command instead of two. Not all merges create a merge commit, so this allows for specifying a merge comment that will only be used if a commit is created by the merge.
  • Other minor code improvements.

Background context

The Upmerge samples to edge action workflow is part of the release process. The release engineer uses this workflow to synchronize any changes made to the default branch to the edge branch. That step is necessary because the default branch is also the current release branch, which allows PRs to be approved against the current release and the samples to be immediately updated (rather than having to wait until the next release for a fix/update to the samples.) After synchronizing changes to the edge branch, the next release branch is created from the edge branch.

Other considerations

There is potential for confusion for the person executing the workflow if they run the automation, but there are no changes between the source branch and the target branch, and the workflow completes successfully without creating a PR. The user would have to look at the workflow log to see that no PR was created because there are no changes. To make that experience better I tested a suggestion from @ytimocin to force the PR to be created without any files to merge. However, GitHub will not allow an empty PR to be created even while passing a -f flag to the gh pr create command.

@ytimocin, @willdavsmith thank you for early feedback on this PR. 🚀

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Copy link
Contributor

@ytimocin ytimocin left a comment

Choose a reason for hiding this comment

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

Looking great so far!

.github/workflows/upmerge.yaml Show resolved Hide resolved
.github/workflows/upmerge.yaml Outdated Show resolved Hide resolved
.github/workflows/upmerge.yaml Outdated Show resolved Hide resolved
.github/workflows/upmerge.yaml Show resolved Hide resolved
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
- name: Create pull request
if: env.NO_CHANGES != 'true'
Copy link
Contributor

Choose a reason for hiding this comment

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

we should also update the release process doc to inform that there might not be a PR created: https://github.com/radius-project/radius/tree/main/docs/contributing/contributing-releases

Copy link
Contributor

@willdavsmith willdavsmith left a comment

Choose a reason for hiding this comment

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

LGTM, awesome stuff

@willdavsmith willdavsmith merged commit d03274b into radius-project:v0.36 Aug 9, 2024
6 of 8 checks passed
lakshmimsft pushed a commit that referenced this pull request Aug 14, 2024
* Upmerge fix (#1649)

* Fix error when no branch changes

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Remove extra commit

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Add comments

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Fix branch name env var

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Clarify comments

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Add example

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

---------

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Update k3d create commands

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Add comment describing the k3d configuration

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

---------

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
vishwahiremat pushed a commit to vishwahiremat/samples that referenced this pull request Aug 15, 2024
* Upmerge fix (radius-project#1649)

* Fix error when no branch changes

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Remove extra commit

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Add comments

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Fix branch name env var

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Clarify comments

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Add example

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

---------

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Update k3d create commands

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Add comment describing the k3d configuration

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

---------

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Vishwanath Hiremath <vhiremath@microsoft.com>
vishwahiremat added a commit that referenced this pull request Aug 15, 2024
…file (#1710)

* Update k3d create commands (#1683)

* Upmerge fix (#1649)

* Fix error when no branch changes

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Remove extra commit

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Add comments

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Fix branch name env var

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Clarify comments

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Add example

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

---------

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Update k3d create commands

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Add comment describing the k3d configuration

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

---------

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Vishwanath Hiremath <vhiremath@microsoft.com>

* adding aws credential command changes to workflow files

Signed-off-by: Vishwanath Hiremath <vhiremath@microsoft.com>

---------

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Vishwanath Hiremath <vhiremath@microsoft.com>
Co-authored-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
willdavsmith added a commit that referenced this pull request Sep 20, 2024
* Upmerge fix (#1649)

* Fix error when no branch changes

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Remove extra commit

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Add comments

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Fix branch name env var

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Clarify comments

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Add example

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

---------

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Fix purge aws resources workflow

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

---------

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: willdavsmith <willdavsmith@gmail.com>
Co-authored-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
kachawla pushed a commit that referenced this pull request Oct 9, 2024
* Update samples for

* Fix samples test issue with release channel version (#1850)

* adding channel to install-rad functionality

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* adding channel to install-rad functionality

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

---------

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* Fix purge AWS resources workflow (#1703)

* Upmerge fix (#1649)

* Fix error when no branch changes

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Remove extra commit

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Add comments

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Fix branch name env var

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Clarify comments

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Add example

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

---------

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Fix purge aws resources workflow

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

---------

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: willdavsmith <willdavsmith@gmail.com>
Co-authored-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* Bump webpack from 5.88.2 to 5.94.0 in /samples/demo/client (#1744)

Bumps [webpack](https://github.com/webpack/webpack) from 5.88.2 to 5.94.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.88.2...v5.94.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nithya Subramanian <98416062+nithyatsu@users.noreply.github.com>

* Bump body-parser and express in /samples/demo (#1852)

Bumps [body-parser](https://github.com/expressjs/body-parser) to 1.20.3 and updates ancestor dependency [express](https://github.com/expressjs/express). These dependencies need to be updated together.


Updates `body-parser` from 1.20.2 to 1.20.3
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](expressjs/body-parser@1.20.2...1.20.3)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](expressjs/express@4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-type: indirect
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump micromatch from 4.0.5 to 4.0.8 in /samples/demo/client (#1745)

Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](micromatch/micromatch@4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nithya Subramanian <98416062+nithyatsu@users.noreply.github.com>

* Bump body-parser and express in /samples/dapr/nodeapp (#1854)

Bumps [body-parser](https://github.com/expressjs/body-parser) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `body-parser` from 1.20.2 to 1.20.3
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](expressjs/body-parser@1.20.2...1.20.3)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](expressjs/express@4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-type: direct:production
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nithya Subramanian <98416062+nithyatsu@users.noreply.github.com>

* Bump path-to-regexp and express in /samples/demo/client (#1819)

Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `path-to-regexp` from 0.1.7 to 0.1.10
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](pillarjs/path-to-regexp@v0.1.7...v0.1.10)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](expressjs/express@4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nithya Subramanian <98416062+nithyatsu@users.noreply.github.com>

* Bump rollup from 2.79.1 to 2.79.2 in /samples/demo/client (#1856)

Bumps [rollup](https://github.com/rollup/rollup) from 2.79.1 to 2.79.2.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](rollup/rollup@v2.79.1...v2.79.2)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: willdavsmith <willdavsmith@gmail.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Will Smith <willdavsmith@gmail.com>
Co-authored-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nithya Subramanian <98416062+nithyatsu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix upmerge samples to edge workflow
3 participants