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

Add support for platform API 0.6 #796

Closed
wants to merge 1 commit into from

Conversation

sambhav
Copy link
Contributor

@sambhav sambhav commented Aug 11, 2021

Fixes #767

@codecov-commenter
Copy link

Codecov Report

Merging #796 (120b267) into main (00ea813) will decrease coverage by 0.10%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #796      +/-   ##
==========================================
- Coverage   71.35%   71.25%   -0.11%     
==========================================
  Files         117      117              
  Lines        5412     5420       +8     
==========================================
  Hits         3862     3862              
- Misses       1183     1189       +6     
- Partials      367      369       +2     
Impacted Files Coverage Δ
pkg/cnb/builder_builder.go 84.07% <ø> (ø)
pkg/apis/build/v1alpha1/build_pod.go 97.08% <50.00%> (-0.82%) ⬇️
pkg/apis/build/v1alpha2/build_pod.go 97.08% <50.00%> (-0.82%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 00ea813...120b267. Read the comment docs.

@@ -760,10 +766,10 @@ func (b *Build) setupBindings() ([]corev1.Volume, []corev1.VolumeMount) {

func (bc *BuildPodBuilderConfig) highestSupportedPlatformAPI(b *Build) (string, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we instead have this method return a parsed platform api?

@@ -390,12 +391,17 @@ func (b *Build) BuildPod(images BuildPodImages, secrets []corev1.Secret, taints
"-project-metadata=/layers/project-metadata.toml"},
cacheArgs,
func() []string {
if platformAPI == "0.3" {
platformAPIVersion := semver.MustParse(platformAPI)
Copy link
Collaborator

Choose a reason for hiding this comment

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

A bit concerned about the "MustParse" here a bad builder with an invalid metadata could lead to a panic.

@sambhav sambhav closed this Aug 25, 2021
@sambhav sambhav deleted the platform/0.6 branch August 25, 2021 20:39
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.

Support platform api 0.6
5 participants