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

Fixups for flatten feature on pack 0.30.0 #1798

Closed
3 of 5 tasks
jjbustamante opened this issue Jun 13, 2023 · 5 comments · Fixed by #1787
Closed
3 of 5 tasks

Fixups for flatten feature on pack 0.30.0 #1798

jjbustamante opened this issue Jun 13, 2023 · 5 comments · Fixed by #1787
Assignees
Labels
status/triage Issue or PR that requires contributor attention. type/bug Issue that reports an unexpected behaviour.
Milestone

Comments

@jjbustamante
Copy link
Member

jjbustamante commented Jun 13, 2023

Summary

We are planning to release a new experimental feature to flatten builder layers and buildpack package. This feature was requested by the following issue #1595. Since pack 0.30.0-pre2 release a version of the feature was released.
This issue is meant to capture all the bugs to be fixed before we can ship the next pack.

TODO:

  • --flatten-exclude should exclude from flattening (vs separately flatten)
  • --flatten-include

@jjbustamante jjbustamante added type/bug Issue that reports an unexpected behaviour. status/triage Issue or PR that requires contributor attention. labels Jun 13, 2023
@jjbustamante jjbustamante added this to the 0.30.0 milestone Jun 13, 2023
@jjbustamante jjbustamante self-assigned this Jun 13, 2023
@anthonydahanne
Copy link
Contributor

anthonydahanne commented Jul 4, 2023

Hello @jjbustamante !
With the addition of --flatten-include, could we add another option that could allow the user to flatten by groups?

Let's take this example, my-composite has 4 different component buildpacks defined in it:

my-composite
├─componentA
├─componentB
├─componentC
├─componentD

I want to flatten A & B together, then C& D together, to obtain:

my-composite
├─componentA&B
├─componentC&D

With pack buildpack package --flatten --flatten-exclude componentC,componentD, I would obtain:

my-composite
├─componentA&B
├─componentC
├─componentD

With pack buildpack package --flatten --flatten-include componentC,componentD, I would obtain:

my-composite
├─componentA
├─componentB
├─componentC&D

As you can see, there's no way to obtain the desired outcome with neither --flatten-include nor --flatten-exclude.

What if we also added a new argument, named --flatten-groups that would allow the user to specify something like:

pack buildpack package --flatten --flatten-groups componentA,componentB|componentC,componentD

to obtain the desired outcome.

Does that make sense? What do you think?

Thank you!

cc @pivotal-david-osullivan , @dmikusa , @loewenstein , @natalieparellano

@jjbustamante
Copy link
Member Author

Hi @anthonydahanne Thanks for this feedback!!!

I haven't defined the flatten-include flag yet but, maybe also like this could work?

pack buildpack package --flatten --flatten-include componentA,componentB --flatten-include componentC,componentD

@anthonydahanne
Copy link
Contributor

Hello!
Yes, that could work as well! Thanks!

@natalieparellano natalieparellano modified the milestones: 0.30.0, 0.31.0 Jul 5, 2023
@natalieparellano
Copy link
Member

natalieparellano commented Jul 10, 2023

@anthonydahanne could what you describe not be obtained with

my-composite
├─compositAB
  ├─componentA
  ├─componentB
├─componentC
├─componentD

And pack buildpack package --flatten --depth=1?

@anthonydahanne
Copy link
Contributor

anthonydahanne commented Jul 11, 2023

hello @natalieparellano , as discussed this PM, we (Java Paketo buildpacks) are not using depth, but have been using exclude, even if moving to include based selections, with several inclusions possible, would be preferred.

@jjbustamante jjbustamante modified the milestones: 0.31.0, 0.30.0 Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/triage Issue or PR that requires contributor attention. type/bug Issue that reports an unexpected behaviour.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@anthonydahanne @jjbustamante @natalieparellano and others