Skip to content

Docs for wrangler secret bulk env support#19056

Merged
Ankcorn merged 2 commits intoproductionfrom
thomas/env-secrets-bulk
Feb 3, 2025
Merged

Docs for wrangler secret bulk env support#19056
Ankcorn merged 2 commits intoproductionfrom
thomas/env-secrets-bulk

Conversation

@Ankcorn
Copy link
Copy Markdown
Member

@Ankcorn Ankcorn commented Jan 7, 2025

Summary

Updating wrangler command docs

Screenshots (optional)

Documentation checklist

@Ankcorn Ankcorn requested review from a team, ToriLindsay and irvinebroque as code owners January 7, 2025 18:24
Copy link
Copy Markdown
Contributor

@hyperlint-ai-deprecated hyperlint-ai-deprecated Bot left a comment

Choose a reason for hiding this comment

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

1 files reviewed, 1 total issue(s) found.

Comment thread src/content/docs/workers/wrangler/commands.mdx
@Ankcorn Ankcorn force-pushed the thomas/env-secrets-bulk branch from f118188 to 9a08e00 Compare January 7, 2025 18:26
@github-actions github-actions Bot added size/xs product:workers Related to Workers product labels Jan 7, 2025
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

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

View logs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 7, 2025

- `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`.
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.

@Ankcorn Ankcorn merged commit 9d833a4 into production Feb 3, 2025
@Ankcorn Ankcorn deleted the thomas/env-secrets-bulk branch February 3, 2025 15:34
Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

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

Review: R2 SQL approximate aggregation functions

Fixes applied

  1. 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.

  2. Fixed APPROX_TOP_K JSON 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"}`.

  3. Removed redundant changelog frontmatter: Dropped products: [r2-sql] (the schema auto-associates the entry with the parent folder product) and hidden: 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:

    1. 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").

    2. APPROX_TOP_K with WHERE would be useful. The docs note that APPROX_TOP_K supports WHERE filters but does not support GROUP BY. An example showing APPROX_TOP_K with a WHERE clause would demonstrate the supported filtering pattern and guide users away from trying GROUP BY with it.

    3. Consider adding an APPROX_DISTINCT example with HAVING. The existing standard aggregation section shows HAVING with COUNT(*) and SUM. Showing HAVING approx_distinct(column) > N (if supported) would be a natural extension — or explicitly noting it is unsupported would save users trial-and-error.

    4. The "Invalid" examples at the bottom are a great pattern. Consider adding one more: APPROX_TOP_K with GROUP BY (since the docs explicitly call out this limitation).

Minor style nit:

  • The APPROX_TOP_K description 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.

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

Labels

product:workers Related to Workers product size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants