Skip to content

Fixed incorrectly prefixed environment variables.#2265

Merged
AlexSkrypnyk merged 1 commit intomainfrom
feature/update-vars-scripts
Feb 9, 2026
Merged

Fixed incorrectly prefixed environment variables.#2265
AlexSkrypnyk merged 1 commit intomainfrom
feature/update-vars-scripts

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Feb 9, 2026

Summary

Fixed inconsistent variable name prefixes in scripts/vortex/ so that each
variable prefix matches its script filename (hyphens to underscores, uppercased).

Three prefix patterns had the word order swapped (DB appeared before the action
instead of after).

  • 43 unique variables renamed
  • 101 files updated (scripts, BATS tests, .env files, CI configs, docs, PHP
    installer code, ahoy/lagoon configs, installer test fixtures)
  • Pure rename — no logic changes

Variables renamed

Script Before After
download-db.sh VORTEX_DB_DOWNLOAD_SOURCE VORTEX_DOWNLOAD_DB_SOURCE
download-db.sh VORTEX_DB_DOWNLOAD_FORCE VORTEX_DOWNLOAD_DB_FORCE
download-db.sh VORTEX_DB_DOWNLOAD_PROCEED VORTEX_DOWNLOAD_DB_PROCEED
download-db.sh VORTEX_DB_DOWNLOAD_SEMAPHORE VORTEX_DOWNLOAD_DB_SEMAPHORE
download-db-acquia.sh VORTEX_DB_DOWNLOAD_ENVIRONMENT VORTEX_DOWNLOAD_DB_ENVIRONMENT
download-db-acquia.sh VORTEX_DB_DOWNLOAD_ACQUIA_DB_NAME VORTEX_DOWNLOAD_DB_ACQUIA_DB_NAME
download-db-acquia.sh VORTEX_DB_DOWNLOAD_FRESH VORTEX_DOWNLOAD_DB_FRESH
download-db-acquia.sh VORTEX_DB_DOWNLOAD_ACQUIA_BACKUP_WAIT_INTERVAL VORTEX_DOWNLOAD_DB_ACQUIA_BACKUP_WAIT_INTERVAL
download-db-acquia.sh VORTEX_DB_DOWNLOAD_ACQUIA_BACKUP_MAX_WAIT VORTEX_DOWNLOAD_DB_ACQUIA_BACKUP_MAX_WAIT
download-db-ftp.sh VORTEX_DB_DOWNLOAD_FTP_USER VORTEX_DOWNLOAD_DB_FTP_USER
download-db-ftp.sh VORTEX_DB_DOWNLOAD_FTP_PASS VORTEX_DOWNLOAD_DB_FTP_PASS
download-db-ftp.sh VORTEX_DB_DOWNLOAD_FTP_HOST VORTEX_DOWNLOAD_DB_FTP_HOST
download-db-ftp.sh VORTEX_DB_DOWNLOAD_FTP_PORT VORTEX_DOWNLOAD_DB_FTP_PORT
download-db-ftp.sh VORTEX_DB_DOWNLOAD_FTP_FILE VORTEX_DOWNLOAD_DB_FTP_FILE
download-db-lagoon.sh VORTEX_DB_DOWNLOAD_FRESH VORTEX_DOWNLOAD_DB_FRESH
download-db-lagoon.sh VORTEX_DB_DOWNLOAD_ENVIRONMENT VORTEX_DOWNLOAD_DB_ENVIRONMENT
download-db-lagoon.sh VORTEX_DB_DOWNLOAD_LAGOON_REMOTE_DIR VORTEX_DOWNLOAD_DB_LAGOON_REMOTE_DIR
download-db-lagoon.sh VORTEX_DB_DOWNLOAD_LAGOON_REMOTE_FILE VORTEX_DOWNLOAD_DB_LAGOON_REMOTE_FILE
download-db-lagoon.sh VORTEX_DB_DOWNLOAD_LAGOON_REMOTE_FILE_CLEANUP VORTEX_DOWNLOAD_DB_LAGOON_REMOTE_FILE_CLEANUP
download-db-lagoon.sh VORTEX_DB_DOWNLOAD_SSH_FINGERPRINT VORTEX_DOWNLOAD_DB_SSH_FINGERPRINT
download-db-lagoon.sh VORTEX_DB_DOWNLOAD_SSH_FILE VORTEX_DOWNLOAD_DB_SSH_FILE
download-db-lagoon.sh VORTEX_DB_DOWNLOAD_LAGOON_SSH_HOST VORTEX_DOWNLOAD_DB_LAGOON_SSH_HOST
download-db-lagoon.sh VORTEX_DB_DOWNLOAD_LAGOON_SSH_PORT VORTEX_DOWNLOAD_DB_LAGOON_SSH_PORT
download-db-lagoon.sh VORTEX_DB_DOWNLOAD_LAGOON_SSH_USER VORTEX_DOWNLOAD_DB_LAGOON_SSH_USER
download-db-s3.sh VORTEX_DB_DOWNLOAD_S3_ACCESS_KEY VORTEX_DOWNLOAD_DB_S3_ACCESS_KEY
download-db-s3.sh VORTEX_DB_DOWNLOAD_S3_SECRET_KEY VORTEX_DOWNLOAD_DB_S3_SECRET_KEY
download-db-s3.sh VORTEX_DB_DOWNLOAD_S3_BUCKET VORTEX_DOWNLOAD_DB_S3_BUCKET
download-db-s3.sh VORTEX_DB_DOWNLOAD_S3_REGION VORTEX_DOWNLOAD_DB_S3_REGION
download-db-s3.sh VORTEX_DB_DOWNLOAD_S3_PREFIX VORTEX_DOWNLOAD_DB_S3_PREFIX
download-db-url.sh VORTEX_DB_DOWNLOAD_URL VORTEX_DOWNLOAD_DB_URL
download-db-url.sh VORTEX_DB_DOWNLOAD_UNZIP_PASSWORD VORTEX_DOWNLOAD_DB_UNZIP_PASSWORD
export-db.sh VORTEX_DB_EXPORT_IMAGE VORTEX_EXPORT_DB_IMAGE
export-db-file.sh VORTEX_DB_EXPORT_FILE_DIR VORTEX_EXPORT_DB_FILE_DIR
export-db-image.sh VORTEX_DB_EXPORT_IMAGE_ARCHIVE_FILE VORTEX_EXPORT_DB_IMAGE_ARCHIVE_FILE
export-db-image.sh VORTEX_DB_EXPORT_IMAGE VORTEX_EXPORT_DB_IMAGE
export-db-image.sh VORTEX_DB_EXPORT_CONTAINER_REGISTRY VORTEX_EXPORT_DB_CONTAINER_REGISTRY
export-db-image.sh VORTEX_DB_EXPORT_SERVICE_NAME VORTEX_EXPORT_DB_SERVICE_NAME
export-db-image.sh VORTEX_DB_EXPORT_IMAGE_DIR VORTEX_EXPORT_DB_IMAGE_DIR
upload-db-s3.sh VORTEX_DB_UPLOAD_S3_ACCESS_KEY VORTEX_UPLOAD_DB_S3_ACCESS_KEY
upload-db-s3.sh VORTEX_DB_UPLOAD_S3_SECRET_KEY VORTEX_UPLOAD_DB_S3_SECRET_KEY
upload-db-s3.sh VORTEX_DB_UPLOAD_S3_BUCKET VORTEX_UPLOAD_DB_S3_BUCKET
upload-db-s3.sh VORTEX_DB_UPLOAD_S3_REGION VORTEX_UPLOAD_DB_S3_REGION
upload-db-s3.sh VORTEX_DB_UPLOAD_S3_PREFIX VORTEX_UPLOAD_DB_S3_PREFIX
upload-db-s3.sh VORTEX_DB_UPLOAD_S3_REMOTE_FILE VORTEX_UPLOAD_DB_S3_REMOTE_FILE
upload-db-s3.sh VORTEX_DB_UPLOAD_S3_STORAGE_CLASS VORTEX_UPLOAD_DB_S3_STORAGE_CLASS

Summary by CodeRabbit

  • Chores
    • Renamed many public environment variables related to database download, upload, and export to a unified VORTEX_DB naming scheme; update any custom scripts or configurations accordingly.
  • Documentation
    • Updated docs and examples to reference the new environment variable names.

@coderabbitai
Copy link

coderabbitai bot commented Feb 9, 2026

Walkthrough

This PR consistently renames environment variables across the repo: VORTEX_DB_DOWNLOAD_*VORTEX_DOWNLOAD_DB_*, VORTEX_DB_UPLOAD_S3_*VORTEX_UPLOAD_DB_S3_*, and VORTEX_DB_EXPORT_*VORTEX_EXPORT_DB_* in configs, scripts, tests, installer code, and docs. No control-flow or behavioral changes introduced.

Changes

Cohort / File(s) Summary
CI & Config
\.ahoy\.yml, \.circleci/config\.yml, \.github/workflows/build-test-deploy\.yml, \.lagoon\.yml, \.env, \.env\.local\.example, README\.dist\.md
Renamed environment keys in CI and config files from VORTEX_DB_DOWNLOAD_* to VORTEX_DOWNLOAD_DB_* (and related prefixes).
Download scripts
scripts/vortex/download-db.sh, scripts/vortex/download-db-*.sh
Updated all downloader scripts to use VORTEX_DOWNLOAD_DB_* (source, ftp, s3, url, lagoon, acquia, fresh/semaphore/force flags) with corresponding message and option strings adjusted.
Export / Upload scripts
scripts/vortex/export-db*.sh, scripts/vortex/upload-db-s3.sh
Renamed export/upload variables: VORTEX_DB_EXPORT_*VORTEX_EXPORT_DB_*, VORTEX_DB_UPLOAD_S3_*VORTEX_UPLOAD_DB_S3_*; updated usages and defaults.
Installer PHP
.vortex/installer/src/.../InstallCommand.php, .vortex/installer/src/Prompts/Handlers/...
Installer lookups and dotenv write/read updated to new VORTEX_DOWNLOAD_DB_* keys (demo/demo-db URL, download source discovery).
Docs
.vortex/docs/content/.../*.mdx
Documentation examples and variable tables updated to reference VORTEX_DOWNLOAD_DB_* variants (Lagoon and development docs).
Unit & Integration tests
.vortex/tests/bats/*, .vortex/tests/phpunit/*, .vortex/installer/tests/Unit/*
Test fixtures, setup, assertions, and helper scripts updated to use renamed env vars across BATS and PHPUnit tests; expected output/messages adjusted accordingly.
Manual/test utilities
.vortex/tests/manual/*
Manual try-* scripts updated to export and reference the new env variable names.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

PR: Ready to be merged

Poem

🐇 I hopped through files in morning light,
Renamed the vars to make names right.
From DB to DOWNLOAD, tidy and neat,
Prefixes aligned — a small rabbit feat! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 58.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fixed incorrectly prefixed environment variables' accurately describes the main objective of the changeset—normalizing inconsistent environment variable name prefixes across 43 variables in 101 files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/update-vars-scripts

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/vortex/download-db-lagoon.sh (1)

87-96: ⚠️ Potential issue | 🔴 Critical

The VORTEX_SSH_PREFIX must be changed to match the variable naming convention.

The script sets VORTEX_SSH_PREFIX="DB_DOWNLOAD", but setup-ssh.sh constructs variable names as VORTEX_${VORTEX_SSH_PREFIX}_SSH_* (lines 46, 54). This causes it to look for VORTEX_DB_DOWNLOAD_SSH_FINGERPRINT and VORTEX_DB_DOWNLOAD_SSH_FILE, which don't exist. The actual variables defined are VORTEX_DOWNLOAD_DB_SSH_FINGERPRINT and VORTEX_DOWNLOAD_DB_SSH_FILE (lines 47, 50), so the prefix must be DOWNLOAD_DB.

Without this fix, the SSH fingerprint and file settings will be ignored, and the default ~/.ssh/id_rsa will be used instead.

Required fix
-export VORTEX_SSH_PREFIX="DB_DOWNLOAD" && . ./scripts/vortex/setup-ssh.sh
+export VORTEX_SSH_PREFIX="DOWNLOAD_DB" && . ./scripts/vortex/setup-ssh.sh
🤖 Fix all issues with AI agents
In @.env:
- Line 189: The .env file contains a duplicate key VORTEX_DOWNLOAD_DB_URL
(placeholder at top and demo URL later); to clarify intent either comment out or
remove the placeholder entry (the one currently empty) or add an inline comment
next to that placeholder explicitly stating it is intentionally overridden by
the DEMO section (reference the VORTEX_DOWNLOAD_DB_URL key) so readers and
parsers won’t be confused about which value is used.

In `@scripts/vortex/download-db.sh`:
- Line 18: Update the default for the VORTEX_DOWNLOAD_DB_SOURCE environment
variable from "curl" to "url" by changing the assignment of
VORTEX_DOWNLOAD_DB_SOURCE (the line setting
VORTEX_DOWNLOAD_DB_SOURCE="${VORTEX_DOWNLOAD_DB_SOURCE:-curl}") so it defaults
to "url"; this aligns with the supported source handlers (ftp, url, acquia,
lagoon, container_registry, s3) and the unit tests in download-db.bats so the
download path executes correctly when no source is provided.

In `@scripts/vortex/export-db-image.sh`:
- Around line 14-27: You modified the core vortex export script variables
(VORTEX_EXPORT_DB_IMAGE_ARCHIVE_FILE, VORTEX_EXPORT_DB_IMAGE,
VORTEX_EXPORT_DB_CONTAINER_REGISTRY, VORTEX_EXPORT_DB_SERVICE_NAME,
VORTEX_EXPORT_DB_IMAGE_DIR); per repo guidelines these changes must not live in
the core scripts directory—move the edited logic into a new script under the
custom scripts area (preserve the same variable names and behavior) and revert
the edits to the original core script, or if this is an intentional template
change, add a clear justification in the PR description and request owner
approval.

#
# HTTP Basic Authentication credentials should be embedded into the value.
VORTEX_DB_DOWNLOAD_URL=
VORTEX_DOWNLOAD_DB_URL=
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Duplicate key VORTEX_DOWNLOAD_DB_URL detected.

The variable VORTEX_DOWNLOAD_DB_URL is defined twice: once as an empty placeholder (line 189) and again in the DEMO section (line 303) with a demo URL. While this appears intentional for demonstration purposes, duplicate keys can cause confusion. The behavior depends on the parsing method—typically the last value wins.

Consider adding a comment near line 189 indicating that this value is overridden in the DEMO section, or commenting out the placeholder definition to make the intentional override clearer.

Also applies to: 303-303

🤖 Prompt for AI Agents
In @.env at line 189, The .env file contains a duplicate key
VORTEX_DOWNLOAD_DB_URL (placeholder at top and demo URL later); to clarify
intent either comment out or remove the placeholder entry (the one currently
empty) or add an inline comment next to that placeholder explicitly stating it
is intentionally overridden by the DEMO section (reference the
VORTEX_DOWNLOAD_DB_URL key) so readers and parsers won’t be confused about which
value is used.

Comment on lines 14 to +27
# Container image archive file name.
VORTEX_DB_EXPORT_IMAGE_ARCHIVE_FILE="${VORTEX_DB_EXPORT_IMAGE_ARCHIVE_FILE:-${1}}"
VORTEX_EXPORT_DB_IMAGE_ARCHIVE_FILE="${VORTEX_EXPORT_DB_IMAGE_ARCHIVE_FILE:-${1}}"

# Container image to store in a form of `<org>/<repository>`.
VORTEX_DB_EXPORT_IMAGE="${VORTEX_DB_EXPORT_IMAGE:-}"
VORTEX_EXPORT_DB_IMAGE="${VORTEX_EXPORT_DB_IMAGE:-}"

# Container registry name.
VORTEX_DB_EXPORT_CONTAINER_REGISTRY="${VORTEX_DB_EXPORT_CONTAINER_REGISTRY:-${VORTEX_CONTAINER_REGISTRY:-docker.io}}"
VORTEX_EXPORT_DB_CONTAINER_REGISTRY="${VORTEX_EXPORT_DB_CONTAINER_REGISTRY:-${VORTEX_CONTAINER_REGISTRY:-docker.io}}"

# The service name to capture.
VORTEX_DB_EXPORT_SERVICE_NAME="${VORTEX_DB_EXPORT_SERVICE_NAME:-database}"
VORTEX_EXPORT_DB_SERVICE_NAME="${VORTEX_EXPORT_DB_SERVICE_NAME:-database}"

# Directory with database image archive file.
VORTEX_DB_EXPORT_IMAGE_DIR="${VORTEX_DB_EXPORT_IMAGE_DIR:-${VORTEX_DB_DIR}}"
VORTEX_EXPORT_DB_IMAGE_DIR="${VORTEX_EXPORT_DB_IMAGE_DIR:-${VORTEX_DB_DIR}}"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Avoid changing scripts/vortex directly.

Repo guidance says custom script changes must live under scripts/custom/. Please move these edits there or confirm this is an intentional core template change.
As per coding guidelines: "scripts/**/*.{sh,php,js}: Never modify scripts/vortex/ - use scripts/custom/ for custom scripts".

🤖 Prompt for AI Agents
In `@scripts/vortex/export-db-image.sh` around lines 14 - 27, You modified the
core vortex export script variables (VORTEX_EXPORT_DB_IMAGE_ARCHIVE_FILE,
VORTEX_EXPORT_DB_IMAGE, VORTEX_EXPORT_DB_CONTAINER_REGISTRY,
VORTEX_EXPORT_DB_SERVICE_NAME, VORTEX_EXPORT_DB_IMAGE_DIR); per repo guidelines
these changes must not live in the core scripts directory—move the edited logic
into a new script under the custom scripts area (preserve the same variable
names and behavior) and revert the edits to the original core script, or if this
is an intentional template change, add a clear justification in the PR
description and request owner approval.

@github-actions

This comment has been minimized.

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-02-09 13:38:58

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.02% (173/184)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-02-09 13:39:00

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.02% (173/184)

@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

❌ Patch coverage is 83.21678% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.44%. Comparing base (79bc146) to head (0b9ed5f).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
scripts/vortex/export-db-image.sh 0.00% 15 Missing ⚠️
scripts/vortex/upload-db-s3.sh 83.33% 4 Missing ⚠️
scripts/vortex/export-db-file.sh 0.00% 3 Missing ⚠️
scripts/vortex/download-db-lagoon.sh 93.75% 1 Missing ⚠️
scripts/vortex/export-db.sh 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2265      +/-   ##
==========================================
- Coverage   77.05%   76.44%   -0.61%     
==========================================
  Files         114      107       -7     
  Lines        5988     5829     -159     
  Branches       44        0      -44     
==========================================
- Hits         4614     4456     -158     
+ Misses       1374     1373       -1     

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

@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/update-vars-scripts branch from 0f71e15 to 0b9ed5f Compare February 9, 2026 13:49
@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-02-09 13:55:42

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.02% (173/184)

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

Code Coverage Report:
  2026-02-09 13:55:52

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.02% (173/184)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
scripts/vortex/download-db-s3.sh (1)

16-116: ⚠️ Potential issue | 🟠 Major

Do not modify scripts/vortex/ directly.

These edits change a script under scripts/vortex/. Please move the customization into scripts/custom/ (or adjust the guideline if this is intended core change).

As per coding guidelines, "Never modify scripts/vortex/ - use scripts/custom/ for custom scripts".

scripts/vortex/download-db-acquia.sh (1)

37-263: ⚠️ Potential issue | 🟠 Major

Do not modify scripts/vortex/ directly.

These edits change a script under scripts/vortex/. Please move the customization into scripts/custom/ (or adjust the guideline if this is intended core change).

As per coding guidelines, "Never modify scripts/vortex/ - use scripts/custom/ for custom scripts".

scripts/vortex/download-db-lagoon.sh (1)

25-129: ⚠️ Potential issue | 🟠 Major

Do not modify scripts/vortex/ directly.

These edits change a script under scripts/vortex/. Please move the customization into scripts/custom/ (or adjust the guideline if this is intended core change).

As per coding guidelines, "Never modify scripts/vortex/ - use scripts/custom/ for custom scripts".

scripts/vortex/upload-db-s3.sh (1)

16-136: ⚠️ Potential issue | 🟠 Major

Guideline violation: changes in scripts/vortex/.

Repository rules say customizations must live in scripts/custom/, not scripts/vortex/. Please relocate these changes to a custom script (and update callers/docs accordingly), or confirm and update the guideline if this is intended as a core change.

As per coding guidelines, “scripts/**/*.{sh,php,js}: Never modify scripts/vortex/ - use scripts/custom/ for custom scripts”.

🤖 Fix all issues with AI agents
In `@scripts/vortex/download-db.sh`:
- Around line 18-26: The three environment-variable edits
(VORTEX_DOWNLOAD_DB_SOURCE, VORTEX_DOWNLOAD_DB_FORCE,
VORTEX_DOWNLOAD_DB_PROCEED) must not be made in the core vortex script; instead
move them into your project’s custom scripts by creating a small custom wrapper
that exports these variables and then invokes the original vortex download logic
(or update the guideline if this is intended as a core change). Locate the added
variables in the modified download script (VORTEX_DOWNLOAD_DB_SOURCE,
VORTEX_DOWNLOAD_DB_FORCE, VORTEX_DOWNLOAD_DB_PROCEED) and remove them from the
core file, placing equivalent export lines in the custom wrapper so core scripts
remain unchanged.
- Line 39: The user-facing message still references the old env var name; update
the message in the conditional that begins with [
"${VORTEX_DOWNLOAD_DB_PROCEED}" != "1" ] so it mentions
VORTEX_DOWNLOAD_DB_PROCEED (not DB_DOWNLOAD_PROCEED) — change the string passed
to pass() to reflect the renamed variable and keep the rest of the conditional
logic unchanged.

In `@scripts/vortex/export-db-file.sh`:
- Line 13: The change to the core script setting VORTEX_EXPORT_DB_FILE_DIR (the
line defining
VORTEX_EXPORT_DB_FILE_DIR="${VORTEX_EXPORT_DB_FILE_DIR:-${VORTEX_DB_DIR:-./.data}}")
must not be made directly under scripts/vortex; instead move your customizations
into a new script under scripts/custom/ (or update an existing custom script)
and source or override the variable there, leaving the core file untouched;
ensure any other edits you made in the same area (lines referencing
VORTEX_DB_DIR or related defaults) are replicated in your custom script so the
runtime picks up the override without modifying scripts/vortex.

In `@scripts/vortex/export-db.sh`:
- Line 44: The change modifies a core script under the vortex scripts tree by
adding a call to export-db-image.sh via VORTEX_EXPORT_DB_IMAGE which violates
the rule to never edit scripts/vortex/*; revert this edit in the core script and
instead create a new custom wrapper under scripts/custom (e.g., a new
export-db.sh) that sets VORTEX_EXPORT_DB_IMAGE and invokes export-db-image.sh,
and update any internal invocations or documentation to point to the new
scripts/custom wrapper; look for the symbol VORTEX_EXPORT_DB_IMAGE and the
invocation of export-db-image.sh to locate the exact behavior to duplicate into
the custom script and remove from the core one.

Comment on lines +18 to 26
VORTEX_DOWNLOAD_DB_SOURCE="${VORTEX_DOWNLOAD_DB_SOURCE:-url}"

# Force DB download even if the cache exists.
# Usually set in CircleCI UI to override per build cache.
VORTEX_DB_DOWNLOAD_FORCE="${VORTEX_DB_DOWNLOAD_FORCE:-}"
VORTEX_DOWNLOAD_DB_FORCE="${VORTEX_DOWNLOAD_DB_FORCE:-}"

# Proceed with download.
VORTEX_DB_DOWNLOAD_PROCEED="${VORTEX_DB_DOWNLOAD_PROCEED:-1}"
VORTEX_DOWNLOAD_DB_PROCEED="${VORTEX_DOWNLOAD_DB_PROCEED:-1}"

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Do not modify scripts/vortex/ directly.

These edits change a script under scripts/vortex/. Please move the customization into scripts/custom/ (or adjust the guideline if this is intended core change).

As per coding guidelines, "Never modify scripts/vortex/ - use scripts/custom/ for custom scripts".

🤖 Prompt for AI Agents
In `@scripts/vortex/download-db.sh` around lines 18 - 26, The three
environment-variable edits (VORTEX_DOWNLOAD_DB_SOURCE, VORTEX_DOWNLOAD_DB_FORCE,
VORTEX_DOWNLOAD_DB_PROCEED) must not be made in the core vortex script; instead
move them into your project’s custom scripts by creating a small custom wrapper
that exports these variables and then invokes the original vortex download logic
(or update the guideline if this is intended as a core change). Locate the added
variables in the modified download script (VORTEX_DOWNLOAD_DB_SOURCE,
VORTEX_DOWNLOAD_DB_FORCE, VORTEX_DOWNLOAD_DB_PROCEED) and remove them from the
core file, placing equivalent export lines in the custom wrapper so core scripts
remain unchanged.

info "Started database download."

[ "${VORTEX_DB_DOWNLOAD_PROCEED}" != "1" ] && pass "Skipping database download as DB_DOWNLOAD_PROCEED is not set to 1." && exit 0
[ "${VORTEX_DOWNLOAD_DB_PROCEED}" != "1" ] && pass "Skipping database download as DB_DOWNLOAD_PROCEED is not set to 1." && exit 0
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix the user-facing message to the renamed variable.

Line 39 still references DB_DOWNLOAD_PROCEED, which no longer matches the env var name.

🛠️ Proposed fix
-[ "${VORTEX_DOWNLOAD_DB_PROCEED}" != "1" ] && pass "Skipping database download as DB_DOWNLOAD_PROCEED is not set to 1." && exit 0
+[ "${VORTEX_DOWNLOAD_DB_PROCEED}" != "1" ] && pass "Skipping database download as VORTEX_DOWNLOAD_DB_PROCEED is not set to 1." && exit 0
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[ "${VORTEX_DOWNLOAD_DB_PROCEED}" != "1" ] && pass "Skipping database download as DB_DOWNLOAD_PROCEED is not set to 1." && exit 0
[ "${VORTEX_DOWNLOAD_DB_PROCEED}" != "1" ] && pass "Skipping database download as VORTEX_DOWNLOAD_DB_PROCEED is not set to 1." && exit 0
🤖 Prompt for AI Agents
In `@scripts/vortex/download-db.sh` at line 39, The user-facing message still
references the old env var name; update the message in the conditional that
begins with [ "${VORTEX_DOWNLOAD_DB_PROCEED}" != "1" ] so it mentions
VORTEX_DOWNLOAD_DB_PROCEED (not DB_DOWNLOAD_PROCEED) — change the string passed
to pass() to reflect the renamed variable and keep the rest of the conditional
logic unchanged.


# Directory with database dump file.
VORTEX_DB_EXPORT_FILE_DIR="${VORTEX_DB_EXPORT_FILE_DIR:-${VORTEX_DB_DIR:-./.data}}"
VORTEX_EXPORT_DB_FILE_DIR="${VORTEX_EXPORT_DB_FILE_DIR:-${VORTEX_DB_DIR:-./.data}}"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Avoid editing core scripts/vortex directly.

These edits should live under scripts/custom/ unless this is an intentional core template change with explicit approval.

As per coding guidelines: "scripts/**/*.{sh,php,js}: Never modify scripts/vortex/ - use scripts/custom/ for custom scripts".

Also applies to: 31-31, 39-39

🤖 Prompt for AI Agents
In `@scripts/vortex/export-db-file.sh` at line 13, The change to the core script
setting VORTEX_EXPORT_DB_FILE_DIR (the line defining
VORTEX_EXPORT_DB_FILE_DIR="${VORTEX_EXPORT_DB_FILE_DIR:-${VORTEX_DB_DIR:-./.data}}")
must not be made directly under scripts/vortex; instead move your customizations
into a new script under scripts/custom/ (or update an existing custom script)
and source or override the variable there, leaving the core file untouched;
ensure any other edits you made in the same area (lines referencing
VORTEX_DB_DIR or related defaults) are replicated in your custom script so the
runtime picks up the override without modifying scripts/vortex.

else
# Export database as a container image.
VORTEX_DB_EXPORT_IMAGE="${VORTEX_DB_IMAGE}" ./scripts/vortex/export-db-image.sh "$@"
VORTEX_EXPORT_DB_IMAGE="${VORTEX_DB_IMAGE}" ./scripts/vortex/export-db-image.sh "$@"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Avoid editing core scripts/vortex directly.

These edits should live under scripts/custom/ unless this is an intentional core template change with explicit approval.

As per coding guidelines: "scripts/**/*.{sh,php,js}: Never modify scripts/vortex/ - use scripts/custom/ for custom scripts".

🤖 Prompt for AI Agents
In `@scripts/vortex/export-db.sh` at line 44, The change modifies a core script
under the vortex scripts tree by adding a call to export-db-image.sh via
VORTEX_EXPORT_DB_IMAGE which violates the rule to never edit scripts/vortex/*;
revert this edit in the core script and instead create a new custom wrapper
under scripts/custom (e.g., a new export-db.sh) that sets VORTEX_EXPORT_DB_IMAGE
and invokes export-db-image.sh, and update any internal invocations or
documentation to point to the new scripts/custom wrapper; look for the symbol
VORTEX_EXPORT_DB_IMAGE and the invocation of export-db-image.sh to locate the
exact behavior to duplicate into the custom script and remove from the core one.

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-02-09 13:59:34

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.02% (173/184)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-02-09 13:59:39

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.02% (173/184)

@AlexSkrypnyk AlexSkrypnyk merged commit 760b7cd into main Feb 9, 2026
28 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/update-vars-scripts branch February 9, 2026 22:17
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Feb 9, 2026
@AlexSkrypnyk AlexSkrypnyk added this to the 1.36.0 milestone Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

1 participant