Skip to content

feat!: 3.0.0 — drop deprecated aliases, finalize ADR-0008 - #10

Draft
kallioli wants to merge 1 commit into
mainfrom
feat/3.0.0
Draft

feat!: 3.0.0 — drop deprecated aliases, finalize ADR-0008#10
kallioli wants to merge 1 commit into
mainfrom
feat/3.0.0

Conversation

@kallioli

Copy link
Copy Markdown
Contributor

Status: DRAFT — not for merge yet

This PR sketches the next major bump (3.0.0) and stays in draft until
we explicitly decide to ship breaking changes. It is rebuildable on top of
2.3.0 and currently passes the full test suite.

What this drops

Every ADR-0008 deprecated alias — 314 hyphenated leaves that 2.0.x →
2.3.x kept registering as deprecated=True façades. Scripts that still
call e.g. orca server attach-volume, orca placement resource-provider-list, or orca profile to-openrc will need to switch
to the openstackclient forms (orca server volume add, orca placement resource-provider list, orca profile export openrc).

Also gone:

  • orca_cli/core/aliases.py (private helper module — no external consumers).
  • orca doctor --list-deprecated and the ADR-0008: deprecated aliases informational row.
  • tests/test_naming_convention.py and tests/test_aliases.py
    ratchet tests.
  • Python 3.9 (already removed from requires-python on the 2.3.0
    build!: commit).

Why now

The migration the ADR triggered finished in 2.3.0 (eleven lots between
2026-04-20 and 2026-04-28). Keeping aliases live forever would defeat the
point of the migration — and orca doctor --list-deprecated on 2.3.x
already gives users a complete table to grep their scripts against.

How users prepare

On 2.3.x:

```
orca doctor --list-deprecated
```

The table prints every legacy invocation alongside the new path. ~95 % of
mappings are mechanical (`noun verb-noun` → `noun verb sub`).
Compound-verb leaves keep their hyphen by design (`server confirm-resize`,
`server port-forward`, `volume upload-to-image`, `zone reverse-lookup`,
`image share-and-accept`, `floating-ip bulk-release`).

Validation

  • ruff: clean
  • mypy: clean
  • pytest: 2451 passed, 1 skipped, 74 deselected
  • coverage: 87.63 %

How this PR was built

  1. Branch feat/3.0.0 from main (post-2.3.0).
  2. Script-driven removal of add_command_with_alias() calls across
    27 command modules (driven by the 2.3.0 alias inventory).
  3. doctor.py cleanup — drop --list-deprecated and section 6.5.
  4. Delete orca_cli/core/aliases.py,
    tests/test_naming_convention.py, tests/test_aliases.py.
  5. pyproject.toml version = "3.0.0"; CHANGELOG.md entry.
  6. Test-suite rewrite: 614 invoke([...]) calls migrated; parametrize
    blocks pruned of legacy names.
  7. Three isinstance(x, (A, B)) calls flipped to
    isinstance(x, A | B) (PEP 604, fall-out from the 3.10 floor).

Test plan

  • Wait until we want to ship a breaking change before merging.
  • On merge, run the full live e2e suite against DevStack + at least one
    non-DevStack cloud (Infomaniak / Sharktech) to confirm no real-world
    consumers break beyond the documented migration.
  • Tag v3.0.0 only after a deliberate decision (not auto on push).

This is the major bump that retires the 314 hyphenated command
aliases ADR-0008 had kept on as ``deprecated=True`` façades since
2.0.x. Every command in the live tree now follows the
openstackclient ``noun [subnoun] verb`` convention; legacy
invocations are no longer accepted.

Removed:

- 314 ``add_command_with_alias()`` calls across 27 command modules.
- ``orca_cli/core/aliases.py`` (private module) — no external
  consumers.
- ``orca doctor --list-deprecated`` and the ``ADR-0008: deprecated
  aliases`` informational row.
- ``tests/test_naming_convention.py`` and ``tests/test_aliases.py``
  — the ratchet tests are obsolete; the live tree carries zero
  hyphenated leaves outside the documented permanent exceptions.

Tests migrated:

- 614 ``invoke([...])`` / ``live_invoke(...)`` calls rewritten to
  the new paths.
- ``@pytest.mark.parametrize`` blocks that enumerated hyphenated
  legacy names had those entries dropped (or the block was rewritten
  to test the new sub-group's ``--help``).

Plus three ``isinstance(x, (A, B))`` calls flipped to
``isinstance(x, A | B)`` (PEP 604, ruff UP038) — fall-out from the
3.10 floor.

Validation: ruff clean, mypy clean, ``pytest`` 2451 passed,
coverage 87.63 %.

Migration guide and the full mapping live in ``CHANGELOG.md``
(3.0.0 entry) and
``docs/adr/0008-command-naming-convention.md`` (deprecation horizon).
kallioli added a commit that referenced this pull request May 18, 2026
Cristallise les 13 commits livrés depuis 2.3.0 :

- Manila (orca share) — 18ème service supporté
- Nova, Cinder, Neutron à parité OSC complète (admin first-class)
- Glance image list --visibility
- doctor --list-deprecated
- Python 3.10 floor + pyupgrade (Dict→dict, Optional→| None)
- ADR-0008 deprecation horizon ciblée à 3.0.0

Additif — pas de breaking change. 2716 tests passent, couverture
87.3 %. Le drop des alias hyphénés ADR-0008 et le drop Python 3.9
(déjà sur main) seront groupés dans 3.0.0 (PR draft #10).
Vinetos pushed a commit to Vinetos/orca-cli that referenced this pull request May 30, 2026
…calls

Closes the last open finding from the audit's batch-command list
(stackopshq#10 in the original audit). The previous shape:

  Phase 1: 6 sequential fetches building lookup maps
           (images, servers, networks, subnets, ports, fips)
  Phase 2: 8 sequential _collect_* helpers, each re-fetching its
           own resource (images, servers, networks, fips and ports
           pull the same endpoints again — 5 of the 6 maps were
           paid for twice).

  Total: ~15 sequential HTTP calls per export.

The new shape:

  Phase 1: one HTTP call per resource type, all in a single
           ThreadPoolExecutor fan-out. _DEPS maps each requested
           export type to its transitive raw-fetch dependencies, so
           ``--resources keypairs`` only pays for the keypairs call,
           not all nine.
  Phase 2: lookup maps are derived in-memory from the fetched lists.
           _collect_* helpers now take pre-fetched data; no HTTP
           calls happen in collectors.

  Total: up to 10 parallel HTTP calls; in practice often fewer.

Routers' interface ports are filtered client-side from the full
ports fetch (was a separate ``device_owner=...`` query — gone).

Estimated wall-clock: ~2.1 s → ~150 ms on the full export at
100 ms latency per call (≈93 % reduction). The exact number depends
on tenant size; the worst-case is now bounded by the slowest single
call, not their sum.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant