Commit 431ebfc
authored
feat: global wait (#669)
* test: dump output when testing
* test: assert stderr
* redact stderr too
* fix: redact full flag values including PEM, silence setup_file noise
* feat: global wait
* feat: wait should wait until all parent resources are AVAILABLE
* fix: capture from regional URLs too
* feat: --wait for delete too, better capture href
* bump default timeout 10min
* test: globalwait tests
* feat: rm old code, --wait-for-request and --wait-for-state just sets --wait
* fix: wrap each SDK client transport individually, add double-wrap guard
* fix: skip wait when command fails, surface re-render errors, defer SetRerendering
* fix: use strict UUID regex in looksLikeResourceID to avoid false positives
* fix: handle 401/403 in poll, check HTTP status in fetchJSON, use net/url for query params, include URL in errors, track firstSuccessfulPoll
* fix: add -t shorthand
* fix: no-state resources treated as ready, promote-volume manual check, remove -t global shorthand, update bats tests
* regen docs
* doc: add global --wait to changelog
* test: add --wait to tests
* fix: remove old per-command waitfor calls, globalwait handles all waiting
Only exception: server create --promote-volume keeps inline WaitForState
since it needs fresh server data before the command returns.
* fix: update help text to reference --wait instead of old flags
* fix: handle 429 rate limit, cache viper in transport, fix relative URLs, structured JSON progress
* doc: regen docs
* test: remove dead WaitForRequest/WaitForState error tests
These tested old per-command waiter error propagation which was removed.
Waiting is now handled by globalwait at the transport/post-command layer.
* fix: capture relative hrefs from response body for resource refetch
CloudAPI returns relative hrefs (e.g. /cloudapi/v6/datacenters/<uuid>).
BeforeRender was skipping these, causing FetchResource to use the wrong
URL (collection endpoint from transport) and get 404. buildFullURL
already handles resolving relative hrefs to absolute.
* fix: treat 404 as transient during create/update, terminal only for delete
Resources can temporarily return 404 during provisioning. Only treat
404 as "done" when the operation was a DELETE. Track HTTP method in
globalwait state from the capturing transport.
* deps: fix vulns 1.25
* fix: no-state resources treated as ready, skip JSON progress, validate format before suppressing output
* fix: poll request status before resource state, skip action endpoints, fix mongodb.bats
* fix: build resource URL from collection URL + id for APIs without href
* fix: use distinct progress messages for request vs state polling
* fix: single progress bar for all wait phases
* test: remove timeout flags
* refactor: extract poller struct to reduce parameter counts in polling functions
* fix: deprecated --wait flags not activating wait, action endpoint detection, missing contract header, silent 400 success
* fix: review
* rm: dead code
* doc: update changelog
* do not retry on 5xx
* test: cover test gaps
* fix: review comments
* wait for GET commands too
* refactor: fewer exported funcs
* test: fix mariadb and label teests
* test: reduce sleeps
* test: remove newline test
* fix: 400 for waiting on APIs without href
* preserve command state on FAILED, ERROR states
* feat: get should wait for DELETING resources too
* fix: waiting in interactive shell
* fix: server list --all
* doc: make docs
* test: fix postgres test
* fix: fallback to before --wait output if fail rerender. Fail command if both empty
* review: fix review issues
* refactor: promote-volume use new waiter
* refactor: struct Waiter
* remove waiting... from list as is no-op. add this mention to helptext
* action endpoints with no URL should just return
* warn on no location to wait on1 parent 37a5cb9 commit 431ebfc
712 files changed
Lines changed: 5222 additions & 5190 deletions
File tree
- commands
- compute
- applicationloadbalancer
- flowlog
- rule
- httprule
- backupunit
- datacenter
- firewallrule
- flowlog
- group
- image
- ipblock
- ipfailover
- k8s
- cluster
- nodepool
- lan
- node
- label
- lan
- loadbalancer
- nic
- natgateway
- flowlog
- lan
- rule
- networkloadbalancer
- flowlog
- rule
- target
- nic
- pcc
- request
- server
- cdrom
- volume
- snapshot
- targetgroup
- user
- volume
- waiter
- container-registry/token
- scopes
- dbaas
- mariadb/cluster
- mongo/cluster
- postgres-v2
- cluster
- waiter
- postgres
- waiter
- dns/record
- docs/subcommands
- Application-Load-Balancer
- flowlog
- rule
- httprule
- Authentication/token
- CDN/distribution
- routingrules
- CLI Setup
- Certificate-Manager
- autocertificate
- certificate
- provider
- Compute Engine
- contract
- datacenter
- firewallrule
- flowlog
- group
- resource
- user
- image
- ipblock
- ipconsumer
- ipfailover
- label
- get/by
- lan
- loadbalancer
- nic
- location
- cpu
- monitoring
- central
- key
- pipeline
- nic
- pcc
- peers
- request
- resource
- server
- cdrom
- console
- gpu
- token
- volume
- snapshot
- targetgroup
- target
- template
- volume
- Container-Registry
- artifacts
- registry
- repository
- token
- scope
- vulnerabilities
- DNS
- dnssec
- quota
- record
- reverse/record
- secondary/zone
- transfer
- zone
- file
- Database-as-a-Service
- In-Memory-DB
- replicaset
- snapshot
- restore
- mariadb
- backup
- cluster
- mongo
- api
- cluster
- logs
- snapshot
- templates
- user
- postgres
- api/version
- backup
- cluster
- backup
- database
- logs
- user
- v2
- backup
- location
- cluster
- version
- version
- Interactive Shell
- Kafka
- cluster
- topic
- user
- get
- Logging-Service
- central
- logs
- pipeline
- Managed-Backup
- get/sso
- Managed-Kubernetes
- cluster
- kubeconfig
- nodepool
- lan
- node
- version
- NAT-Gateway
- flowlog
- lan
- rule
- Network-Load-Balancer
- flowlog
- rule
- target
- Object-Storage
- bucket
- cors
- encryption
- lifecycle
- object/lock
- policy
- public/access/block
- tagging
- versioning
- object
- legal/hold
- retention
- tagging
- User-Management
- s3key
- VM Autoscaling
- action
- group
- server
- VPN Gateway
- ipsec
- gateway
- tunnel
- wireguard
- gateway
- peer
- internal
- client
- constants
- globalwait
- printer/table
- waitfor
- test/suites
- compute
- dbaas
- vpn
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
8 | 18 | | |
9 | 19 | | |
| 20 | + | |
| 21 | + | |
10 | 22 | | |
11 | 23 | | |
12 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
254 | 257 | | |
255 | 258 | | |
| 259 | + | |
| 260 | + | |
256 | 261 | | |
257 | 262 | | |
258 | 263 | | |
| |||
261 | 266 | | |
262 | 267 | | |
263 | 268 | | |
264 | | - | |
265 | | - | |
| 269 | + | |
| 270 | + | |
266 | 271 | | |
267 | 272 | | |
268 | | - | |
| 273 | + | |
269 | 274 | | |
270 | 275 | | |
271 | 276 | | |
| |||
300 | 305 | | |
301 | 306 | | |
302 | 307 | | |
303 | | - | |
| 308 | + | |
| 309 | + | |
304 | 310 | | |
305 | 311 | | |
306 | 312 | | |
| |||
Lines changed: 0 additions & 94 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | 220 | | |
254 | 221 | | |
255 | 222 | | |
| |||
322 | 289 | | |
323 | 290 | | |
324 | 291 | | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | 292 | | |
347 | 293 | | |
348 | 294 | | |
| |||
383 | 329 | | |
384 | 330 | | |
385 | 331 | | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | 332 | | |
409 | 333 | | |
410 | 334 | | |
| |||
504 | 428 | | |
505 | 429 | | |
506 | 430 | | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | 431 | | |
526 | 432 | | |
527 | 433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | | - | |
42 | | - | |
43 | 40 | | |
44 | 41 | | |
45 | 42 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
| 22 | + | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | | - | |
44 | | - | |
45 | 42 | | |
46 | 43 | | |
47 | 44 | | |
Lines changed: 0 additions & 62 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | 279 | | |
301 | 280 | | |
302 | 281 | | |
| |||
337 | 316 | | |
338 | 317 | | |
339 | 318 | | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | 319 | | |
363 | 320 | | |
364 | 321 | | |
| |||
446 | 403 | | |
447 | 404 | | |
448 | 405 | | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | 406 | | |
469 | 407 | | |
470 | 408 | | |
| |||
0 commit comments