Skip to content

[#2739] Renamed 'upload-db-s3' to 'push-db-s3' and aligned tooling and playground script names.#2740

Merged
AlexSkrypnyk merged 4 commits into
mainfrom
feature/2739-rename-s3-upload
Jun 26, 2026
Merged

[#2739] Renamed 'upload-db-s3' to 'push-db-s3' and aligned tooling and playground script names.#2740
AlexSkrypnyk merged 4 commits into
mainfrom
feature/2739-rename-s3-upload

Conversation

@AlexSkrypnyk

@AlexSkrypnyk AlexSkrypnyk commented Jun 26, 2026

Copy link
Copy Markdown
Member

Closes #2739

Summary

Renamed the upload-db-s3 tooling script to push-db-s3 (and all VORTEX_UPLOAD_DB_S3_* variables to VORTEX_PUSH_DB_S3_*) to fit the fetch-* (in) / push-* (out) verb taxonomy, sitting beside fetch-db-s3 and push-db-image. Renamed all 12 manual playground scripts to mirror the tooling script each one exercises (e.g. try-slack-notification.shtry-notify-slack.sh, try-s3-upload.shtry-push-db-s3.sh). Hardened pre-existing issues in the playground scripts and the shipped push-db-s3 script.

Changes

Rename: upload-db-s3push-db-s3

  • Renamed .vortex/tooling/src/upload-db-s3 to push-db-s3.
  • Renamed .vortex/tooling/tests/unit/upload-db-s3.bats to push-db-s3.bats.
  • Renamed all VORTEX_UPLOAD_DB_S3_* environment variables to VORTEX_PUSH_DB_S3_* throughout the script and its BATS tests.

Playground script naming convention

Renamed all 12 manual playground scripts to match the tooling script each one exercises:

  • try-email-notification.shtry-notify-email.sh
  • try-github-notification.shtry-notify-github.sh
  • try-jira-notification.shtry-notify-jira.sh
  • try-newrelic-notification.shtry-notify-newrelic.sh
  • try-slack-notification.shtry-notify-slack.sh
  • try-webhook-notification.shtry-notify-webhook.sh
  • try-s3-fetch.shtry-fetch-db-s3.sh
  • try-s3-upload.shtry-push-db-s3.sh
  • try-github-auth.shtry-notify-github-auth.sh
  • try-github-cleanup.shtry-notify-github-cleanup.sh
  • try-jira-auth.shtry-notify-jira-auth.sh
  • try-newrelic-auth.shtry-notify-newrelic-auth.sh

Updated the playground README.md and each script's internal usage references to reflect the new names.

Playground script hardening

Addressed pre-existing issues in the manual playground scripts:

  • Stopped printing credential previews (tokens, API keys, webhook URLs) to stdout.
  • Made scenario arguments fail fast on unknown values instead of silently falling through.
  • Required an explicit email recipient argument (no implicit default).
  • Captured API responses in named variables instead of predictable /tmp files.
  • Enabled set -x only after credentials are exported so secrets are never traced.
  • Validated the GitHub deployments response shape before dereferencing it.
  • Removed dead code.

Shipped src/push-db-s3 hardening

Addressed pre-existing issues in the shipped tooling script:

  • Enabled pipefail so pipe failures surface correctly.
  • Deferred set -x until after the S3 signed request is built so credentials are never traced (consistent with the xtrace guard added to push-db-image in a previous cycle).
  • Added --connect-timeout and --max-time to the curl call with transport-error handling.
  • URL-encoded the S3 object key used for HMAC signing and for the request URL.

Note: the pipefail, xtrace guard, curl timeouts, and key-encoding patterns applied here to push-db-s3 should propagate to the sibling fetch-db-* and notify-* tooling scripts in a follow-up, as they share the same patterns.

Screenshots

N/A

Before / After

Before                                    After
─────────────────────────────────────     ─────────────────────────────────────
src/upload-db-s3                          src/push-db-s3
  VORTEX_UPLOAD_DB_S3_*                     VORTEX_PUSH_DB_S3_*
  no pipefail                               pipefail enabled
  set -x leaks S3 credentials              set -x deferred past signing step
  no curl timeouts                          --connect-timeout + --max-time
  raw S3 key in HMAC + URL                  URL-encoded S3 object key

tests/unit/upload-db-s3.bats              tests/unit/push-db-s3.bats

playground/try-s3-upload.sh               playground/try-push-db-s3.sh
playground/try-s3-fetch.sh                playground/try-fetch-db-s3.sh
playground/try-slack-notification.sh      playground/try-notify-slack.sh
playground/try-jira-notification.sh       playground/try-notify-jira.sh
playground/try-newrelic-notification.sh   playground/try-notify-newrelic.sh
playground/try-github-notification.sh     playground/try-notify-github.sh
playground/try-email-notification.sh      playground/try-notify-email.sh
playground/try-webhook-notification.sh    playground/try-notify-webhook.sh
playground/try-github-auth.sh             playground/try-notify-github-auth.sh
playground/try-github-cleanup.sh          playground/try-notify-github-cleanup.sh
playground/try-jira-auth.sh               playground/try-notify-jira-auth.sh
playground/try-newrelic-auth.sh           playground/try-notify-newrelic-auth.sh
  credentials printed to stdout             credentials never printed
  unknown scenarios fall through            unknown scenarios fail fast
  API responses written to /tmp             API responses captured in variables

Summary by CodeRabbit

  • New Features

    • Added updated manual test scripts for Slack, Jira, GitHub, New Relic, email, webhook, and S3 workflows with clearer names and usage examples.
    • Introduced a new S3 database push flow with improved validation and safer handling of sensitive values.
  • Bug Fixes

    • Reduced exposure of secrets in logs by masking token/key output.
    • Improved script error handling for unsupported scenarios, invalid API responses, missing config, and missing files.
  • Documentation

    • Refreshed playground instructions to match the latest script naming and invocation patterns.
  • Tests

    • Added unit coverage for the new S3 push flow and removed outdated upload-related tests.

…b taxonomy.

Also renamed the manual playground scripts to match the tooling scripts they exercise (for example 'try-email-notification.sh' to 'try-notify-email.sh' and 'try-s3-fetch.sh' to 'try-fetch-db-s3.sh') and updated the playground README and internal usage references.
…pts.

Stopped the manual playground scripts from printing credential previews (tokens, API keys, webhook URLs), required an explicit email recipient, made scenario arguments fail fast on unknown values, captured API responses in variables instead of predictable temporary files, enabled xtrace only after credentials are exported, validated the GitHub deployments response shape, and removed dead code.
Enabled pipefail, deferred xtrace until after the signed request so credentials are never traced, added curl connect and overall timeouts with transport-error handling, and URL-encoded the S3 object key used for signing and the request URL.
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

Walkthrough

Playground manual test docs and notification scripts were renamed to the try-notify-* pattern, with several scripts adjusting logging, validation, and response handling. The S3 playground wrappers and push-db-s3 tool were renamed to push-prefixed variables and updated to use signed request handling with new unit coverage.

Changes

Manual playground updates

Layer / File(s) Summary
Names and log text
.vortex/tooling/playground/README.md, .vortex/tooling/playground/try-notify-*.sh
README links and usage comments switch to try-notify-* names, and Slack/New Relic output uses generic status text instead of truncated values.
Request flow
.vortex/tooling/playground/try-notify-*.sh
Email, GitHub, JIRA, and webhook scripts add explicit validation, case-based scenario routing, and in-memory response handling for manual auth and notification flows.

S3 push tooling updates

Layer / File(s) Summary
Wrapper updates
.vortex/tooling/playground/try-fetch-db-s3.sh, .vortex/tooling/playground/try-push-db-s3.sh
The S3 playground wrappers update their usage text, environment variable names, xtrace timing, and executed vendor command.
Push command and tests
.vortex/tooling/src/push-db-s3, .vortex/tooling/tests/unit/push-db-s3.bats
push-db-s3 now validates push-prefixed config, signs the object key path, handles curl and HTTP errors, and has Bats coverage for success and failure cases.

Sequence Diagram(s)

sequenceDiagram
  participant T as try-push-db-s3.sh
  participant P as push-db-s3
  participant C as curl
  participant S as Amazon S3
  T->>P: export VORTEX_PUSH_DB_S3_* and run the binary
  P->>C: send signed PUT request for object_key
  C->>S: upload the database dump
  S-->>P: return HTTP status and response body
  P-->>T: print completion message
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested labels

Needs review

Poem

A bunny hopped through scripts at dawn,
with try-notify banners neatly drawn.
I tucked the secrets out of sight,
then pushed DB dumps to S3 tonight. 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR also adds functional hardening and test changes that go beyond the rename-only issue scope. Split the hardening and test work into a separate PR or document it as part of the issue scope.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main rename and script-alignment change.
Linked Issues check ✅ Passed The rename, variable updates, docs, and reference cleanup align with the linked issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/2739-rename-s3-upload

Comment @coderabbitai help to get the list of available commands.

@AlexSkrypnyk AlexSkrypnyk added the A2 Working clone index A2 label Jun 26, 2026
@github-actions

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

📖 Documentation preview for this pull request has been deployed to Netlify:

https://6a3e3e5787d7f41aa40fb84b--vortex-docs.netlify.app

This preview is rebuilt on every commit and is not the production documentation site.

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.22%. Comparing base (4ddee55) to head (56b3bf0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2740      +/-   ##
==========================================
- Coverage   86.67%   86.22%   -0.45%     
==========================================
  Files          96       89       -7     
  Lines        4719     4560     -159     
  Branches       47        3      -44     
==========================================
- Hits         4090     3932     -158     
+ Misses        629      628       -1     

☔ View full report in Codecov by Harness.
📢 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.

@github-actions

Copy link
Copy Markdown

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.55% (204/207)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk

Copy link
Copy Markdown
Member Author

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.55% (204/207)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk AlexSkrypnyk added the Needs review Pull request needs a review from assigned developers label Jun 26, 2026
@AlexSkrypnyk AlexSkrypnyk merged commit 1e3d033 into main Jun 26, 2026
34 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/2739-rename-s3-upload branch June 26, 2026 10:51
@github-project-automation github-project-automation Bot moved this from BACKLOG to Release queue in Vortex 1.x Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A2 Working clone index A2 Needs review Pull request needs a review from assigned developers

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

Rename 'upload-db-s3' to fit the tooling verb taxonomy

1 participant