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

Use unique key for jib caches #3483

Merged
merged 1 commit into from
Jan 9, 2020
Merged

Use unique key for jib caches #3483

merged 1 commit into from
Jan 9, 2020

Conversation

loosebazooka
Copy link
Member

If two jib projects had clashing Project fields (even empty), they would trigger refreshing dependencies on every cycle of the skaffold dev loop. This creates a projectKey from the workspace and the project and uses it as the key.

While nothing was broken before, this provides the functionality we actually expected.

@codecov
Copy link

codecov bot commented Jan 8, 2020

Codecov Report

Merging #3483 into master will increase coverage by 0.28%.
The diff coverage is 77.77%.

Impacted Files Coverage Δ
pkg/skaffold/build/jib/maven.go 100% <100%> (ø) ⬆️
pkg/skaffold/build/jib/gradle.go 100% <100%> (ø) ⬆️
pkg/skaffold/build/jib/jib.go 72.79% <71.42%> (+0.4%) ⬆️
pkg/skaffold/deploy/kustomize.go 73.75% <0%> (-2.86%) ⬇️
pkg/skaffold/generate_pipeline/profile.go 32.87% <0%> (-2.65%) ⬇️
pkg/skaffold/build/cluster/sources/gcs.go
pkg/skaffold/schema/defaults/defaults.go 94.15% <0%> (+0.17%) ⬆️
...affold/kubernetes/portforward/kubectl_forwarder.go 68.29% <0%> (+2.43%) ⬆️
pkg/skaffold/build/cluster/sources/sources.go 95.32% <0%> (+3.43%) ⬆️
pkg/skaffold/util/tar.go 57.47% <0%> (+4.59%) ⬆️
... and 1 more

@chanseokoh
Copy link
Member

FTR: #3369 (comment) and #3369 (comment)

type projectKey string

func getProjectKey(workspace string, a *latest.JibArtifact) projectKey {
return projectKey(workspace + "+" + a.Project)
Copy link
Member

Choose a reason for hiding this comment

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

As discussed, the fix in this PR make sense. I'll just let other Go folks to approve this particular implementation.

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.

4 participants