Skip to content

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Jul 26, 2025

Summary by CodeRabbit

  • Documentation

    • Updated documentation to reflect the new environment variable prefix VORTEX_INSTALLER_.
    • Consolidated and clarified environment variable documentation by removing duplicates.
  • Refactor

    • Renamed all installer-related environment variables from VORTEX_INSTALL_ to VORTEX_INSTALLER_ for consistency across scripts, tests, and configuration.
    • Updated comments and internal references to match the new naming convention.
  • Tests

    • Adjusted test scripts and helper files to use the updated environment variable names, ensuring alignment with the new convention.

@coderabbitai
Copy link

coderabbitai bot commented Jul 26, 2025

"""

Walkthrough

This change systematically renames all relevant environment variables and constants from the prefix VORTEX_INSTALL_ to VORTEX_INSTALLER_ across documentation, shell scripts, PHP source code, and test files. Associated documentation and comments are updated for consistency, with no changes to logic or control flow.

Changes

Files/Group Change Summary
.vortex/docs/content/contributing/maintenance/tests.mdx, .vortex/docs/content/workflows/variables.mdx Updated documentation to use VORTEX_INSTALLER_ prefix for environment variables; consolidated duplicate docs.
.vortex/installer/src/Utils/Config.php Renamed all config constants to use VORTEX_INSTALLER_ prefix.
.vortex/installer/src/Prompts/PromptManager.php Changed env var prefix in makeEnvName from VORTEX_INSTALL_PROMPT_ to VORTEX_INSTALLER_PROMPT_.
.vortex/installer/src/Command/InstallCommand.php Updated doc comment to reflect new VORTEX_INSTALLER_ prefix.
scripts/vortex/update-vortex.sh Changed variable and usage from VORTEX_INSTALL_TEMPLATE_REPO to VORTEX_INSTALLER_TEMPLATE_REPO.
.vortex/tests/bats/_helper.bash, .vortex/tests/bats/_helper.workflow.bash Updated all relevant env vars to use VORTEX_INSTALLER_ prefix in helper scripts.
.vortex/tests/bats/e2e/deployment1.bats Updated all deployment test env vars to use VORTEX_INSTALLER_PROMPT_ prefix.
.vortex/tests/bats/e2e/update-vortex.bats Changed template ref env var to VORTEX_INSTALLER_TEMPLATE_REF.
.vortex/tests/bats/e2e/workflow.install.profile.bats, .vortex/tests/bats/e2e/workflow.storage.image.bats, .vortex/tests/bats/e2e/workflow.storage.image_cached.bats Updated demo DB skip env var to VORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIP.
.vortex/installer/tests/Functional/PharTest.php Updated env var for demo DB skip to use VORTEX_INSTALLER_ prefix.
.vortex/tests/phpunit/Traits/Steps/StepBuildTrait.php, .vortex/tests/phpunit/Traits/Steps/StepPrepareSutTrait.php Updated build and installer env vars to use VORTEX_INSTALLER_ prefix.
.vortex/tests/phpunit/Traits/Steps/StepDownloadDbTrait.php Renamed constant and usage for demo DB URL to VORTEX_INSTALLER_DEMO_DB_TEST.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ShellScript
    participant Installer(PHP)
    participant Tests

    User->>ShellScript: Set VORTEX_INSTALLER_* env vars
    ShellScript->>Installer(PHP): Passes VORTEX_INSTALLER_* vars
    Installer(PHP)->>Installer(PHP): Reads VORTEX_INSTALLER_* vars for config
    User->>Tests: Run tests with VORTEX_INSTALLER_* vars
    Tests->>Installer(PHP): Passes VORTEX_INSTALLER_* vars during test runs
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

PR: Needs review

Poem

Hopping through code with a carrot in paw,
I nibbled each env var, fixing every flaw.
From INSTALL to INSTALLER, the prefix now shines,
In scripts and in docs, across all the lines.
Consistency blooms where confusion once grew—
A tidy-up hop, just for you! 🥕
"""

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 phpcs (3.7.2)
.vortex/installer/src/Command/InstallCommand.php

ERROR: Referenced sniff "Drupal" does not exist

Run "phpcs --help" for usage information

.vortex/installer/src/Prompts/PromptManager.php

ERROR: Referenced sniff "Drupal" does not exist

Run "phpcs --help" for usage information

.vortex/installer/src/Utils/Config.php

ERROR: Referenced sniff "Drupal" does not exist

Run "phpcs --help" for usage information

  • 4 others
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/renamed-installer-variables

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot temporarily deployed to commit July 26, 2025 00:32 Inactive
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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c9a23d and 3e1d739.

📒 Files selected for processing (17)
  • .vortex/docs/content/contributing/maintenance/tests.mdx (2 hunks)
  • .vortex/docs/content/workflows/variables.mdx (1 hunks)
  • .vortex/installer/src/Command/InstallCommand.php (1 hunks)
  • .vortex/installer/src/Prompts/PromptManager.php (1 hunks)
  • .vortex/installer/src/Utils/Config.php (1 hunks)
  • .vortex/installer/tests/Functional/PharTest.php (1 hunks)
  • .vortex/tests/bats/_helper.bash (4 hunks)
  • .vortex/tests/bats/_helper.workflow.bash (2 hunks)
  • .vortex/tests/bats/e2e/deployment1.bats (3 hunks)
  • .vortex/tests/bats/e2e/update-vortex.bats (1 hunks)
  • .vortex/tests/bats/e2e/workflow.install.profile.bats (1 hunks)
  • .vortex/tests/bats/e2e/workflow.storage.image.bats (2 hunks)
  • .vortex/tests/bats/e2e/workflow.storage.image_cached.bats (2 hunks)
  • .vortex/tests/phpunit/Traits/Steps/StepBuildTrait.php (1 hunks)
  • .vortex/tests/phpunit/Traits/Steps/StepDownloadDbTrait.php (1 hunks)
  • .vortex/tests/phpunit/Traits/Steps/StepPrepareSutTrait.php (2 hunks)
  • scripts/vortex/update-vortex.sh (2 hunks)
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in `.vortex/installer/tests/Fixtures/install` directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: drevops/vortex#1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/tests/bats/e2e/workflow.storage.image.bats (3)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

Learnt from: AlexSkrypnyk
PR: #1816
File: .docker/cli.dockerfile:72-76
Timestamp: 2025-07-23T01:16:30.963Z
Learning: In the Vortex project, unauthenticated Composer installs should be allowed, so GitHub token secrets should not be marked as required=true in Docker build mounts. The conditional check if [ -s /run/secrets/github_token ] is the preferred approach to allow builds to proceed without a token when needed.

.vortex/installer/tests/Functional/PharTest.php (2)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

.vortex/tests/bats/e2e/workflow.storage.image_cached.bats (3)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

Learnt from: AlexSkrypnyk
PR: #1816
File: .docker/cli.dockerfile:72-76
Timestamp: 2025-07-23T01:16:30.963Z
Learning: In the Vortex project, unauthenticated Composer installs should be allowed, so GitHub token secrets should not be marked as required=true in Docker build mounts. The conditional check if [ -s /run/secrets/github_token ] is the preferred approach to allow builds to proceed without a token when needed.

.vortex/tests/bats/e2e/deployment1.bats (2)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

.vortex/tests/bats/e2e/update-vortex.bats (2)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

.vortex/tests/bats/e2e/workflow.install.profile.bats (2)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

.vortex/tests/bats/_helper.workflow.bash (1)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

.vortex/tests/phpunit/Traits/Steps/StepPrepareSutTrait.php (2)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

.vortex/docs/content/contributing/maintenance/tests.mdx (2)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

.vortex/installer/src/Command/InstallCommand.php (1)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

.vortex/tests/bats/_helper.bash (3)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

Learnt from: AlexSkrypnyk
PR: #1816
File: .docker/cli.dockerfile:72-76
Timestamp: 2025-07-23T01:16:30.963Z
Learning: In the Vortex project, unauthenticated Composer installs should be allowed, so GitHub token secrets should not be marked as required=true in Docker build mounts. The conditional check if [ -s /run/secrets/github_token ] is the preferred approach to allow builds to proceed without a token when needed.

.vortex/installer/src/Utils/Config.php (2)

Learnt from: AlexSkrypnyk
PR: #1693
File: .vortex/installer/src/Prompts/Handlers/Internal.php:52-52
Timestamp: 2025-06-01T08:10:15.903Z
Learning: The File utility class in .vortex/installer/src/Utils/File.php extends AlexSkrypnyk\File\File, and methods like collapseRepeatedEmptyLines() are available from this external parent class dependency.

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

🪛 GitHub Actions: Vortex - Test installer
.vortex/installer/src/Command/InstallCommand.php

[warning] 198-198: Line exceeds 80 characters; contains 81 characters (Drupal.Files.LineLength.TooLong)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: build (0)
  • GitHub Check: build (1)
  • GitHub Check: vortex-test-deployment (1)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-deployment (0)
  • GitHub Check: vortex-test-workflow (0)
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-common
  • GitHub Check: vortex-test-docs
🔇 Additional comments (25)
.vortex/installer/tests/Functional/PharTest.php (1)

129-129: LGTM! Environment variable rename is consistent.

The update from VORTEX_INSTALL_IS_DEMO_DB_DOWNLOAD_SKIP to VORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIP correctly aligns with the systematic variable renaming across the codebase.

.vortex/tests/bats/e2e/workflow.install.profile.bats (2)

13-13: LGTM! Environment variable export updated correctly.

The environment variable name has been properly updated to use the VORTEX_INSTALLER_ prefix, maintaining consistency with the broader renaming effort.


17-17: LGTM! Comment updated to match the new variable name.

The comment correctly reflects the updated environment variable name, ensuring documentation stays in sync with the code changes.

.vortex/tests/bats/e2e/deployment1.bats (3)

24-24: LGTM! Prompt variable updated correctly for Acquia deployment test.

The environment variable has been properly renamed from VORTEX_INSTALL_PROMPT_DEPLOY_TYPES to VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES, maintaining consistency with the updated prefix convention.


121-125: LGTM! All Lagoon deployment prompt variables updated consistently.

All environment variables in this test section have been correctly updated to use the VORTEX_INSTALLER_PROMPT_ prefix:

  • DEPLOY_TYPES
  • HOSTING_PROVIDER
  • DATABASE_DOWNLOAD_SOURCE

The systematic renaming maintains test functionality while aligning with the new naming convention.


209-213: LGTM! Profile-driven Lagoon deployment variables updated correctly.

All prompt variables for the profile-driven deployment test have been systematically updated to use the VORTEX_INSTALLER_PROMPT_ prefix, including the additional PROVISION_TYPE variable. The changes maintain test consistency.

.vortex/tests/bats/e2e/workflow.storage.image_cached.bats (2)

31-31: LGTM! Demo database skip variable updated correctly.

The environment variable has been properly renamed from VORTEX_INSTALL_IS_DEMO_DB_DOWNLOAD_SKIP to VORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIP, aligning with the systematic prefix update.


47-47: LGTM! Comment updated to match the new variable name.

The comment correctly references the updated environment variable name, ensuring documentation consistency with the code changes.

.vortex/tests/phpunit/Traits/Steps/StepBuildTrait.php (1)

94-94: LGTM! Consistent variable renaming.

The constant reference has been correctly updated to use the new VORTEX_INSTALLER_ prefix, maintaining the same functionality while aligning with the systematic renaming effort.

.vortex/tests/bats/e2e/update-vortex.bats (1)

48-48: LGTM! Environment variable renaming is consistent.

The environment variable has been correctly renamed to use the VORTEX_INSTALLER_ prefix, maintaining the same test functionality while following the new naming convention.

.vortex/tests/bats/e2e/workflow.storage.image.bats (1)

29-29: LGTM! Consistent variable renaming in both export and comment.

The environment variable has been correctly renamed to use the VORTEX_INSTALLER_ prefix in both the export statement and the explanatory comment, maintaining consistency throughout the test.

Also applies to: 45-45

.vortex/tests/phpunit/Traits/Steps/StepDownloadDbTrait.php (1)

20-20: LGTM! Comprehensive constant renaming with consistent references.

The constant has been correctly renamed to use the VORTEX_INSTALLER_ prefix, and all references to it within the trait have been consistently updated. The functionality and URL value remain unchanged.

Also applies to: 28-28, 30-30

scripts/vortex/update-vortex.sh (1)

29-29: LGTM! Consistent environment variable renaming.

The environment variable has been correctly renamed to use the VORTEX_INSTALLER_ prefix in both its initialization and usage, maintaining the same script functionality while following the new naming convention.

Also applies to: 73-73

.vortex/tests/bats/_helper.workflow.bash (2)

59-59: LGTM! Environment variable renamed consistently.

This change aligns with the systematic renaming effort from VORTEX_INSTALL_ to VORTEX_INSTALLER_ prefix.


86-86: LGTM! Consistent variable renaming.

This change matches the renaming pattern and maintains the same functionality as the previous occurrence on line 59.

.vortex/docs/content/contributing/maintenance/tests.mdx (2)

125-125: LGTM! Documentation updated to reflect variable renaming.

The shell command documentation correctly uses the new VORTEX_INSTALLER_TEMPLATE_REPO variable name.


163-163: LGTM! Consistent documentation update.

This change matches the variable renaming pattern and ensures documentation accuracy across all test database update procedures.

.vortex/tests/phpunit/Traits/Steps/StepPrepareSutTrait.php (3)

53-53: LGTM! Template repository variable renamed consistently.

The variable name change maintains the same functionality while following the new naming convention.


65-65: LGTM! Demo database test variable renamed consistently.

This change aligns with the renaming pattern seen in other test files and maintains the same functionality.


68-68: LGTM! Temporary directory variable renamed consistently.

The variable rename follows the established pattern and maintains the same functionality for installer temporary directory management.

.vortex/installer/src/Prompts/PromptManager.php (1)

388-388: LGTM! Prompt environment variable prefix updated systematically.

This change ensures all dynamically generated prompt environment variables follow the new VORTEX_INSTALLER_PROMPT_ naming convention consistently.

.vortex/docs/content/workflows/variables.mdx (1)

1150-1159: LGTM! Comprehensive documentation for the new variable.

The documentation clearly explains the VORTEX_INSTALLER_TEMPLATE_REPO variable with excellent examples covering various URI formats and reference types. This will be very helpful for users.

.vortex/tests/bats/_helper.bash (3)

139-147: Renamed demo-DB variable looks good

The move to VORTEX_INSTALLER_DEMO_DB_TEST keeps naming consistent with the new prefix and the value remains unchanged.
No further action required.


1087-1095: Consistent TMP/REPO renames – implementation is correct

VORTEX_INSTALLER_TEMPLATE_REPO and VORTEX_INSTALLER_TMP_DIR are set and exported exactly once, preserving previous behaviour.
Directory creation is still guarded by fixture_prepare_dir, so no functional regression.


1102-1105: Reference update propagated correctly

The curl DB override now targets the new variable – good catch.

Comment on lines +16 to +40
const ROOT = 'VORTEX_INSTALLER_ROOT_DIR';

const DST = 'VORTEX_INSTALL_DST_DIR';
const DST = 'VORTEX_INSTALLER_DST_DIR';

const TMP = 'VORTEX_INSTALL_TMP_DIR';
const TMP = 'VORTEX_INSTALLER_TMP_DIR';

const REPO = 'VORTEX_INSTALL_TEMPLATE_REPO';
const REPO = 'VORTEX_INSTALLER_TEMPLATE_REPO';

const REF = 'VORTEX_INSTALL_TEMPLATE_REF';
const REF = 'VORTEX_INSTALLER_TEMPLATE_REF';

const PROCEED = 'VORTEX_INSTALL_PROCEED';
const PROCEED = 'VORTEX_INSTALLER_PROCEED';

const IS_DEMO = 'VORTEX_INSTALL_IS_DEMO';
const IS_DEMO = 'VORTEX_INSTALLER_IS_DEMO';

const IS_DEMO_DB_DOWNLOAD_SKIP = 'VORTEX_INSTALL_IS_DEMO_DB_DOWNLOAD_SKIP';
const IS_DEMO_DB_DOWNLOAD_SKIP = 'VORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIP';

const IS_VORTEX_PROJECT = 'VORTEX_INSTALL_IS_VORTEX_PROJECT';
const IS_VORTEX_PROJECT = 'VORTEX_INSTALLER_IS_VORTEX_PROJECT';

const VERSION = 'VORTEX_INSTALL_VERSION';
const VERSION = 'VORTEX_INSTALLER_VERSION';

const NO_INTERACTION = 'VORTEX_INSTALL_NO_INTERACTION';
const NO_INTERACTION = 'VORTEX_INSTALLER_NO_INTERACTION';

const QUIET = 'VORTEX_INSTALL_QUIET';
const QUIET = 'VORTEX_INSTALLER_QUIET';

const NO_CLEANUP = 'VORTEX_INSTALL_NO_CLEANUP';
const NO_CLEANUP = 'VORTEX_INSTALLER_NO_CLEANUP';
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Constant renames are accurate but consider a deprecation bridge

All installer-related constants have been renamed to the new _INSTALLER_ prefix, which is fine for a major version bump.
For smoother upgrades you might provide temporary fall-backs:

// After the constant block
private const LEGACY_MAP = [
  'VORTEX_INSTALL_ROOT_DIR' => self::ROOT,
  'VORTEX_INSTALL_DST_DIR'  => self::DST,
  // …
];

public function get(string $name, mixed $default = null): mixed {
  // Accept legacy names transparently.
  if (isset(self::LEGACY_MAP[$name])) {
    $name = self::LEGACY_MAP[$name];
  }
  return $this->store[$name] ?? $default;
}

This keeps BC for external scripts that haven’t migrated yet while allowing you to schedule removal later.

🤖 Prompt for AI Agents
In .vortex/installer/src/Utils/Config.php around lines 16 to 40, the constants
have been renamed with a new _INSTALLER_ prefix, but to maintain backward
compatibility, add a private LEGACY_MAP array mapping old constant names to the
new ones. Then, update the get method to check if the requested name is in
LEGACY_MAP and translate it to the new constant before accessing the store. This
will allow external scripts using old constant names to continue working while
you plan for eventual removal of legacy support.

Comment on lines 1354 to 1360
([ "${1:-}" = "--quiet" ] || [ "${1:-}" = "-q" ]) && shift
# Destination directory, that can be overridden with the first argument to this script.
VORTEX_INSTALL_DST_DIR="${VORTEX_INSTALL_DST_DIR:-$(pwd)}"
VORTEX_INSTALL_DST_DIR=${1:-${VORTEX_INSTALL_DST_DIR}}
VORTEX_INSTALLER_DST_DIR="${VORTEX_INSTALLER_DST_DIR:-$(pwd)}"
VORTEX_INSTALLER_DST_DIR=${1:-${VORTEX_INSTALLER_DST_DIR}}

pushd "${VORTEX_INSTALL_DST_DIR}" >/dev/null || exit 1
pushd "${VORTEX_INSTALLER_DST_DIR}" >/dev/null || exit 1

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Export the rewritten destination variable for downstream consumers

fix_host_dependencies() rewrites VORTEX_INSTALLER_DST_DIR but never re-exports it.
If any sub-process spawned later expects the variable in its environment, it will receive the old value (or nothing). Exporting keeps behaviour identical to the earlier implementation that relied on a pre-exported variable.

-  VORTEX_INSTALLER_DST_DIR="${VORTEX_INSTALLER_DST_DIR:-$(pwd)}"
-  VORTEX_INSTALLER_DST_DIR=${1:-${VORTEX_INSTALLER_DST_DIR}}
+  VORTEX_INSTALLER_DST_DIR="${VORTEX_INSTALLER_DST_DIR:-$(pwd)}"
+  VORTEX_INSTALLER_DST_DIR=${1:-${VORTEX_INSTALLER_DST_DIR}}
+  export VORTEX_INSTALLER_DST_DIR
🤖 Prompt for AI Agents
In .vortex/tests/bats/_helper.bash around lines 1354 to 1360, after rewriting
the VORTEX_INSTALLER_DST_DIR variable, add an export statement for it. This
ensures that any subprocesses spawned later receive the updated value in their
environment, maintaining consistent behavior with the previous implementation
that relied on the variable being pre-exported.

@codecov
Copy link

codecov bot commented Jul 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.05%. Comparing base (7c9a23d) to head (e042644).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1845   +/-   ##
========================================
  Coverage    75.05%   75.05%           
========================================
  Files           84       84           
  Lines         4835     4835           
  Branches        35       35           
========================================
  Hits          3629     3629           
  Misses        1206     1206           

☔ 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/renamed-installer-variables branch from 3e1d739 to e042644 Compare July 26, 2025 01:11
@github-actions github-actions bot temporarily deployed to commit July 26, 2025 01:13 Inactive
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: 2

🔭 Outside diff range comments (1)
.vortex/tests/phpunit/Traits/Steps/StepDownloadDbTrait.php (1)

15-21: Minor docblock wording & version drift

The comment still says “set the CURL DB to test DB” – leftover wording that predates the refactor.
Also, the hard-coded URL pins to release 25.4.0; ensure this stays in sync with the fixture tag to avoid silent test breakage.

No functional issues; consider a quick wording touch-up or moving the URL to a central config to ease future updates.

♻️ Duplicate comments (3)
.vortex/installer/src/Command/InstallCommand.php (1)

198-199: Line length violation needs to be addressed.

The environment variable prefix update is correct, but the line exceeds the 80-character limit as flagged by the pipeline.

.vortex/tests/bats/_helper.bash (1)

1354-1359: VORTEX_INSTALLER_DST_DIR still isn’t exported – child processes won’t see it

Same point raised earlier: after rewriting the destination directory the variable is not
re-exported, so any command the helper spawns won’t receive the updated value in its
environment.

   VORTEX_INSTALLER_DST_DIR="${VORTEX_INSTALLER_DST_DIR:-$(pwd)}"
   VORTEX_INSTALLER_DST_DIR=${1:-${VORTEX_INSTALLER_DST_DIR}}
+  export VORTEX_INSTALLER_DST_DIR
.vortex/installer/src/Utils/Config.php (1)

16-41: Provide a BC bridge for legacy VORTEX_INSTALL_* env-vars

Renaming the constants is fine, but external automation that still sets the old
VORTEX_INSTALL_* variables will now be ignored. A minimal compatibility layer keeps
things working until users migrate:

+  /** @internal temporary BC map – remove in next major */
+  private const LEGACY_MAP = [
+    'VORTEX_INSTALL_ROOT_DIR'          => self::ROOT,
+    'VORTEX_INSTALL_DST_DIR'           => self::DST,
+    'VORTEX_INSTALL_TMP_DIR'           => self::TMP,
+    'VORTEX_INSTALL_TEMPLATE_REPO'     => self::REPO,
+    'VORTEX_INSTALL_TEMPLATE_REF'      => self::REF,
+    'VORTEX_INSTALL_PROCEED'           => self::PROCEED,
+    // …extend for the rest…
+  ];

and in get():

public function get(string $name, mixed $default = null): mixed {
    if (isset(self::LEGACY_MAP[$name])) {
        $name = self::LEGACY_MAP[$name];
    }
    return $this->store[$name] ?? $default;
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3e1d739 and e042644.

📒 Files selected for processing (17)
  • .vortex/docs/content/contributing/maintenance/tests.mdx (2 hunks)
  • .vortex/docs/content/workflows/variables.mdx (1 hunks)
  • .vortex/installer/src/Command/InstallCommand.php (1 hunks)
  • .vortex/installer/src/Prompts/PromptManager.php (1 hunks)
  • .vortex/installer/src/Utils/Config.php (1 hunks)
  • .vortex/installer/tests/Functional/PharTest.php (1 hunks)
  • .vortex/tests/bats/_helper.bash (4 hunks)
  • .vortex/tests/bats/_helper.workflow.bash (2 hunks)
  • .vortex/tests/bats/e2e/deployment1.bats (3 hunks)
  • .vortex/tests/bats/e2e/update-vortex.bats (1 hunks)
  • .vortex/tests/bats/e2e/workflow.install.profile.bats (1 hunks)
  • .vortex/tests/bats/e2e/workflow.storage.image.bats (2 hunks)
  • .vortex/tests/bats/e2e/workflow.storage.image_cached.bats (2 hunks)
  • .vortex/tests/phpunit/Traits/Steps/StepBuildTrait.php (1 hunks)
  • .vortex/tests/phpunit/Traits/Steps/StepDownloadDbTrait.php (1 hunks)
  • .vortex/tests/phpunit/Traits/Steps/StepPrepareSutTrait.php (2 hunks)
  • scripts/vortex/update-vortex.sh (2 hunks)
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in `.vortex/installer/tests/Fixtures/install` directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: drevops/vortex#1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/installer/src/Command/InstallCommand.php (1)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

.vortex/tests/bats/e2e/workflow.storage.image_cached.bats (3)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

Learnt from: AlexSkrypnyk
PR: #1816
File: .docker/cli.dockerfile:72-76
Timestamp: 2025-07-23T01:16:30.963Z
Learning: In the Vortex project, unauthenticated Composer installs should be allowed, so GitHub token secrets should not be marked as required=true in Docker build mounts. The conditional check if [ -s /run/secrets/github_token ] is the preferred approach to allow builds to proceed without a token when needed.

.vortex/tests/bats/e2e/workflow.storage.image.bats (3)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

Learnt from: AlexSkrypnyk
PR: #1816
File: .docker/cli.dockerfile:72-76
Timestamp: 2025-07-23T01:16:30.963Z
Learning: In the Vortex project, unauthenticated Composer installs should be allowed, so GitHub token secrets should not be marked as required=true in Docker build mounts. The conditional check if [ -s /run/secrets/github_token ] is the preferred approach to allow builds to proceed without a token when needed.

.vortex/installer/tests/Functional/PharTest.php (2)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

.vortex/tests/bats/e2e/update-vortex.bats (2)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

.vortex/tests/phpunit/Traits/Steps/StepPrepareSutTrait.php (2)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

.vortex/tests/bats/e2e/workflow.install.profile.bats (2)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

.vortex/docs/content/contributing/maintenance/tests.mdx (2)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

.vortex/docs/content/workflows/variables.mdx (1)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

.vortex/tests/bats/e2e/deployment1.bats (2)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

.vortex/tests/bats/_helper.bash (3)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

Learnt from: AlexSkrypnyk
PR: #1816
File: .docker/cli.dockerfile:72-76
Timestamp: 2025-07-23T01:16:30.963Z
Learning: In the Vortex project, unauthenticated Composer installs should be allowed, so GitHub token secrets should not be marked as required=true in Docker build mounts. The conditional check if [ -s /run/secrets/github_token ] is the preferred approach to allow builds to proceed without a token when needed.

.vortex/installer/src/Utils/Config.php (3)

Learnt from: AlexSkrypnyk
PR: #1693
File: .vortex/installer/src/Prompts/Handlers/Internal.php:52-52
Timestamp: 2025-06-01T08:10:15.903Z
Learning: The File utility class in .vortex/installer/src/Utils/File.php extends AlexSkrypnyk\File\File, and methods like collapseRepeatedEmptyLines() are available from this external parent class dependency.

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: build (0)
  • GitHub Check: build (1)
  • GitHub Check: vortex-test-installer (8.2)
  • GitHub Check: vortex-test-installer (8.3)
  • GitHub Check: vortex-test-installer (8.4)
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-deployment (0)
  • GitHub Check: vortex-test-deployment (1)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-workflow (0)
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-common
  • GitHub Check: vortex-test-docs
🔇 Additional comments (21)
.vortex/tests/bats/e2e/workflow.install.profile.bats (2)

13-13: LGTM! Environment variable name updated correctly.

The variable name change from VORTEX_INSTALL_IS_DEMO_DB_DOWNLOAD_SKIP to VORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIP aligns with the PR objectives.


17-17: LGTM! Comment updated to match the new variable name.

The comment correctly references the updated environment variable name.

.vortex/installer/tests/Functional/PharTest.php (1)

129-129: LGTM! Environment variable name updated correctly.

The environment variable key has been properly updated from VORTEX_INSTALL_IS_DEMO_DB_DOWNLOAD_SKIP to VORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIP, maintaining consistency with the PR objectives.

.vortex/tests/bats/e2e/workflow.storage.image_cached.bats (2)

31-31: LGTM! Environment variable name updated correctly.

The export statement properly uses the updated variable name VORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIP, consistent with the renaming effort.


47-47: LGTM! Comment updated to reflect the new variable name.

The comment correctly references the updated environment variable name in the assertion explanation.

.vortex/tests/bats/e2e/workflow.storage.image.bats (2)

29-29: LGTM! Environment variable name updated correctly.

The export statement has been properly updated to use VORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIP, maintaining consistency with the renaming effort.


45-45: LGTM! Comment updated to match the new variable name.

The comment correctly references the updated environment variable name in the assertion explanation.

.vortex/tests/bats/e2e/update-vortex.bats (1)

48-49: Variable rename looks good

Export now uses VORTEX_INSTALLER_TEMPLATE_REF, matching the new convention. No additional occurrences of the old name are present in this script.

.vortex/tests/phpunit/Traits/Steps/StepDownloadDbTrait.php (1)

28-31: Consistent renaming applied

All internal references now use VORTEX_INSTALLER_DEMO_DB_TEST, matching the new constant. Good catch.

scripts/vortex/update-vortex.sh (1)

29-29: No backward-compatibility break detected
A repository-wide search for VORTEX_INSTALL_TEMPLATE_REPO returned no occurrences, so there’s no existing usage of the old name to preserve. The new VORTEX_INSTALLER_TEMPLATE_REPO can safely be the sole environment variable.

.vortex/tests/bats/_helper.workflow.bash (2)

59-59: Variable rename aligns with PR objectives.

The renaming of VORTEX_INSTALL_DEMO_DB_TEST to VORTEX_INSTALLER_DEMO_DB_TEST is consistent with the systematic variable prefix update described in the PR objectives.


86-86: Consistent variable rename implementation.

The variable renaming here matches the change in the assert_ahoy_download_db function, ensuring consistent usage of the new VORTEX_INSTALLER_ prefix throughout the test helpers.

.vortex/docs/content/contributing/maintenance/tests.mdx (2)

125-125: Documentation updated to reflect variable renaming.

The environment variable name has been correctly updated in the documentation to match the new VORTEX_INSTALLER_ prefix used throughout the codebase.


163-163: Consistent documentation update.

This second occurrence of the variable rename ensures the documentation remains consistent throughout the file.

.vortex/installer/src/Prompts/PromptManager.php (1)

388-388: Environment variable prefix updated systematically.

The change from 'VORTEX_INSTALL_PROMPT_' to 'VORTEX_INSTALLER_PROMPT_' ensures that all prompt-related environment variables follow the new naming convention established by this PR.

.vortex/tests/phpunit/Traits/Steps/StepPrepareSutTrait.php (3)

53-53: Template repository variable renamed consistently.

The VORTEX_INSTALL_TEMPLATE_REPO to VORTEX_INSTALLER_TEMPLATE_REPO rename maintains functionality while aligning with the new variable naming convention.


65-65: Demo database variable prefix updated.

The variable name change preserves the same functionality for specifying the demo database URL in tests.


68-68: Temporary directory variable renamed systematically.

The VORTEX_INSTALL_TMP_DIR to VORTEX_INSTALLER_TMP_DIR change completes the consistent renaming of installer-related environment variables in this method.

.vortex/docs/content/workflows/variables.mdx (1)

1150-1159: Documentation reorganized to consolidate variable information.

The VORTEX_INSTALLER_TEMPLATE_REPO variable documentation has been moved to consolidate duplicate content, improving the overall structure and readability of the variables documentation.

.vortex/tests/bats/_helper.bash (2)

140-146: No stale references to the legacy demo‐DB variable found

I ran the following search across the repository:

rg -n "VORTEX_INSTALL_DEMO_DB_TEST"

and found no occurrences of the old VORTEX_INSTALL_DEMO_DB_TEST name. The rename to VORTEX_INSTALLER_DEMO_DB_TEST is therefore safe.


1087-1095: Quote the generated TMP path to handle spaces

fixture_prepare_dir "${VORTEX_INSTALLER_TMP_DIR}" already quotes the variable, but the
assignment lines above don’t. If ${APP_TMP_DIR} accidentally contains spaces the
unquoted expansion during assignment or export can mis-split. A tiny defensive tweak:

-  VORTEX_INSTALLER_TMP_DIR="${APP_TMP_DIR}/$(random_string)"
-  fixture_prepare_dir "${VORTEX_INSTALLER_TMP_DIR}"
-  export VORTEX_INSTALLER_TMP_DIR
+  VORTEX_INSTALLER_TMP_DIR="${APP_TMP_DIR}/$(random_string)"
+  fixture_prepare_dir "${VORTEX_INSTALLER_TMP_DIR}"
+  export VORTEX_INSTALLER_TMP_DIR
⛔ Skipped due to learnings
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in `.vortex/installer/tests/Fixtures/install` directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: drevops/vortex#1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

Comment on lines +24 to 25
export VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES="artifact"

Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Duplicate export lines – keep only one to avoid confusion

VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES is exported twice (lines 24 and 121/123), and the group of prompt variables is repeated at 121-125 and again at 209-214. While harmless, this increases maintenance overhead.

-  export VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES="artifact"-  export VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES="lagoon"
-  export VORTEX_INSTALLER_PROMPT_HOSTING_PROVIDER="lagoon"
-  export VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES="lagoon"
+  # Set once – later repetitions removed.
+  export VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES="lagoon"
+  export VORTEX_INSTALLER_PROMPT_HOSTING_PROVIDER="lagoon"

Removing the duplicates keeps the test setup clearer and prevents accidental divergence if one value is updated and the other is missed.

Also applies to: 121-125

🤖 Prompt for AI Agents
In .vortex/tests/bats/e2e/deployment1.bats around lines 24-25 and also 121-125
and 209-214, there are duplicate export statements for
VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES and repeated groups of prompt variables. To
fix this, remove the duplicate export lines and repeated prompt variable groups,
keeping only one instance of each to reduce maintenance overhead and avoid
confusion or divergence in values.

// Ahoy will load environment variable, and it will take precedence over
// the value in .env file.
'VORTEX_DB_DOWNLOAD_URL' => static::VORTEX_INSTALL_DEMO_DB_TEST,
'VORTEX_DB_DOWNLOAD_URL' => static::VORTEX_INSTALLER_DEMO_DB_TEST,
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Potential undefined constant reference

getDefaultBuildEnv() relies on static::VORTEX_INSTALLER_DEMO_DB_TEST, but this trait itself does not define the constant and only uses LoggerTrait.
Runtime is safe as long as every test class that uses StepBuildTrait also pulls in a trait (e.g. StepDownloadDbTrait) or class that does declare the constant, but the coupling is implicit and fragile.

Consider either
• declaring the constant here (duplicating value once), or
• adding require-style documentation / type hinting, or
• moving shared constants to a dedicated trait or Config class that both traits include.

This will prevent fatal errors if StepBuildTrait is ever re-used in isolation.


🏁 Script executed:

#!/bin/bash
# Search for all occurrences of the constant
rg -n "VORTEX_INSTALLER_DEMO_DB_TEST"

# Locate the trait definitions to inspect whether they declare the constant
rg -n "trait StepBuildTrait" -R
rg -n "trait StepDownloadDbTrait" -R

# Check if any file defines the constant explicitly
rg -n "const VORTEX_INSTALLER_DEMO_DB_TEST" -R

Length of output: 1374


🏁 Script executed:

#!/bin/bash
# Locate and display the beginning of StepBuildTrait.php to check for constant definitions
file1=$(find . -type f -name StepBuildTrait.php | head -n1)
echo "=== $file1 ==="
sed -n '1,200p' "$file1"

# Locate and display the beginning of StepDownloadDbTrait.php to see if it declares the constant
file2=$(find . -type f -name StepDownloadDbTrait.php | head -n1)
echo "=== $file2 ==="
sed -n '1,200p' "$file2"

Length of output: 6011


Ensure VORTEX_INSTALLER_DEMO_DB_TEST is explicitly defined or centralized

The getDefaultBuildEnv() method in StepBuildTrait references

static::VORTEX_INSTALLER_DEMO_DB_TEST

but that constant is only declared in StepDownloadDbTrait. This implicit coupling can lead to fatal errors if StepBuildTrait is ever used in isolation.

Files to review:

  • .vortex/tests/phpunit/Traits/Steps/StepBuildTrait.phpgetDefaultBuildEnv() uses the constant
  • .vortex/tests/phpunit/Traits/Steps/StepDownloadDbTrait.php – defines const VORTEX_INSTALLER_DEMO_DB_TEST

Possible solutions:

  • Declare const VORTEX_INSTALLER_DEMO_DB_TEST directly in StepBuildTrait
  • Move shared constants into a new Config class or a dedicated trait that both can include
  • Add a docblock or @requires annotation on StepBuildTrait to document its dependency on the constant
🤖 Prompt for AI Agents
In .vortex/tests/phpunit/Traits/Steps/StepBuildTrait.php at line 94, the method
getDefaultBuildEnv() uses the constant VORTEX_INSTALLER_DEMO_DB_TEST which is
only defined in StepDownloadDbTrait, causing a hidden dependency. To fix this,
either define the constant directly in StepBuildTrait, or create a shared Config
class or trait containing this constant and have both traits use it.
Alternatively, add a docblock or @requires annotation in StepBuildTrait to
document the dependency explicitly.

@AlexSkrypnyk AlexSkrypnyk merged commit 07699b1 into develop Jul 26, 2025
30 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/renamed-installer-variables branch July 26, 2025 01:32
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Jul 26, 2025
@AlexSkrypnyk AlexSkrypnyk added this to the 25.7.0 milestone Jul 26, 2025
@AlexSkrypnyk AlexSkrypnyk moved this from Release queue to Released in 25.7.0 in Vortex Jul 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants