Retry Mechanism for Package, DNS and Command Tests#1037
Conversation
|
@aelsabbahy Could you help merge this pr? This is imperative for our testing env |
…ry count and delay
Added retry for command executions
|
I've hit the workflow-approve button for the github actions, but Travis is still a required check and I cannot address its not running. Please would you add some test-coverage to exercise this code-path? Retries as a feature can become quite fiddly because the feature tends to grow as people decide they want also "exponential back-off" "... with jitter" "... conditional on x" and so on - is there a best-of-breed golang library that might be used instead of a bespoke implementation that this contribution begins? My thought is longer-tail support would be reduced if so, and the testing burden I'm asking for would probably be reduced were a library used instead of something bespoke. Also, what do you think about making the delay interval units be milliseconds to support finer-grained intervals than seconds - or is this not a concern as the input will accept floats like |
|
Thanks @petemounce, these are helpful suggestions. I’ve added focused test coverage for the retry path. The new tests cover On the implementation approach: I kept it in-tree for now rather than adding a retry dependency. The current behavior is still fixed-attempt/fixed-delay only, so I consolidated the retry logic into a shared helper to reduce duplication. If the project would strongly prefer a library here, I’m happy to revisit that. On delay units: I updated I don’t think I can address the Travis required check issue from the fork side; it looks like repository side required check configuration rather than a failing code path in the PR. |
Checklist
make test-all(UNIX) passes. CI will also test thisDescription of change
Added retry mechanism for package/DNS/command testing. Details are mentioned in issue #1034. The goss file syntax will be the following:
📚 Documentation preview 📚: https://goss--1037.org.readthedocs.build/en/1037/