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

Add option to update releases while updating stemcell #513

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

dlinsley
Copy link
Contributor

@dlinsley dlinsley commented Nov 26, 2024

In our automated system we always use the latest version of a stemcell and dependent compiled releases and have automation that attempts to keep the Kilnfile.lock current using update-stemcell and find-release-version / update-release.

On occasion:
when a new release and stemcell are created close together
and while trying to update the stemcell
the current release version in the Kilnfile.lock may not have a matching compiled release for the new stemcell.

Scenario example:

  • compiled release exists for: release-v1-stemcell-v1
  • release bumped: release-v2-stemcell-v1
  • new stemcell available but build fails for: release-v2-stemcell-v2
  • release bumped, build succeeds: release-v3-stemcell-v2

This leaves the following compiled releases available:

  • release-v1-stemcell-v1
  • release-v2-stemcell-v1
  • release-v3-stemcell-v2

Since release-v2-stemcell-v2 is missing, kiln update-stemcell cannot update the Kilnfile.lock

The proposed change in this PR adds an optional --update-releases flag to update-stemcell to match the latest release for the specified stemcell given the version constraints in the Kilnfile and allow the prior scenario to update the Kilnfile.lock

Existing functionality without the --update-releases flag is retained.

@dlinsley dlinsley added enhancement tas-slingshots Created by https://github.com/orgs/pivotal-cf/teams/tas-strategic-initiatives-slingshot labels Nov 26, 2024
@dlinsley dlinsley force-pushed the update-stemcell-and-releases branch from ff03087 to e583f89 Compare December 3, 2024 17:45
@dlinsley dlinsley marked this pull request as ready for review December 3, 2024 17:58
Copy link
Member

@drich10 drich10 left a comment

Choose a reason for hiding this comment

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

Looks good to me, just one requested change and I'll go ahead and merge after 🙏

internal/commands/update_stemcell.go Outdated Show resolved Hide resolved
@drich10 drich10 merged commit 8273461 into main Dec 4, 2024
3 checks passed
@drich10 drich10 deleted the update-stemcell-and-releases branch December 4, 2024 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ready-for-review tas-slingshots Created by https://github.com/orgs/pivotal-cf/teams/tas-strategic-initiatives-slingshot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants