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

Ensure init generates /-delimted paths #5177

Merged
merged 4 commits into from
Jan 15, 2021

Conversation

briandealwis
Copy link
Member

@briandealwis briandealwis commented Dec 21, 2020

Fixes: #5074

Description
Ensure paths are written using forward slashes during init. Adds a test for Windows.

The choice of where to maintain and use the workspace is a bit confusing.

  • Each builder provides an ArtifactConfig to capture a detected artifact (e.g., Jib).
  • Each ArtifactConfig implements an initializers/build.InitBuilder interface. The ArtifactType() method generates a config schema's ArtifactType with the appropriate per- builder information. This ArtifactType is contained with the artifact's workspace within the config schema's Artifact object.

For now I pass the workspace into the per-builder ArtifactConfig.ArtifactType(workspace) functions. It would seem to make sense for the workspace to be passed around within the per-builder ArtifactConfig objects, except that they don't actually generate the Artifact object. So we'd still need to swizzle the workspace when creating the corresponding Artifact objects.

But it might be worth having the ArtifactConfig objects be responsible for generating the Artifact object so that they could populate it with sync rules?

@codecov
Copy link

codecov bot commented Dec 22, 2020

Codecov Report

Merging #5177 (322fb32) into master (35214eb) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5177      +/-   ##
==========================================
+ Coverage   71.82%   71.88%   +0.05%     
==========================================
  Files         387      387              
  Lines       13928    13931       +3     
==========================================
+ Hits        10004    10014      +10     
+ Misses       3190     3187       -3     
+ Partials      734      730       -4     
Impacted Files Coverage Δ
pkg/skaffold/build/buildpacks/init.go 95.23% <ø> (ø)
pkg/skaffold/build/jib/init.go 87.50% <ø> (ø)
pkg/skaffold/initializer/analyze/analyze.go 86.20% <ø> (ø)
pkg/skaffold/initializer/build/builders.go 70.00% <ø> (ø)
pkg/skaffold/docker/docker_init.go 100.00% <100.00%> (ø)
pkg/skaffold/initializer/analyze/builder.go 100.00% <100.00%> (ø)
pkg/skaffold/initializer/build/resolve.go 79.16% <100.00%> (ø)
pkg/skaffold/initializer/build/util.go 100.00% <100.00%> (ø)
pkg/skaffold/docker/image.go 79.53% <0.00%> (+1.39%) ⬆️
pkg/skaffold/util/tar.go 56.00% <0.00%> (+5.33%) ⬆️

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 35214eb...322fb32. Read the comment docs.

@briandealwis briandealwis marked this pull request as ready for review January 5, 2021 14:56
@briandealwis briandealwis requested a review from nkubala January 5, 2021 14:56
@MarlonGamez
Copy link
Contributor

this LGTM, I can approve and merge once we get our ci issues resolved

@IsaacPD IsaacPD merged commit 36c95e4 into GoogleContainerTools:master Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

context directories with backslashes on Windows do not work
3 participants