Skip to content

Send the Cloud Armor CI header from the v2 tests - #250

Closed
amarcozzi wants to merge 1 commit into
mainfrom
ci-armor-header
Closed

amarcozzi wants to merge 1 commit into
mainfrom
ci-armor-header

Conversation

@amarcozzi

Copy link
Copy Markdown
Contributor

What changes

Since v0.25.0 the v2 tests reach https://api.fastfuels.silvxlabs.com, so CI's requests now count against Cloud Armor's 600 requests/min per-IP throttle. The throttle is in preview today; once it's enforced, a busy run could get 429s.

  • tests/v2/utils.py: install_skip_dispatch_client now adds X-FastFuels-CI to both test clients: the default one, which also carries the skip-dispatch header, and the real-dispatch one. The value comes from FASTFUELS_CI_BYPASS, which Armor's priority-1000 rule exempts from the throttle. When the variable is unset, no header is sent, so local runs and fork PRs are unchanged.
  • tests_main.yml: the v2 test job passes secrets.FASTFUELS_CI_BYPASS.

v1 tests aren't changed. They run only when v1 code changes, and their volume is far below the limit.

Before merging

Add the repo secret FASTFUELS_CI_BYPASS, with the same value as FastFuels-API-v2's, from terraform output -raw ci_bypass_header_value in FastFuels-IaC stacks/edge.

Verification

With dummy values, the default client sends X-FastFuels-CI and X-FastFuels-Skip-Dispatch, the real-dispatch client sends X-FastFuels-CI, and with no secret only the skip-dispatch header is sent.

Since v0.25.0 the v2 tests reach the API through the load balancer, so
they count against Cloud Armor's per-IP throttle. The test client now sends
X-FastFuels-CI from FASTFUELS_CI_BYPASS, which Armor exempts.
@amarcozzi

Copy link
Copy Markdown
Contributor Author

Not needed: Cloud Armor no longer exempts CI by header. The per-IP throttle moves to 1000/min, above CI's peak (silvxlabs/FastFuels-IaC#26), so the v2 tests need no header or secret.

@amarcozzi amarcozzi closed this Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant