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

tiltfile: add a force_parallel option for local_resource #3693

Merged
merged 1 commit into from Aug 13, 2020
Merged

Conversation

nicks
Copy link
Member

@nicks nicks commented Aug 12, 2020

Hello @landism,

Please review the following commits I made in branch nicks/ch8725:

12499b4 (2020-08-12 17:45:22 -0400)
tiltfile: add a force_parallel option for local_resource

Code review reminders, by giving a LGTM you attest that:

  • Commits are adequately tested
  • Code is easy to understand and conforms to style guides
  • Incomplete code is marked with TODOs
  • Code is suitably instrumented with logging and metrics

@nicks nicks requested a review from landism August 12, 2020 21:45
@nicks nicks force-pushed the nicks/ch8725 branch 2 times, most recently from 6ebd8c1 to c7d859c Compare August 12, 2020 22:45
internal/tiltfile/local_resource.go Outdated Show resolved Hide resolved
pkg/model/local_target.go Outdated Show resolved Hide resolved
pkg/model/local_target.go Outdated Show resolved Hide resolved
@@ -21,7 +21,7 @@ func NextTargetToBuild(state store.EngineState) *store.ManifestTarget {

// Local targets aren't parallelizable with any other kind of target.
// So if we're already building a local target, bail immediately.
if IsBuildingLocalTarget(state) {
if IsBuildingUnparallelizableLocalTarget(state) {
Copy link
Member

Choose a reason for hiding this comment

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

unless I've misunderstood the intent of this PR, we also need to change the RemoveLocalTargets bit a few lines down

Copy link
Member Author

Choose a reason for hiding this comment

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

oooh good catch! fixed and added a test

@nicks nicks force-pushed the nicks/ch8725 branch 2 times, most recently from eb89e22 to 0804ecb Compare August 13, 2020 20:30
Copy link
Member

@landism landism left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines 30 to 31
// Some local targets aren't parallelizable with any other kind of target.
// So if we're already building any targets, remove all the local ones.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Some local targets aren't parallelizable with any other kind of target.
// So if we're already building any targets, remove all the local ones.
// Some local targets aren't parallelizable with any other kind of target.

just since "all the local ones" is no longer accurate, a better wording doesn't come immediately to mind, and the function name does a pretty good job of communicating this anyway, might as well delete this second line

Copy link
Member Author

Choose a reason for hiding this comment

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

reworded a bit

@nicks nicks merged commit 5ed892f into master Aug 13, 2020
@nicks nicks deleted the nicks/ch8725 branch August 13, 2020 21:59
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.

None yet

2 participants