Add support for multiple upgrade artifact source URIs - #7682
Conversation
| description: An ordered list of sources for the upgrade artifact. | ||
| type: array | ||
| items: | ||
| type: string |
There was a problem hiding this comment.
Currently, this array is unbounded. A client could send thousands of sources and eat up memory in Fleet Server unnecessarily. Consider setting a practical limit like, IDK, 20?
ycombinator
left a comment
There was a problem hiding this comment.
Could we add a test case for where neither sources nor source_uri is set?
ycombinator
left a comment
There was a problem hiding this comment.
Also, this is more of a naming nit, but would source_uris be more consistent than sources?
cfd892e to
2eeb96d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I picked sources because the naming for sourceURI vs actual sourceURI was colliding in downloadArtifact before with the old name, since it's technically the base path/base URI. |
2eeb96d to
5867445
Compare
5867445 to
104cc1d
Compare
TL;DRAll three failed Buildkite jobs are caused by the same deterministic unit-test regression in this PR: Remediation
Investigation detailsRoot Cause
Code path: The new test case in this PR expects defaults even when input is only
That expectation conflicts with actual output and fails assertion at:
Evidence
Verification
Follow-up
What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
What is the problem this PR solves?
Currently, only one source for upgrade artifacts can be specified, meaning upgrades fail if that source is down.
How does this PR solve the problem?
Adds support for sending multiple upgrade artifact source URIs in an upgrade action with a new sources that deprecates source_uri. Backwards compatibility is maintained.
Design Checklist
I have ensured my design is stateless and will work when multiple fleet-server instances are behind a load balancer.I have or intend to scale test my changes, ensuring it will work reliably with 100K+ agents connected.I have included fail safe mechanisms to limit the load on fleet-server: rate limiting, circuit breakers, caching, load shedding, etc.Checklist
I have commented my code, particularly in hard-to-understand areasI have made corresponding changes to the documentationI have made corresponding change to the default configuration files./changelog/fragmentsusing the changelog toolRelated issues