Skip to content

[Do not Merge] CLI-1793: Consume Cloud API v3 OpenAPI spec in ACLI (#2011)#2018

Draft
deepakmishra2 wants to merge 2 commits into
mainfrom
feature/meo-v3-gateway
Draft

[Do not Merge] CLI-1793: Consume Cloud API v3 OpenAPI spec in ACLI (#2011)#2018
deepakmishra2 wants to merge 2 commits into
mainfrom
feature/meo-v3-gateway

Conversation

@deepakmishra2

Copy link
Copy Markdown
Contributor

Bumps the dependencies group with 2 updates: guzzlehttp/guzzle and ramsey/uuid.

Updates guzzlehttp/guzzle from 7.11.1 to 7.12.1

Updates ramsey/uuid from 4.9.2 to 4.9.3


updated-dependencies:

  • dependency-name: guzzlehttp/guzzle dependency-version: 7.12.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies
  • dependency-name: ramsey/uuid dependency-version: 4.9.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies ...
  • CLI-1793: Spike — POC to consume Cloud API v3 OpenAPI spec in ACLI

Adds a parallel command-generation path for v3 specs sourced from acquia/api-specs, without touching the existing v2 or ACSF pipelines.

  • composer.json: new update-acquia-v3-spec script that bundles site-service-php + environment-service-php via redocly, then translates legacy x-cli-name to ARB-550's x-acquia-exposure.channels.cli.command at the consumption boundary.
  • src/Command/Api/ApiCommandHelper.php: extracted getCliCommandName() and normalizePath() as protected template methods. v2 behavior unchanged (defaults return legacy key / input path).
  • src/Command/Api/ApiV3CommandHelper.php: subclass with strict ARB-550 key lookup (no legacy fallback) and /v3/ path prefixing for env-service endpoints (site-service endpoints are not prefixed on the live gateway and are left untouched).
  • bin/acli: register api:v3:* commands under a file_exists guard, reusing the existing ApiCommandFactory.
  • assets/acquia-v3-spec.json: first v3 bundle (20 operations across site-service-php + environment-service-php).
  • docs/poc/acquia-v3-spec-ingestion.md: findings doc with go/no-go recommendation, upstream dependency tracking (API-1678 KaaS server, API-1674 CLI directive, acquia/api-specs PR Cleanup refresh test. #46 bundling fixes), and a cleanup plan for each jq transform once upstream catches up.

Tests: 32 pass / 159 assertions. 4 ARB-550 key cases, 4 path normalization cases, 6 spec-file sanity checks, 5 real-bundle E2E tests, plus v2 regression coverage via ApiCommandHelperTest and ApiListCommandTest.

Live-verified end-to-end:

  • api:v3:environments:find <uuid> returns 200 OK with real MEO env data from the production Cloud Platform gateway.
  • api:v3:sites:duplicate accepted (202) and created a real duplicated site.
  • No regressions on api:* (378 v2 commands) or acsf:* (128 commands).
  • fix mutation testing.

  • fix test and v3 changes.

  • fix site instance issue.

  • Fix gateway url and logic update.

  • mutation test added

  • fix cves.

  • fix test.

  • fix test

  • feedback changes.

  • update spec.

  • add more test.

  • add stability flag

  • mutation testing fix.

  • mutation test fix.

  • logic for audience added.

  • mutation fix again

  • update make redocly call

  • CLI-1796: Productionize the v3 commands for CLI. (CLI-1796: Productionize the v3 commands for CLI. #2013)

  • CLI-1796: Productionize the v3 commands for CLI.

  • fix CI.

  • remove CI logic.

  • ran composer command to update spec.

  • update git ssh url.


Motivation

Fixes #NNN

Proposed changes

Alternatives considered

Testing steps

  1. Follow the contribution guide to set up your development environment or download a pre-built acli.phar for this PR.
  2. If running from source, clear the kernel cache to pick up new and changed commands: ./bin/acli ckc
  3. Check for regressions: (add specific steps for this pr)
  4. Check new functionality: (add specific steps for this pr)

* Bump the dependencies group with 2 updates (#2010)

Bumps the dependencies group with 2 updates: [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) and [ramsey/uuid](https://github.com/ramsey/uuid).

Updates `guzzlehttp/guzzle` from 7.11.1 to 7.12.1
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/7.12/CHANGELOG.md)
- [Commits](guzzle/guzzle@7.11.1...7.12.1)

Updates `ramsey/uuid` from 4.9.2 to 4.9.3
- [Release notes](https://github.com/ramsey/uuid/releases)
- [Changelog](https://github.com/ramsey/uuid/blob/4.x/CHANGELOG.md)
- [Commits](ramsey/uuid@4.9.2...4.9.3)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-version: 7.12.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: ramsey/uuid
  dependency-version: 4.9.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* CLI-1793: Spike — POC to consume Cloud API v3 OpenAPI spec in ACLI

Adds a parallel command-generation path for v3 specs sourced from
`acquia/api-specs`, without touching the existing v2 or ACSF pipelines.

- composer.json: new `update-acquia-v3-spec` script that bundles
  site-service-php + environment-service-php via redocly, then
  translates legacy `x-cli-name` to ARB-550's
  `x-acquia-exposure.channels.cli.command` at the consumption boundary.
- src/Command/Api/ApiCommandHelper.php: extracted `getCliCommandName()`
  and `normalizePath()` as protected template methods. v2 behavior
  unchanged (defaults return legacy key / input path).
- src/Command/Api/ApiV3CommandHelper.php: subclass with strict ARB-550
  key lookup (no legacy fallback) and `/v3/` path prefixing for
  env-service endpoints (site-service endpoints are not prefixed on
  the live gateway and are left untouched).
- bin/acli: register `api:v3:*` commands under a `file_exists` guard,
  reusing the existing `ApiCommandFactory`.
- assets/acquia-v3-spec.json: first v3 bundle (20 operations across
  site-service-php + environment-service-php).
- docs/poc/acquia-v3-spec-ingestion.md: findings doc with go/no-go
  recommendation, upstream dependency tracking (API-1678 KaaS server,
  API-1674 CLI directive, acquia/api-specs PR #46 bundling fixes),
  and a cleanup plan for each jq transform once upstream catches up.

Tests: 32 pass / 159 assertions. 4 ARB-550 key cases, 4 path
normalization cases, 6 spec-file sanity checks, 5 real-bundle E2E
tests, plus v2 regression coverage via ApiCommandHelperTest and
ApiListCommandTest.

Live-verified end-to-end:
- `api:v3:environments:find <uuid>` returns 200 OK with real MEO env
  data from the production Cloud Platform gateway.
- `api:v3:sites:duplicate` accepted (202) and created a real
  duplicated site.
- No regressions on `api:*` (378 v2 commands) or `acsf:*` (128 commands).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix mutation testing.

* fix test and v3 changes.

* fix site instance issue.

* Fix gateway url and logic update.

* mutation test added

* fix cves.

* fix test.

* fix test

* feedback changes.

* update spec.

* add more test.

* add stability flag

* mutation testing fix.

* mutation test fix.

* logic for audience added.

* mutation fix again

* update make redocly call

* CLI-1796: Productionize the v3 commands for CLI. (#2013)

* CLI-1796: Productionize the v3 commands for CLI.

* fix CI.

* remove CI logic.

* ran composer command to update spec.

* update git ssh url.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@deepakmishra2 deepakmishra2 force-pushed the feature/meo-v3-gateway branch from 33243c5 to c2df57a Compare July 10, 2026 10:21
@deepakmishra2 deepakmishra2 self-assigned this Jul 10, 2026
@deepakmishra2 deepakmishra2 added the breaking change Requires change record label Jul 10, 2026
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.61111% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.52%. Comparing base (4f6ac74) to head (201a90f).

Files with missing lines Patch % Lines
src/Command/Ide/IdeCreateCommand.php 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2018      +/-   ##
============================================
+ Coverage     92.49%   92.52%   +0.03%     
- Complexity     1991     2016      +25     
============================================
  Files           123      126       +3     
  Lines          7232     7292      +60     
============================================
+ Hits           6689     6747      +58     
- Misses          543      545       +2     

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

@github-actions

Copy link
Copy Markdown

Try the dev build for this PR: https://acquia-cli.s3.amazonaws.com/build/pr/2018/acli.phar

curl -OL https://acquia-cli.s3.amazonaws.com/build/pr/2018/acli.phar
chmod +x acli.phar

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

Labels

breaking change Requires change record

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant