Docs for wrangler secret bulk env support#19056
Conversation
f118188 to
9a08e00
Compare
Deploying cloudflare-docs with
|
| Latest commit: |
5539d6c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a6663319.cloudflare-docs-7ou.pages.dev |
| Branch Preview URL: | https://thomas-env-secrets-bulk.cloudflare-docs-7ou.pages.dev |
|
Files with changes (up to 15)
|
| - `FILENAME` <Type text="string" /> <MetaInfo text="optional" /> | ||
| - A file containing either [JSON](https://www.json.org/json-en.html) or the [.env](https://www.dotenv.org/docs/security/env) format | ||
| - The JSON file containing key-value pairs to upload as secrets, in the form `{"SECRET_NAME": "secret value", ...}`. | ||
| - The `.env` file containing key-value pairs to upload as secrets, in the form `SECRET_NAME=secret value`. |
There was a problem hiding this comment.
Could you add a link to .dev.vars here? https://developers.cloudflare.com/workers/configuration/secrets/#local-development-with-secrets
There was a problem hiding this comment.
Review: R2 SQL approximate aggregation functions
Fixes applied
-
Reverted broken
COUNT(*)escape (sql-reference.mdx:107): The PR changed**COUNT(*)**to**COUNT(\*)**. The original was rendering correctly —*inside parentheses is not ambiguous to the MDX bold parser. The backslash would have rendered as a visible\character in prose. Reverted to the original. -
Fixed
APPROX_TOP_KJSON description (sql-reference.mdx:164):\{"value", "count"\}uses backslash escaping which renders the backslashes literally in MDX. Since this text is already inside backticks, the braces are safe — changed to`{"value", "count"}`. -
Removed redundant changelog frontmatter: Dropped
products: [r2-sql](the schema auto-associates the entry with the parent folder product) andhidden: false(the default).
SQL examples — validity review
All SQL examples are syntactically valid. No issues found with:
- Function signatures and parameter ordering
- GROUP BY / WHERE clause placement
- Use of standard + approximate functions together
- Invalid-example comments (percentile out of range, k=0)
Suggestions for the author
Changelog:
- The changelog is well-structured and reads clearly. The examples are a good subset of the reference examples without being redundant. One minor note: the opening paragraph says "trade minor precision" — consider "trade minor precision loss" for clarity (matching the SQL reference wording).
SQL reference — examples exhaustiveness:
-
The examples are solid and cover the main function signatures well. A few suggestions to strengthen real-world guidance:
-
APPROX_PERCENTILE_CONT_WITH_WEIGHT deserves a more motivating example. The current example
(unit_price, quantity, 0.5)is fine syntactically, but adding a brief comment explaining when you would use a weighted percentile vs. a regular one would help users understand the use case (e.g., "weighted median price where each sale contributes proportionally to quantity sold"). -
APPROX_TOP_K with WHERE would be useful. The docs note that
APPROX_TOP_KsupportsWHEREfilters but does not supportGROUP BY. An example showingAPPROX_TOP_Kwith aWHEREclause would demonstrate the supported filtering pattern and guide users away from tryingGROUP BYwith it. -
Consider adding an APPROX_DISTINCT example with HAVING. The existing standard aggregation section shows
HAVINGwithCOUNT(*)andSUM. ShowingHAVING approx_distinct(column) > N(if supported) would be a natural extension — or explicitly noting it is unsupported would save users trial-and-error. -
The "Invalid" examples at the bottom are a great pattern. Consider adding one more:
APPROX_TOP_KwithGROUP BY(since the docs explicitly call out this limitation).
-
Minor style nit:
- The
APPROX_TOP_Kdescription says it "Works on string columns" — is this strictly true? If it also works on integer columns (top-k by frequency of integer values), the type restriction should be verified with the engineering team before shipping.
Summary
Updating wrangler command docs
Screenshots (optional)
Documentation checklist