Skip to content

chore: add lock to jib cache lookup#8850

Merged
ericzzzzzzz merged 1 commit intoGoogleContainerTools:mainfrom
ericzzzzzzz:cache-lookup-concurrency
Jun 7, 2023
Merged

chore: add lock to jib cache lookup#8850
ericzzzzzzz merged 1 commit intoGoogleContainerTools:mainfrom
ericzzzzzzz:cache-lookup-concurrency

Conversation

@ericzzzzzzz
Copy link
Copy Markdown
Contributor

@ericzzzzzzz ericzzzzzzz commented Jun 5, 2023

#7409

Descriptions:

  • add lock for jib cache lookup as it will trigger mvn/gradle command to download deps, running those command concurrently can lead errors, the task may use deps which are still in downloading state this will end up skaffold command fail.
  • Was thinking different approaches to solve this problem
    • align cache lookup concurrency with build concurrency
      • Not ideal, as for other builders, users may still don't want to limit the concurrency for building
      • Even so, the only option to fix the issue is probably set the concurrency to 1
    • add other flag to control concurrent lookup
      • This seems quite over-engineering and not easy-to-use, users may have to run skaffold command with different arguments from different sessions
  • Although, locking this can hurt the performance issue, runs other than the first run should be relative fast as the downloading won't need to happen.

Test Plan

@ericzzzzzzz ericzzzzzzz marked this pull request as ready for review June 7, 2023 14:46
@ericzzzzzzz ericzzzzzzz requested a review from a team as a code owner June 7, 2023 14:46
@ericzzzzzzz ericzzzzzzz requested review from aaron-prindle and removed request for aaron-prindle June 7, 2023 14:46
@ericzzzzzzz ericzzzzzzz merged commit 7e789b2 into GoogleContainerTools:main Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants