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

Changes for testing 'upgrade' from develop branch #341

Merged
merged 3 commits into from
Oct 5, 2023

Conversation

niladrih
Copy link
Member

@niladrih niladrih commented Sep 18, 2023

Upgrade e2e tests are run as a part of release/x.y branches, but not develop or main. This change modifies the chart that is posted to the 'main' branch, and this chart should qualify as a valid target helm chart for upgrade, thus allowing testing code from develop (main branch uses code from develop at a set frequency).

The intention is to be able to upgrade from a released version to develop or main.

Description

Changes to upgrade code:

  • Adds support for parsing repotags in the upgrade-job::helm::chart module
  • Adds default set options for setting repotags along with image tags. This is required because the main branch chart uses image.repoTags instead of image.tag.

Changes to publish_chart_yaml.sh script:

  • Changes appVersion and version set when generating main branch chart (using the --develop-to-main flag) from 0.0.0-main to the likes of 2.5.0-0-develop-unstable-2023-09-24-19-55-15-0, where 2.5.0 is semver minor bump from the latest possible release (based on existing release/x.y branches on openebs/mayastor-extensions), and 2023-09-24-19-55-15 is a timestamp generated from the commanddate +%Y-%m-%d-%H-%M-%S.
  • Latest release branch name can be input to the script using the --latest-release-branch <branch_name> option. The default value is generated from git remote refs from the git repo. To use the default branch-name generation, all refs from the remote repo openebs/mayastor-extensions must be pulled in (e.g. git fetch origin where origin is the remote entry for the openebs/mayastor-extensions repo)
  • Bump to the latest is set to minor version by-default. The --bump-major-for-main bumps the major version instead, if and when the version bump needs to be a major one.

GitHub Actions changes:

  • Remove the publish step for the main branch helm chart workflow. This is no longer required as helm charts on the main branch will be versioned (the -main suffix will no longer have any use) and the charts will be hosted on the https://github.com/openebs/mayastor-chart-donotuse repo.
  • Use --check-chart to run a basic sanity test, like the one for the develop-chart actions workflow.

This change adds two major use cases for the publish_chart_yaml.sh script:

  1. Generate the main branch helm chart from the develop branch helm chart (used in CI) using
./scripts/helm/publish_chart_yaml.sh \
        --check-chart main \
        --develop-to-main \
        --date-time $(date +%Y-%m-%d-%H-%M-%S)
  1. Use it to sanitize changes to the chart using ./scripts/helm/publish_chart_yaml.sh --check-chart main. This is minor use-case, This does not do a good job of validating the chart version/appVersion, etc.

Tested manually.

@niladrih niladrih force-pushed the test-upgrade-develop branch 2 times, most recently from 71b88c7 to bb949df Compare September 18, 2023 08:12
@niladrih
Copy link
Member Author

bors try

bors bot pushed a commit that referenced this pull request Sep 18, 2023
@bors
Copy link
Contributor

bors bot commented Sep 18, 2023

try

Build failed:

@niladrih niladrih force-pushed the test-upgrade-develop branch from bb949df to 59f7032 Compare September 18, 2023 09:33
@niladrih
Copy link
Member Author

bors try

bors bot pushed a commit that referenced this pull request Sep 18, 2023
@bors
Copy link
Contributor

bors bot commented Sep 18, 2023

try

Build failed:

@niladrih niladrih force-pushed the test-upgrade-develop branch from 59f7032 to d862502 Compare September 18, 2023 09:37
@niladrih
Copy link
Member Author

bors try

bors bot pushed a commit that referenced this pull request Sep 18, 2023
@bors
Copy link
Contributor

bors bot commented Sep 18, 2023

try

Build failed:

@niladrih niladrih force-pushed the test-upgrade-develop branch from d862502 to 979e969 Compare September 18, 2023 09:40
@niladrih
Copy link
Member Author

bors cancel

@niladrih
Copy link
Member Author

bors try

bors bot pushed a commit that referenced this pull request Sep 18, 2023
@bors
Copy link
Contributor

bors bot commented Sep 18, 2023

try

Build failed:

@niladrih niladrih force-pushed the test-upgrade-develop branch from 979e969 to de47149 Compare September 18, 2023 09:44
@niladrih
Copy link
Member Author

bors cancel

@niladrih
Copy link
Member Author

bors try

bors bot pushed a commit that referenced this pull request Sep 18, 2023
@niladrih
Copy link
Member Author

bors cancel

@niladrih
Copy link
Member Author

bors try

bors bot pushed a commit that referenced this pull request Sep 24, 2023
@bors
Copy link
Contributor

bors bot commented Sep 24, 2023

try

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@niladrih niladrih force-pushed the test-upgrade-develop branch from 6888a66 to 7db825b Compare September 25, 2023 06:09
.github/workflows/main-chart.yml Outdated Show resolved Hide resolved
.github/workflows/main-chart.yml Show resolved Hide resolved
scripts/helm/publish-chart-yaml.sh Show resolved Hide resolved
scripts/helm/publish-chart-yaml.sh Outdated Show resolved Hide resolved
scripts/helm/publish-chart-yaml.sh Show resolved Hide resolved
@niladrih niladrih force-pushed the test-upgrade-develop branch from 9d15088 to ae4e728 Compare October 4, 2023 05:17
@niladrih niladrih force-pushed the test-upgrade-develop branch from ae4e728 to 85e3c05 Compare October 4, 2023 05:27
@niladrih niladrih added wip Indicates that this is a work in progress and removed wip Indicates that this is a work in progress labels Oct 4, 2023
@niladrih niladrih force-pushed the test-upgrade-develop branch from 85e3c05 to b26af52 Compare October 4, 2023 09:49
Copy link
Contributor

@r1jt r1jt left a comment

Choose a reason for hiding this comment

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

Reviewed the github action, and publish helm chart sections of the PR

@niladrih
Copy link
Member Author

niladrih commented Oct 5, 2023

bors merge

bors bot pushed a commit that referenced this pull request Oct 5, 2023
341: Changes for testing 'upgrade' from develop branch r=niladrih a=niladrih

<!

Co-authored-by: Niladri Halder <[email protected]>
@niladrih niladrih force-pushed the test-upgrade-develop branch from b26af52 to d1ec228 Compare October 5, 2023 06:32
@bors
Copy link
Contributor

bors bot commented Oct 5, 2023

Canceled.

@niladrih
Copy link
Member Author

niladrih commented Oct 5, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented Oct 5, 2023

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@bors
Copy link
Contributor

bors bot commented Oct 5, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit f2363a3 into develop Oct 5, 2023
@bors bors bot deleted the test-upgrade-develop branch October 5, 2023 06:39
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.

3 participants