Skip to content

Use unique key for jib caches#3483

Merged
loosebazooka merged 1 commit intomasterfrom
use-unique-key-jib
Jan 9, 2020
Merged

Use unique key for jib caches#3483
loosebazooka merged 1 commit intomasterfrom
use-unique-key-jib

Conversation

@loosebazooka
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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