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

fix lifecycle change summarizer to show relocated image #193

Closed
wants to merge 1 commit into from

Conversation

tomkennedy513
Copy link
Contributor

fixes #187

Copy link
Contributor

@tylerphelan tylerphelan left a comment

Choose a reason for hiding this comment

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

is there any testing around the diffing logic?

@tomkennedy513
Copy link
Contributor Author

is there any testing around the diffing logic?

there is some, it basically just creates a descriptor with some changes. It's probably worth adding a test that contains a digest

@@ -33,8 +35,19 @@ type ImportDiffer struct {
StackRefGetter StackRefGetter
}

func (id *ImportDiffer) DiffLifecycle(oldImg string, newImg string) (string, error) {
return id.Differ.Diff(oldImg, newImg)
func (id *ImportDiffer) DiffLifecycle(kpConfig config.KpConfig, oldImg string, newImg string) (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that the other methods in in here DiffClusterStore/DiffClusterStack/etc are actually reading the fully qualified digest from the registry so the lack of a similar workflow feels out of place here.

Copy link
Contributor

Choose a reason for hiding this comment

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

These other calls do feel awkward because the other differs use StackRefGetter/StoreRefGetter which seem to be "too knowledgeable" about the intended usecase of an image (whether it is a stack/buildpack/etc).

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps this all could be simplified if we don't need to give the relocated images "pretty names" and we can write them all to the same repo in the registry.

Copy link
Contributor

@tylerphelan tylerphelan left a comment

Choose a reason for hiding this comment

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

I think since this is a visualization feature only we use this solution to fix the bug then move to a single repo model later

@tomkennedy513
Copy link
Contributor Author

closing as this was resolved in #205

@tomkennedy513 tomkennedy513 deleted the lifecycle-change-summarizer branch September 28, 2021 14:37
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.

Kp reports pre-relocated lifecycle during kp import --show-changes
3 participants