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

Validate mixins #639

Closed
wants to merge 18 commits into from
Closed

Validate mixins #639

wants to merge 18 commits into from

Conversation

natalieparellano
Copy link
Member

@natalieparellano natalieparellano commented Jun 15, 2021

Resolves #578

Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
@natalieparellano
Copy link
Member Author

If you set aside the platform -> common changes (which I’m not in love with, because things like platform.LayersMetadata read better than common.LayersMetadata) the most substantive changes are -

detector.go - MixinValidator interface
platform/common/analyzed.go - moved structs for analyzed.toml here, added AnalyzedMetadata and AnalyzedMetadataBuilder interfaces
platform/pre06/analyzed.go - lots of boilerplate code to implement DecodeAnalyzedMetadataFile and NewAnalyzedMetadataBuilder
platform/v07/analyzed.go - more boilerplate for the new api
platform/common/exit.go - moved codes here to avoid circular dependency
stack.go & stack_test.go - stack validation logic

I actually like how the code reads. My main concern is that it's an awful lot of code to write (for just analyzed.toml). I would love to hear what others think.

Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
@natalieparellano
Copy link
Member Author

Received some good feedback in sub team sync - will take a stab at making this simpler.

Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
@natalieparellano
Copy link
Member Author

Given that this validation is no longer needed, I'm going to close this PR.

@natalieparellano natalieparellano deleted the validate-mixins branch March 30, 2022 21:03
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.

[Detect] Fail fast if buildpack.toml mixins are not satisfied by stack
1 participant