Repository navigation
fix: Return upload errors instead of silently swallowing them - #2316
Conversation
Upload failures for `describe affected --upload` and `list instances --upload` were silently swallowed — the CLI logged a warning but returned success. This meant misconfigured credentials (missing ATMOS_PRO_TOKEN or ATMOS_PRO_WORKSPACE_ID) or server-side rejections (e.g. workspace access denied) were invisible to users. Also sets User-Agent header on all Atmos Pro API requests to `atmos/<version> (<os>; <arch>)` instead of the default `Go-http-client/1.1`. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
Dependency Review✅ No vulnerabilities or license issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughFail fast on Atmos Pro API client creation and on upload errors; add a User-Agent header to Pro API requests; update tests to expect Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2316 +/- ##
==========================================
+ Coverage 77.23% 77.27% +0.04%
==========================================
Files 1074 1074
Lines 101888 101897 +9
==========================================
+ Hits 78689 78737 +48
+ Misses 18854 18819 -35
+ Partials 4345 4341 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Replace hint suggesting ATMOS_PRO_TOKEN (tokens are always minted via OIDC) with guidance on `id-token: write` workflow permission. Use backticks for environment variable names. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Create a dedicated /pro landing page covering authentication, affected stacks upload, component instances, stack locking, and drift detection. Follows the same pattern as /ai and /ci pages. Update the --upload error hint URL to point to atmos.tools/pro. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add a "Why Atmos Pro?" section that draws a clear line between CLI (execution layer — every company needs this) and Pro (control plane — coordination across teams, repos, orgs at scale). Emphasize that Pro doesn't need elevated cloud access because the CLI owns execution. Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
website/docs/pro/pro.mdx (1)
66-80: Consider clarifying what's "automatic" in the tip.The example shows explicit
!envmappings, but the tip says fields are "automatically populated." You might clarify that GitHub Actions provides the environment variables automatically, but the config mapping is still required::::tip GitHub Actions automatically provides the `ACTIONS_ID_TOKEN_REQUEST_URL` and `ACTIONS_ID_TOKEN_REQUEST_TOKEN` environment variables when `id-token: write` is granted. You only need to map them in your config and set `workspace_id`. :::🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@website/docs/pro/pro.mdx` around lines 66 - 80, Clarify the tip to state that GitHub Actions supplies the environment variables but you still must map them in the config: update the prose around the existing github_oidc example to explicitly mention that ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN are provided by GitHub Actions when the workflow has id-token: write, and that the YAML block (github_oidc with !env mappings) is still required alongside setting workspace_id; reference the existing github_oidc block and the two env names (ACTIONS_ID_TOKEN_REQUEST_URL, ACTIONS_ID_TOKEN_REQUEST_TOKEN) when editing the tip text.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@website/docs/pro/pro.mdx`:
- Around line 66-80: Clarify the tip to state that GitHub Actions supplies the
environment variables but you still must map them in the config: update the
prose around the existing github_oidc example to explicitly mention that
ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN are provided by
GitHub Actions when the workflow has id-token: write, and that the YAML block
(github_oidc with !env mappings) is still required alongside setting
workspace_id; reference the existing github_oidc block and the two env names
(ACTIONS_ID_TOKEN_REQUEST_URL, ACTIONS_ID_TOKEN_REQUEST_TOKEN) when editing the
tip text.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ffc0cc1e-1b1c-4240-b047-b862e8f4f054
📒 Files selected for processing (3)
internal/exec/describe_affected.gowebsite/docs/pro/pro.mdxwebsite/sidebars.js
✅ Files skipped from review due to trivial changes (1)
- website/sidebars.js
🚧 Files skipped from review as they are similar to previous changes (1)
- internal/exec/describe_affected.go
Add toolchains, inheritance, templating, and vendoring to the CLI description to better represent the full execution layer. Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@website/docs/pro/pro.mdx`:
- Around line 195-199: Update the troubleshooting checklist for `--upload` auth
failures to explicitly mention `ATMOS_PRO_TOKEN` as an alternative to
`ATMOS_PRO_WORKSPACE_ID`: modify the list item that currently says "Confirm
`ATMOS_PRO_WORKSPACE_ID` is set to the correct workspace" to indicate that users
should set either `ATMOS_PRO_WORKSPACE_ID` or `ATMOS_PRO_TOKEN` depending on
their flow, and ensure the surrounding text references the CLI hint behavior for
`--upload` so the docs and CLI are consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 767a2cf0-ed06-4c91-be1c-c6e07a9a4ca1
📒 Files selected for processing (1)
website/docs/pro/pro.mdx
Make it clear that upload commands run from GitHub Actions workflows, not locally. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Remove the github_oidc config block from the Authentication section — those fields are auto-populated in GitHub Actions and showing them implies manual configuration. Add Atmos Pro badge linking to atmos-pro.com near the top of the page. Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@website/docs/pro/pro.mdx`:
- Around line 187-189: The doc currently presents ATMOS_PRO_TOKEN
(settings.pro.token) as a user-facing env var; update the `ATMOS_PRO_TOKEN`
entry to indicate it is an internal/runtime-managed token obtained via OIDC
token exchange and not a user-configurable credential (or remove the bullet
entirely). Specifically, change the description for `ATMOS_PRO_TOKEN` to state
it’s generated and managed by the OIDC flow (advanced/internal use only) and add
a short note that end users should not set this value manually, referencing
`settings.pro.token` for implementer context.
- Around line 195-199: The troubleshooting checklist under the "`--upload` fails
with an authentication error" section mixes auth and authorization checks;
remove the "Check that the Atmos Pro GitHub App is installed on your repository"
bullet from this auth-failure list and instead add it to the 403 / authorization
failure section, keeping only OIDC/`id-token: write` and
`ATMOS_PRO_WORKSPACE_ID` checks in the authentication section so the CLI hints
align with the website docs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 66f6d568-583c-40b5-8c0f-cb779bef7531
📒 Files selected for processing (2)
website/docs/pro/pro.mdxwebsite/docusaurus.config.js
✅ Files skipped from review due to trivial changes (1)
- website/docusaurus.config.js
Add tests for error hint propagation in upload paths, direct userAgent() test, and OIDC token exchange error-status non-JSON path. Fix ATMOS_PRO_TOKEN doc per CodeRabbit review to clarify it's internal/runtime-managed. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
These changes were released in v1.215.0-rc.8. |
what
describe affected --uploadandlist instances --uploadnow return errors instead of silently swallowing them when the Atmos Pro API client cannot be created or the upload failsdescribe affected --uploadreturns actionable hints guiding users to setATMOS_PRO_TOKENorATMOS_PRO_WORKSPACE_IDUser-Agentheader (atmos/<version> (<os>; <arch>)) instead of the Go defaultGo-http-client/1.1why
User-Agentheader made it difficult to identify Atmos CLI traffic in server logsreferences
Workspace does not have access to repositorywas logged server-side but never surfaced to the CLI userSummary by CodeRabbit
Bug Fixes
New Features
Documentation
Tests