-
Notifications
You must be signed in to change notification settings - Fork 106
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
Detector changes for run image extension #1011
Conversation
- The logic to update the default path for TOML files was repeated across phases - In general it is safe to provide default values for inputs that might not be relevant to the current phase, as these will be ignored when constructing a new service for the phase; e.g., platform.LifecycleInputs.OrderPath will be ignored when constructing a lifecycle.Exporter - As more inputs are shared across phases (e.g., analyzed.toml is now an input to the detect phase), duplicating the logic for providing default values is becoming more cumbersome Signed-off-by: Natalie Arellano <[email protected]>
Signed-off-by: Natalie Arellano <[email protected]>
…= 0.10 Signed-off-by: Natalie Arellano <[email protected]>
Signed-off-by: Natalie Arellano <[email protected]>
…kage Signed-off-by: Natalie Arellano <[email protected]>
Signed-off-by: Natalie Arellano <[email protected]>
… the platform spec Signed-off-by: Natalie Arellano <[email protected]>
…mage.extend = <true or false, default false> Signed-off-by: Natalie Arellano <[email protected]>
Signed-off-by: Natalie Arellano <[email protected]>
… should fail if the selected base image is not found in run.toml. Signed-off-by: Natalie Arellano <[email protected]>
Signed-off-by: Natalie Arellano <[email protected]>
Signed-off-by: Natalie Arellano <[email protected]>
This is ready for feedback but we can block merging on #994 |
Signed-off-by: Natalie Arellano <[email protected]>
Signed-off-by: Natalie Arellano <[email protected]>
The exporter acceptance failure is mystifying me... |
cli.FlagLayersDir(&d.LayersDir) | ||
cli.FlagPlanPath(&d.PlanPath) | ||
cli.FlagPlatformDir(&d.PlatformDir) | ||
cli.FlagBuildConfigDir(&d.BuildConfigDir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated bug, this should only be valid for newer platforms
We pluralize all other list elements Signed-off-by: Natalie Arellano <[email protected]>
type TargetMetadata struct { | ||
buildpack.TargetPartial | ||
Distribution *buildpack.DistributionMetadata `json:"distribution,omitempty" toml:"distribution,omitempty"` | ||
} | ||
|
||
// Satisfies treats optional fields (ArchVariant and Distributions) as wildcards if empty, returns true if | ||
func (t *TargetMetadata) IsSatisfiedBy(o *buildpack.TargetMetadata) bool { | ||
if t.Arch != o.Arch || t.OS != o.OS { | ||
return false | ||
} | ||
if t.ArchVariant != "" && o.ArchVariant != "" && t.ArchVariant != o.ArchVariant { | ||
return false | ||
} | ||
|
||
// if either of the lengths of Distributions are zero, treat it as a wildcard. | ||
if t.Distribution != nil && len(o.Distributions) > 0 { | ||
// this could be more efficient but the lists are probably short... | ||
found := false | ||
for _, odist := range o.Distributions { | ||
if t.Distribution.Name == odist.Name && t.Distribution.Version == odist.Version { | ||
found = true | ||
continue | ||
} | ||
} | ||
if !found { | ||
return false | ||
} | ||
} | ||
return true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied from further down in the file
Signed-off-by: Natalie Arellano <[email protected]>
Signed-off-by: Natalie Arellano <[email protected]>
Fixes #996