Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

internal/server: Block on instance deployment becoming available #881

Merged
merged 6 commits into from
Dec 4, 2020

Conversation

briancain
Copy link
Member

This commit adds an extra optional timeout that blocks on having a
request returned when listing instances by deployment ID. The default
general case is to not block at all, but allows the caller to define an
optional timeout and block on a deployment ID existing before returning
the requested result.

This commit does not fully fix #683, as there are more complex CLI
changes required to leverage this server change.

This commit adds an extra _optional_ timeout that blocks on having a
request returned when listing instances by deployment ID. The default
general case is to not block at all, but allows the caller to define an
optional timeout and block on a deployment ID existing before returning
the requested result.
Copy link
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

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

Looks great! All my comments are super nitpicky or small Go idioms. The core logic is right.

This should be testable so I think we should get a test in here. I can help pair with you on that cause I think it'll be a little sneaky. 😄

internal/server/singleprocess/service_instance.go Outdated Show resolved Hide resolved
internal/server/singleprocess/service_instance.go Outdated Show resolved Hide resolved
internal/server/singleprocess/service_instance.go Outdated Show resolved Hide resolved
internal/server/singleprocess/service_instance_test.go Outdated Show resolved Hide resolved
internal/server/proto/server.proto Outdated Show resolved Hide resolved
@briancain
Copy link
Member Author

@mitchellh yeah, def agree we need a proper test. I wasn't 100% sure how to go about it so I'd love to pair! We can coordinate on slack

Copy link
Contributor

@krantzinator krantzinator left a comment

Choose a reason for hiding this comment

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

nice! 🌮

@briancain briancain merged commit 63a66c1 into main Dec 4, 2020
@briancain briancain deleted the gh683/warning-for-slow-connectively-to-server branch December 4, 2020 22:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect workload connectivity to server during up and deploy
3 participants