Skip to content

Take into account github.ref when doing upgrade-downgrade tests#10504

Merged
deepthi merged 3 commits intovitessio:mainfrom
planetscale:fix-get-latest-release
Jun 15, 2022
Merged

Take into account github.ref when doing upgrade-downgrade tests#10504
deepthi merged 3 commits intovitessio:mainfrom
planetscale:fix-get-latest-release

Conversation

@frouioui
Copy link
Copy Markdown
Member

Description

This Pull Request fixes the upgrade-downgrade tests when they are triggered by a push. When a workflow is triggered by something else than pull_request and pull_request_target, the github.base_ref variable is unavailable, instead we should use github.ref. If github.base_ref is empty, the call to get_latest_release.sh will result in the script returning the latest release branch, which is not okay when running the workflow against, for instance, the release-13.0 branch. This issue can be seen on this workflow: https://github.com/vitessio/vitess/runs/6789332524?check_suite_focus=true.

Related Issue(s)

Checklist

  • "Backport me!" label has been added if this change should be backported
  • Tests were added or are not required
  • Documentation was added or is not required

…e tests

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
@github-actions
Copy link
Copy Markdown
Contributor

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has the correct release notes label. release notes none should only be used for PRs that are so trivial that they need not be included.
  • If a new flag is being introduced, review whether it is really needed. The flag names should be clear and intuitive (as far as possible), and the flag's help should be descriptive.
  • If a workflow is added or modified, each items in Jobs should be named in order to mark it as required. If the workflow should be required, the GitHub Admin should be notified.

Bug fixes

  • There should be at least one unit or end-to-end test.
  • The Pull Request description should either include a link to an issue that describes the bug OR an actual description of the bug and how to reproduce, along with a description of the fix.

Non-trivial changes

  • There should be some code comments as to why things are implemented the way they are.

New/Existing features

  • Should be documented, either by modifying the existing documentation or creating new documentation.
  • New features should have a link to a feature request issue or an RFC that documents the use cases, corner cases and test cases.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • vtctl command output order should be stable and awk-able.

@frouioui frouioui requested a review from deepthi June 14, 2022 14:24
fetch-depth: 0

- name: Set output with latest release branch
- name: Set output with latest release branch (on branch)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The name has changed in this one workflow file but not others. They should all be consistent.
Given that it is not actually latest but previous, maybe rename latest to previous everywhere including in the script file name?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oops, (on branch) shouldnt be here. Forgot to remove this after trying something

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Did a cleanup of the upgrade downgrade workflows to have better names

frouioui added 2 commits June 15, 2022 18:11
… of 'latest'

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
@frouioui frouioui requested a review from deepthi June 15, 2022 16:14
Copy link
Copy Markdown
Collaborator

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

👍

@deepthi
Copy link
Copy Markdown
Collaborator

deepthi commented Jun 15, 2022

Next step - generating upgrade/downgrade test workflows from a template?

@deepthi deepthi merged commit 8cb37c7 into vitessio:main Jun 15, 2022
@deepthi deepthi deleted the fix-get-latest-release branch June 15, 2022 19:56
frouioui added a commit to planetscale/vitess that referenced this pull request Jun 16, 2022
…tessio#10504)

* Take into account the github.ref variable when doing upgrade-downgrade tests

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Changed upgrade-downgrade workflows' syntax to use 'previous' instead of 'latest'

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Fixed syntax error in backup upgrade downgrade workflow

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
frouioui added a commit to planetscale/vitess that referenced this pull request Jun 16, 2022
…tessio#10504)

* Take into account the github.ref variable when doing upgrade-downgrade tests

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Changed upgrade-downgrade workflows' syntax to use 'previous' instead of 'latest'

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Fixed syntax error in backup upgrade downgrade workflow

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
deepthi pushed a commit that referenced this pull request Jun 17, 2022
…0504) (#10523)

* Take into account the github.ref variable when doing upgrade-downgrade tests

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Changed upgrade-downgrade workflows' syntax to use 'previous' instead of 'latest'

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Fixed syntax error in backup upgrade downgrade workflow

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
deepthi pushed a commit that referenced this pull request Jun 24, 2022
…sts (#10522)

* Take into account `github.ref` when doing upgrade-downgrade tests (#10504)

* Take into account the github.ref variable when doing upgrade-downgrade tests

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Changed upgrade-downgrade workflows' syntax to use 'previous' instead of 'latest'

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Fixed syntax error in backup upgrade downgrade workflow

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Fixed static_checks_etc workflow

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants