Skip to content

Add babylon CLI#3210

Open
fridim wants to merge 36 commits into
mainfrom
cli
Open

Add babylon CLI#3210
fridim wants to merge 36 commits into
mainfrom
cli

Conversation

@fridim

@fridim fridim commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Stack created with GitHub Stacks CLIGive Feedback 💬

Base automatically changed from cli-redirect to main April 16, 2026 08:09
fridim added 13 commits April 16, 2026 13:52
Move parseEndDate, convertParamValue, and parseDurationString to cmd/helpers.go so they can be reused by upcoming workshop commands. No functional changes.
Add workshop list subcommand that displays workshops in a table with name, display name, seats (used/total), status, and age. Filters out workshops being deleted.
Help users clean up orphaned workshops when provision creation fails.
Show per-seat provisioning state and timing metrics (first/last ready)
useful for load testing. Lists ResourceClaims by workshop label and
derives ready timestamps from lifespan.start.
Poll until all seats are ready and report total provisioning time.
Remove misleading first/last ready timestamps (API doesn't record
state transition times).
Fetch full AnarchySubject via catalog-api proxy to get
towerJobs.provision.completeTimestamp per seat. Shows first/last ready
timing relative to workshop creation.
Remove omitempty from OpenRegistration, MultiuserServices, and
ProvisionDisabled. Go's omitempty drops false bools from JSON, causing
the K8s API to store null instead of false. This broke the reporting
pipeline which expects an explicit boolean value.

@marcosmamorim marcosmamorim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

K8s will now auto-set multiuserServices, openRegistration, and
provisionDisabled to false when omitted, preventing null values
that break the reporting pipeline.

@marcosmamorim marcosmamorim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

fridim added 10 commits April 16, 2026 21:58
Enable macOS M1 (and other platform) users to build babylon-cli
with `make babylon-cli-cross` in cli/. Follows the same pattern
as sandbox-cli-cross.
Show credentials, endpoints, and access URLs from provision_data
in service status output. Display tower job timestamps and AnarchySubject
details (governor, GUID) per resource. Include resource handle
namespace and service URL from annotations.

Ref: GPTEINFRA-16537
'babylon services list' now works as a natural alias alongside
'babylon service list' and 'babylon svc list'.

Ref: GPTEINFRA-16537
Make it clear that the server URL is the web UI URL users already
know (e.g. demo.redhat.com), not a separate API endpoint. Add
more usage examples.

Ref: GPTEINFRA-16537
FindCatalogItem iterates all catalog namespaces. When the user
lacks access to a namespace, the API returns 403 which was treated
as a fatal error. Now 403 is skipped like 404, so the search
continues to the next namespace.

Ref: GPTEINFRA-16537
Helps diagnose slow commands by showing how long each API call
takes (e.g. session fetch vs actual request).

Example: [debug] Response: 200 OK (2.3s)
The browser login callback was capturing all browser cookies
(analytics, tracking, Adobe, HotJar, Intercom, etc.) and sending
them with every API request. Filter to only keep __oauth_proxy-*
cookies which are the only ones needed for authentication.

Users must re-login after this change for the fix to take effect.
Display the AAP/Tower job URL for each action (provision, destroy,
etc.) so users can jump directly to job logs.
The API returns bare hostnames for tower job URLs. Prefix with
https:// so they render as clickable links in terminals.
fridim added 7 commits April 29, 2026 13:57
Move provider, lifespan, and URL to the top section with other
key info. Resources, tower jobs, and provision data follow as
detailed sections.
Use UTF-8 box-drawing characters (├──, └──, │) to visually link
tower jobs to their parent resource in the status output.
Display relative time next to the lifespan end timestamp, e.g.:
  Lifespan End: 2026-04-30T11:52:28Z (in 23h42m)
  Lifespan End: 2026-04-07T15:31:28Z (21d ago)
…space

The default namespace is the user's service namespace (e.g.
user-gucore-redhat-com-1) which always returns 403 for catalog
lookups. Now catalog describe uses FindCatalogItem to search
across catalog namespaces unless -n is explicitly passed.
Workflow triggers on cli-v* tags or manual dispatch. Builds the
babylon binary for linux, darwin, and windows on amd64 and arm64.
Creates a GitHub release with all binaries and sha256 checksums.

Also renames binary from babylon-cli to babylon.
Remove after verifying the workflow works.
Comment thread .github/workflows/cli-release.yaml Fixed
fridim added 2 commits April 29, 2026 16:38
- actions/checkout v4 → v5
- actions/setup-go v5 → v6
- actions/upload-artifact v4 → v5
demo.redhat.com redirects to catalog.demo.redhat.com. Go's default
HTTP client downgrades POST/PATCH/DELETE to GET on 301/302/303
redirects, so mutating API calls (order, stop, start, retire) silently
hit the list endpoint instead. The response parses as valid JSON but
with empty metadata, making it look like the operation succeeded with
no data.

- Preserve original method, body, headers, and cookies across redirects
- Auto-update BaseURL after hostname redirect so subsequent requests
  skip the redirect entirely
- Add defensive gzip decompression fallback for proxy chain edge cases
- Log Content-Encoding header in debug output
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.

4 participants