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

Allow project upgrades on release branch #3275

Merged

Conversation

abhay-krishna
Copy link
Member

@abhay-krishna abhay-krishna commented Jun 11, 2024

This PR adds logic to perform project upgrades on branches other than main. This will be used to upgrade projects on release branches such as release-0.19, release-0.20 etc, where the latest GitHub patch release will be considered for each project instead of the absolute latest GitHub release. The branch name is obtained from the BRANCH_NAME environment variable, and if there's no such variable set, it uses main as the branch.

Testing

Upgrades on main branch (target version is absolute latest minor or major version)

$ BRANCH_NAME=main bin/version-tracker display --project goharbor/harbor        
ORGANIZATION  REPOSITORY  CURRENT VERSION  LATEST VERSION  
goharbor      harbor      v2.10.2          v2.11.0 

Upgrades on release branch (target version is latest patch release for the same minor version)

$ BRANCH_NAME=release-0.19 bin/version-tracker display --project goharbor/harbor
ORGANIZATION  REPOSITORY  CURRENT VERSION  LATEST VERSION  
goharbor      harbor      v2.9.1           v2.9.4 

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot eks-distro-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 11, 2024
@rahulbabu95
Copy link
Member

/lgtm

@abhay-krishna
Copy link
Member Author

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhay-krishna

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eks-distro-bot eks-distro-bot merged commit a353c08 into aws:main Jun 18, 2024
1 check was pending
@abhay-krishna
Copy link
Member Author

/cherrypick release-0.20

@eks-distro-pr-bot
Copy link
Contributor

@abhay-krishna: new pull request created: #3340

In response to this:

/cherrypick release-0.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@abhay-krishna
Copy link
Member Author

/cherrypick release-0.19

@eks-distro-pr-bot
Copy link
Contributor

@abhay-krishna: #3275 failed to apply on top of branch "release-0.19":

Applying: Allow project upgrades on release branch
Using index info to reconstruct a base tree...
M	tools/version-tracker/pkg/commands/display/display.go
M	tools/version-tracker/pkg/commands/listprojects/listprojects.go
M	tools/version-tracker/pkg/commands/upgrade/upgrade.go
M	tools/version-tracker/pkg/constants/constants.go
M	tools/version-tracker/pkg/git/git.go
M	tools/version-tracker/pkg/github/github.go
Falling back to patching base and 3-way merge...
Auto-merging tools/version-tracker/pkg/github/github.go
CONFLICT (content): Merge conflict in tools/version-tracker/pkg/github/github.go
Auto-merging tools/version-tracker/pkg/git/git.go
CONFLICT (content): Merge conflict in tools/version-tracker/pkg/git/git.go
Auto-merging tools/version-tracker/pkg/constants/constants.go
CONFLICT (content): Merge conflict in tools/version-tracker/pkg/constants/constants.go
Auto-merging tools/version-tracker/pkg/commands/upgrade/upgrade.go
CONFLICT (content): Merge conflict in tools/version-tracker/pkg/commands/upgrade/upgrade.go
Auto-merging tools/version-tracker/pkg/commands/listprojects/listprojects.go
CONFLICT (content): Merge conflict in tools/version-tracker/pkg/commands/listprojects/listprojects.go
Auto-merging tools/version-tracker/pkg/commands/display/display.go
CONFLICT (content): Merge conflict in tools/version-tracker/pkg/commands/display/display.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Allow project upgrades on release branch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-0.19

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

abhay-krishna added a commit to abhay-krishna/eks-anywhere-build-tooling that referenced this pull request Jun 25, 2024
abhay-krishna added a commit that referenced this pull request Jun 25, 2024
* Automate Bottlerocket release version updates (#2959)

* Automate Cilium and EKS Distro releases upgrade (#2973)

* Define Go version files for etcdadm bootstrap provider and controller (#2977)

* Extract only the Go binary from GitHub release tarball (#2978)

* Allow different tags for required images in Helm charts (#2983)

* Remove rolesanywhere-credential-helper project from upgrade buildspec (#2987)

* Attempt to apply patches and generate checksums/attribution if successful (#2992)

* Remove newlines from kubeVersion field (#3002)

* Fix checksums and attribution generation during upgrade (#3009)

* Fix condition for patches warning comment on upgrade PRs (#3038)

* Fix attribution and checksum generation for successful patch application (#3060)

* Fix Bottlerocket host container metadata files (#3075)

* Support upgrading release-branched projects (#3066)

* Filter out pre-release tags in upgrader flow (#3089)

* Handle cases where GitHub release does not exist for tag (#3116)

* Fix Go mod location for cluster-autoscaler (#3127)

* Allow upgrading projects tracked with commits (#3136)

* Fix pre-release detection logic when fetching latest GitHub revision (#3140)

* Fix cert-manager GitHub release tarball name (#3142)

* Handle patches application for release-branched projects (#3150)

* Allow projects to selectively upgrade to pre-release tags (#3164)

* Remove dependencies for EKS Distro version upgrade step (#3166)

* Refactor latest release logic for EKS Distro upgrades (#3174)

* Fix the issue of patch repo in upgrade cmd (#3220)

* Make image-builder upgrade flow non-release-branched (#3234)

* Use latest release branch by default if not defined, fall back to Github file for Go versions (#3244)

* Avoid printing directory name for Make command (#3249)

* Use go.mod file to retrieve cert-manager Go version (#3273)

* Exclude GitHub Helm chart release tags (#3320)

* Allow project upgrades on release branch (#3275)

* Use Go 1.22 to build version tracker binary (#3081)

---------

Co-authored-by: Xu Deng <xudeng@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants