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

Preserve dc_resource state between docker_compose calls #5561

Merged
merged 2 commits into from
Mar 4, 2022

Conversation

nicksieger
Copy link
Member

  • tiltfile: preserve dc_resource state
  • chore: updated go mod vendor changes

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

svc.TriggerMode = previousSvc.TriggerMode
svc.resourceDeps = previousSvc.resourceDeps
svc.Labels = previousSvc.Labels
svc.Links = previousSvc.Links
Copy link
Member

Choose a reason for hiding this comment

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

We also need svc.imageRefFromUser here.

It's probably worth a comment on this block and in dc_resource indicating they need to be kept in sync.

Or, if you wanna get fancy, you could do what we do with k8s_resource: make a struct that just has the dc_resource args and store them separately from the DC config parse results and combine everything at the end of tiltfile execution.

@lianmakesthings
Copy link

Tested locally and seems to solve the issue #5558

@nicksieger
Copy link
Member Author

I started on some changes to do what Matt is suggesting, but I'll add them in a follow-up PR to not block the release today.

@nicksieger nicksieger merged commit 5e63bc7 into master Mar 4, 2022
@nicksieger nicksieger deleted the nicksieger/5558 branch March 4, 2022 18:27
nicksieger added a commit that referenced this pull request Mar 4, 2022
Follow-up to #5561 that extracts options separate from DC services, so that
dc_resource state is more easily preserved across docker_compose calls.
nicksieger added a commit that referenced this pull request Mar 7, 2022
* tiltfile: extract dcResourceOptions

Follow-up to #5561 that extracts options separate from DC services, so that
dc_resource state is more easily preserved across docker_compose calls.

* tiltfile: combine previous+current links, labels, and resource deps
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.

Labelling not working correctly for multiple separate docker_compose deployments
3 participants