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

Adding extension flag to summarize an extension buildpackage #344

Merged
merged 7 commits into from
Aug 28, 2024

Conversation

pacostas
Copy link
Contributor

@pacostas pacostas commented Jun 26, 2024

Summary

Adding extension command for summarizing a buildpackage.

Use Cases

This is used when we want to print info of an extension in a json or markdown format. Mostly used on the release notes of an extension.

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@pacostas pacostas requested a review from a team as a code owner June 26, 2024 13:11
@pacostas
Copy link
Contributor Author

@mhdawson Can you have a look if everything looks right?

robdimsdale
robdimsdale previously approved these changes Jun 26, 2024
Copy link
Member

@robdimsdale robdimsdale left a comment

Choose a reason for hiding this comment

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

This looks good to me. There's one minor comment inline - about comments. It might be worth checking all the comments for buildpack and replacing them with extension - I didn't look too closely at this.

For "extra credit" you could consider what a solution to this problem might look like via generics. There's a lot of duplicated code throughout this codebase for the buildpack/extension combination, and we could simplify this back to one version of everything by using generics.

That being said, I'm certainly not going to block this PR on that idea!

}
defer layerGR.Close()

// Generally, each layer corresponds to a buildpack.
Copy link
Member

Choose a reason for hiding this comment

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

I'd update this comment to describe extensions, not buildpacks. Even though the words are the same :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for taking the time to have a look :) We discussed using a more generic implementation to avoid duplicate code, I'm also a big fan of this idea. However, with extensions, we are still determining some use cases that buildpacks support on whether extensions should supported them too. E.g. on the code you have commented, the question is, can an extension have multiple extensions, similar to what buildpacks do? It is possible but we don't have an actual use case that this would be necessary or would make sense. So, having a generic implementation when there are several grey areas will end up with a messy/hacky code. Therefore, we ended up keeping things separate till all scenarios around extensions compared to buildpacks have been covered.

Copy link
Contributor Author

@pacostas pacostas Jun 27, 2024

Choose a reason for hiding this comment

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

@robdimsdale renamed the variable and also rebased the branch to main with force push

@pacostas
Copy link
Contributor Author

@robdimsdale Can you LGTM?

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

@mhdawson
Copy link
Member

@robdimsdale could you take another look.

@robdimsdale robdimsdale added the semver:minor A change requiring a minor version bump label Aug 28, 2024
@robdimsdale robdimsdale merged commit b07bbef into paketo-buildpacks:main Aug 28, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants