refactor(cloud): unify cloud and serverless under single cloud namespace#199
Merged
Conversation
…space Partial revert of #131. Merges the top-level `serverless` command back under `cloud` to match customer mental model where both Hosted Deployments and Serverless Projects are offerings of the same product (Elastic Cloud). New command tree: - `elastic cloud {account,authentication,organizations,user-role-assignments}` — cross-cutting APIs promoted to direct children. - `elastic cloud hosted <namespace>` — Hosted deployments, templates, extensions, stack versions, trusted envs, billing. - `elastic cloud serverless <...>` — Serverless projects (es, observability, security) plus regions, traffic-filters, linked-projects, etc. Top-level `serverless` command is removed. Clean break, no aliases (project is 0.1.0-alpha.1 and the old split landed in a recent PR). Closes #193
Contributor
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts MegaLinter is graciously provided by OX Security |
…dter-94d7c6 # Conflicts: # test/functional/cloud/smoke.sh
Replaces the inline `any[]` on the recursive visit helper with a local CommandNode interface, so the test conforms to the repo's @typescript-eslint/no-explicit-any rule.
7 tasks
JoshMock
approved these changes
Apr 17, 2026
JoshMock
left a comment
Member
There was a problem hiding this comment.
LGTM. Just double-checked that register.ts is not part of code generation, so no changes needed on that side.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #193. Partial revert of #131.
Summary
Unifies
elastic cloudandelastic serverlessunder a single top-levelcloudnamespace to match how customers actually think about the product (Elastic Cloud atcloud.elastic.co, with two offerings: Hosted Deployments and Serverless Projects).New tree:
Design notes
cloudchildren because they apply to both Hosted and Serverless:accounts(current-user account),authentication(Cloud API keys),organizations(org/IdP/domain-claims/invitations),user-role-assignments.cloud hosted:billing-costs-analysis(today's endpoints are deployment-indexed),trusted-environments(ECE/ESS-only concept).src/cloud/apis/*.ts,src/cloud/apis.ts, andsrc/cloud/serverless-apis.tsare untouched. The restructure happens at tree-assembly time insrc/cloud/register.ts.0.1.0-alpha.1and the misleading split landed recently in fix: update readme, cloud bugs #131. Partitioning inregister.tsuses two hardcoded namespace sets (PROMOTED_NAMESPACES,SERVERLESS_NAMESPACES) so synthetic-def tests partition deterministically.elastic es→elastic stackrename is deferred to a follow-up (orthogonal change, different codepath).Migration
elastic serverless es projects listelastic cloud serverless es projects listelastic cloud deployments list-deploymentselastic cloud hosted deployments list-deploymentselastic cloud stack get-version-stackselastic cloud hosted stack get-version-stackselastic cloud accounts get-current-accountelastic cloud organizations list-organizationsFiles changed
src/cli.ts— dropped the top-levelserverlessbranch; updatedclouddescription.src/cloud/register.ts— single publicregisterCloudCommandsthat partitions defs into promoted / hosted / serverless and composes the tree.registerServerlessCommandsremoved from the public API.test/cloud/register.test.ts— rewritten for the unified tree;simplifyProjectCommandNameunit tests retained.README.md—cloudandserverlesssections collapsed into onecloudsection.test/functional/cloud/smoke.sh— paths updated to new tree (the file was also out of sync with post-fix: update readme, cloud bugs #131 paths).Test plan
npx tsc --noEmitpasses.npm run test:unit— 797/797 passing (24 register-specific tests cover top-level tree, promoted namespaces, hosted subgroup, serverless subgroup, synthetic-def partitioning, validation, duplicate detection,--waiton create-project, absence of aliases).npm run test:lintclean.elastic cloud --helplistsaccounts,authentication,organizations,user-role-assignments,hosted,serverlessand nothing else.elastic cloud serverless es projects --helpshows short-name leaves (list,create,get,delete,patch,resume,get-status,get-roles,reset-credentials).serverless.npm run test:functional:cloud) against a real Cloud context — reviewer with creds to verify.