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 lifecycle output to update stack after rebase #360

Merged
merged 7 commits into from
May 31, 2023
Merged

add lifecycle output to update stack after rebase #360

merged 7 commits into from
May 31, 2023

Conversation

hernandanielg
Copy link
Contributor

This is related to buildpacks/lifecycle#1098

As for now the Spec is missing to specify the need to update the Stack metadata so it will reflect new information after image rebase process

joe-kimmel-vmw and others added 2 commits April 8, 2023 11:38
Signed-off-by: Joe Kimmel <jkimmel@vmware.com>
platform.md Outdated
@@ -840,6 +840,8 @@ Usage:
- `run-image.reference` SHALL uniquely identify `<run-image>`
- `run-image.top-layer` SHALL be set to the uncompressed digest of the top layer in `<run-image>`
- The value of `io.buildpacks.stack.*` labels SHALL be modified to that of the new `run-image`
- `stack.run-image.image` SHALL uniquely identify `<run-image>`
- `stack.run-image.mirrors` SHALL be updated to include the new image mirrors
Copy link
Member

Choose a reason for hiding this comment

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

How will the run image mirrors be identified?

Copy link
Member

Choose a reason for hiding this comment

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

(During build they come from stack.toml - soon to be run.toml in future platform APIs - but we don't have this file during rebase.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes has been made @natalieparellano

Signed-off-by: Hernan Garcia <hernan.garcia@percona.com>
platform.md Outdated Show resolved Hide resolved
Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Hernan Garcia <hernandanielg@gmail.com>
@natalieparellano natalieparellano changed the base branch from main to platform/0.12 May 16, 2023 17:21
platform.md Outdated
@@ -840,6 +840,9 @@ Usage:
- `run-image.reference` SHALL uniquely identify `<run-image>`
- `run-image.top-layer` SHALL be set to the uncompressed digest of the top layer in `<run-image>`
- The value of `io.buildpacks.stack.*` labels SHALL be modified to that of the new `run-image`
- **If** the provided `<run-image>` is not found in `stack.run-image.image` or `stack.run-image.mirrors`:

Choose a reason for hiding this comment

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

Sorry this might be a dumb question, but does this mean every new run image released needs to have some sort of mapping/record/reference indicated in the stack?

Copy link
Member

Choose a reason for hiding this comment

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

I think it depends - if you want stack.run-image.mirrors to have data, then yes the mapping must exist. Worth noting: future versions of the spec do away with stack.toml in favor of run.toml, which now contains a list of run images (and associated mirrors for each). More information could be found here: https://github.com/buildpacks/spec/pull/335/files#diff-e603760990971da3f77be4bb8d77c3405098f006814fd8c054d2d15f395b8330R934-R939 and here: https://github.com/buildpacks/spec/pull/335/files#diff-e603760990971da3f77be4bb8d77c3405098f006814fd8c054d2d15f395b8330R1238

@hernandanielg I'm realizing that this PR should probably be pointed at #335 due to the aforementioned changes. Are you able to rebase? There will likely be a merge conflict.

Choose a reason for hiding this comment

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

Thank you for the clarification!

Copy link

@harryli0108 harryli0108 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! Thank you for your quick response to this issue

@hernandanielg hernandanielg changed the base branch from platform/0.12 to stack-removal/platform May 22, 2023 22:28
Signed-off-by: Hernan Garcia <hernandanielg@gmail.com>
@hernandanielg
Copy link
Contributor Author

Hey @natalieparellano changes has been done - can you please review them? 🙏🏻

platform.md Outdated Show resolved Hide resolved
platform.md Outdated Show resolved Hide resolved
Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Hernan Garcia <hernandanielg@gmail.com>
natalieparellano added a commit to buildpacks/lifecycle that referenced this pull request May 31, 2023
if the provided run image does not match existing metadata.

See buildpacks/spec#360

Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
@natalieparellano natalieparellano merged commit e41fd67 into buildpacks:stack-removal/platform May 31, 2023
@hernandanielg hernandanielg deleted the platform-output-update-stack branch May 31, 2023 21:44
natalieparellano added a commit to buildpacks/lifecycle that referenced this pull request Jun 1, 2023
…1104)

* When rebasing, update stack/runImage key in lifecycle metadata label
if the provided run image does not match existing metadata.

See buildpacks/spec#360

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Update rebaser_test.go

Signed-off-by: Natalie Arellano <narellano@vmware.com>

---------

Signed-off-by: Natalie Arellano <narellano@vmware.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.

6 participants