Skip to content

[#2725] Moved 'require-tooling' into the ahoy entrypoint.#2735

Merged
AlexSkrypnyk merged 6 commits into
mainfrom
feature/2725-tooling-entrypoint
Jun 26, 2026
Merged

[#2725] Moved 'require-tooling' into the ahoy entrypoint.#2735
AlexSkrypnyk merged 6 commits into
mainfrom
feature/2725-tooling-entrypoint

Conversation

@AlexSkrypnyk

@AlexSkrypnyk AlexSkrypnyk commented Jun 26, 2026

Copy link
Copy Markdown
Member

Closes #2725

Seven host-side ahoy commands (fetch-db, fetch-db2, export-db, import-db, deploy, doctor, update-vortex) each began with an inline ahoy require-tooling call. That call, and the now-unused hidden require-tooling command, are removed. The ahoy entrypoint now ensures the drevops/vortex-tooling package is present in vendor/ (by running ./scripts/vortex-tooling.sh) for every top-level ahoy invocation. An exported flag (AHOY_VORTEX_TOOLING_READY) causes the nested ahoy calls that a command chains internally to skip the check - this matters because ahoy build runs ahoy reset (which does rm -rf ./vendor) and then ahoy up; without the flag that nested ahoy up would trigger a redundant tooling reinstall, which also fails in the functional-test SUT where the package is not yet on Packagist. The guard lives entirely in the entrypoint, so scripts/vortex-tooling.sh stays caller-agnostic (it only answers "is the tooling present?"). Net effect: the seven commands are cleaner, and every top-level command - including info/login/provision which previously did not ensure tooling - now does. The fixture changes are regenerated installer snapshots reflecting the updated .ahoy.yml.

Before / After

BEFORE — tooling check duplicated in each command
──────────────────────────────────────────────────────────────────────
  entrypoint:
    - bash -e -c "..."          # loads .env; no tooling check

  fetch-db:
    ahoy require-tooling        # ← each command runs its own check
    ./vendor/.../fetch-db

  export-db / import-db / deploy / doctor / update-vortex / fetch-db2:
    ahoy require-tooling        # ← duplicated in every one
    ./vendor/.../...

  require-tooling (hidden):     # ← dedicated command for the check
    cmd: ./scripts/vortex-tooling.sh

AFTER — single entrypoint check; flag prevents nested re-runs
──────────────────────────────────────────────────────────────────────
  entrypoint:
    - bash -e -c "..."          # loads .env
    if [ -z "${AHOY_VORTEX_TOOLING_READY:-}" ]; then export AHOY_VORTEX_TOOLING_READY=1; ./scripts/vortex-tooling.sh; fi
    bash -e -c "$0" "$@"

  fetch-db:                     # ← clean; no require-tooling call
    ./vendor/.../fetch-db

  export-db / import-db / deploy / doctor / update-vortex / fetch-db2:
    ./vendor/.../...            # ← all clean

  # require-tooling command removed entirely
  # nested calls (e.g. ahoy build → ahoy reset → ahoy up) skip via the flag
  # scripts/vortex-tooling.sh stays caller-agnostic (just "is tooling present?")

Summary by CodeRabbit

  • Bug Fixes
    • Simplified command execution: key workflow commands no longer require an explicit pre-step to ensure needed tooling is available.
    • Improved environment handling by automatically loading settings from .env and (when present) .env.local before running commands.
    • Reduced repeated setup work by ensuring the Vortex tooling setup script runs only once per command run, improving reliability and speed.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

.ahoy.yml moves tooling bootstrap into the entrypoint, loads environment files before commands run, and removes explicit ahoy require-tooling steps from fetch, export/import, deploy, doctor, and update-vortex commands.

Changes

Ahoy tooling bootstrap

Layer / File(s) Summary
Entrypoint bootstrap
.ahoy.yml
Sources .env and .env.local, runs ./scripts/vortex-tooling.sh once per command via AHOY_VORTEX_TOOLING_READY, and removes the require-tooling command definition.
Fetch commands
.ahoy.yml
fetch-db and fetch-db2 no longer call ahoy require-tooling before their fetch and freshness-flag logic.
Import, export, and maintenance commands
.ahoy.yml
export-db, import-db, deploy, doctor, and update-vortex no longer run ahoy require-tooling and now call their tooling entrypoints directly.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • drevops/vortex#2728: Introduces the ahoy require-tooling call in import-db, which this PR removes from that command path.

Suggested labels

Needs review

Poem

A rabbit hopped through Ahoy's little gate,
Sipping .env before it got late.
One tooling spell, then off it ran,
No extra steps in the command plan,
Hooray for tidy hops and a cleaner crate 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes moving require-tooling into the ahoy entrypoint.
Linked Issues check ✅ Passed The changes remove inline require-tooling calls, delete the hidden command, and centralize tooling checks in the entrypoint as requested.
Out of Scope Changes check ✅ Passed No unrelated changes are evident beyond the entrypoint and command cleanup needed for the issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/2725-tooling-entrypoint

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

@AlexSkrypnyk AlexSkrypnyk added the A3 Board worker 3 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.

@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 (c018252) to head (629bb68).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2735      +/-   ##
==========================================
- 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

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

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

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

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

@AlexSkrypnyk AlexSkrypnyk moved this from BACKLOG to In progress in Vortex 1.x Jun 26, 2026
@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/2725-tooling-entrypoint branch from 7ea01b8 to 629bb68 Compare June 26, 2026 01:26
@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 df82fa6 into main Jun 26, 2026
34 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/2725-tooling-entrypoint branch June 26, 2026 02:22
@github-project-automation github-project-automation Bot moved this from In progress 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

A3 Board worker 3 Needs review Pull request needs a review from assigned developers

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

Move ahoy require-tooling to the ahoy enttrypoint to keep commands clean

1 participant