Skip to content

[scripts] Add runtime settings editor#3812

Open
sjchmiela wants to merge 1 commit into
mainfrom
stanley/edit-runtime-settings
Open

[scripts] Add runtime settings editor#3812
sjchmiela wants to merge 1 commit into
mainfrom
stanley/edit-runtime-settings

Conversation

@sjchmiela
Copy link
Copy Markdown
Contributor

@sjchmiela sjchmiela commented May 30, 2026

I want us to move off of killswitches in Redis coming from workflow-orchestration towards fetching killswitches from a simple JSON file.

I picked GCS over R2 because it lets us make objects fully public (no Authorization required) and I (Stanley) found no way to achieve the same thing with R2.

This pull request adds a script scripts/edit-runtime-settings staging | production that is going to let us edit the file.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.46%. Comparing base (2c1837f) to head (4930081).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3812   +/-   ##
=======================================
  Coverage   57.46%   57.46%           
=======================================
  Files         911      911           
  Lines       39480    39480           
  Branches     8271     8271           
=======================================
  Hits        22684    22684           
  Misses      15328    15328           
  Partials     1468     1468           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sjchmiela sjchmiela added the no changelog PR that doesn't require a changelog entry label May 30, 2026
@sjchmiela sjchmiela force-pushed the stanley/edit-runtime-settings branch from 4d34a71 to daa24d9 Compare May 30, 2026 15:00
@sjchmiela sjchmiela force-pushed the stanley/edit-runtime-settings branch from daa24d9 to 4930081 Compare May 30, 2026 15:04
@github-actions
Copy link
Copy Markdown

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

@sjchmiela sjchmiela marked this pull request as ready for review May 30, 2026 15:04
@sjchmiela sjchmiela requested a review from AbbanMustafa May 30, 2026 15:04
@github-actions
Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

Comment on lines +61 to +65
gsutil \
-h "Cache-Control:${cache_control}" \
-h "Content-Type:application/json" \
cp "$minified_tmpfile" "$object_uri"
gsutil acl ch -u AllUsers:R "$object_uri"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its possible we fail after cp and the object remains private. I think we can just do gsutil cp -a public-read ...

exit 1
fi

for tool in gsutil jq; do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this on the gsutil docs

Important: gsutil is not the recommended CLI for Cloud Storage. Use gcloud storage commands in the Google Cloud CLI instead.

cp "$minified_tmpfile" "$object_uri"
gsutil acl ch -u AllUsers:R "$object_uri"

curl -fsSL "$object_url" >"$downloaded_tmpfile"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can also do

Suggested change
curl -fsSL "$object_url" >"$downloaded_tmpfile"
gcloud storage cat "$object_uri" >"$downloaded_tmpfile"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PR that doesn't require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants