data_source_device: port wait_for to plugin framework#678
data_source_device: port wait_for to plugin framework#678neinkeinkaffee merged 3 commits intomainfrom
Conversation
a3d8fd8 to
ed0d2e4
Compare
c675fc0 to
b65e061
Compare
b65e061 to
57a6673
Compare
| }, | ||
| }) | ||
| } | ||
|
|
There was a problem hiding this comment.
This unit test is tied to the unexported retryWithDeadline function and might not be worth keeping as long as we're fine with testing the retry logic in the device data source's unit test.
There was a problem hiding this comment.
I think we could also move retryWithDeadline directly into the device data source code alternatively since this is very specific to our device registration flow (and only used for the device data source) vs. a more generic retry mechanism at the moment.
57a6673 to
35977ce
Compare
| } | ||
|
|
||
| if len(devices) == 0 { | ||
| return errors.New("could not find device with" + filterDesc) |
There was a problem hiding this comment.
Nit: should add a space here to make this more readable:
| return errors.New("could not find device with" + filterDesc) | |
| return errors.New("could not find device with " + filterDesc) |
mpminardi
left a comment
There was a problem hiding this comment.
Apologies, my PR that adjusted one of the error messages in the device data source is now causing a conflict here (and the error source has been removed entirely now 🙈 ).
This adds the retry logic for the device datasource reads which had been missed in the initial migration. Updates tailscale.com/corp#37224 Signed-off-by: Gesa Stupperich <gesa@tailscale.com>
Updates tailscale.com/corp#37224 Signed-off-by: Gesa Stupperich <gesa@tailscale.com>
This is better to test against regressions during future refactorings than testing the retry logic itself which is an implementation detail. Updates tailscale.com/corp#37224 Signed-off-by: Gesa Stupperich <gesa@tailscale.com>
35977ce to
2d8760e
Compare
This adds the retry logic for the device datasource reads which had been missed in the initial migration. It also moves to using filter parameters in the request instead of filtering the response.
Updates tailscale/corp#37224
Terraform acceptance test: https://github.com/tailscale/corp/actions/runs/24337213200/job/71057801192