• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

astronomer / astro-cli / 5903445d-4be9-4f20-89b7-53d8ac3a5048
40%

Build:
DEFAULT BRANCH: main
Ran 22 Apr 2026 04:42PM UTC
Jobs 1
Files 195
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Apr 2026 04:35PM UTC coverage: 39.496% (+0.004%) from 39.492%
5903445d-4be9-4f20-89b7-53d8ac3a5048

push

circleci

web-flow
fix: org switch silently falls back to wrong org when user has >20 orgs (#2084)

When a user belonged to more organizations than the API's default page size and ran `astro organization switch`, selecting any org beyond position 20 would silently switch to the wrong org (the first in the list) instead of the chosen one.

Root cause: after the user picks an org, `CheckUserSession` re-fetches the org list to resolve the active org with no `Limit` set, so the API returned only its default 20. When the chosen org wasn't in those 20, the code silently fell back to `orgs[0]`.

Fix: resolve the active org by ID via `GetOrganization` rather than list-and-search. On 403/404 (membership revoked, org deleted, state from a prior account), fall through to list-and-pick-first so users with stale context still land somewhere usable — see #2097 for the lifecycle cleanup that would let us drop that fallback.

Closes #2083

21 of 29 new or added lines in 1 file covered. (72.41%)

25081 of 63502 relevant lines covered (39.5%)

9.54 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
85.8
-0.71% cloud/auth/auth.go
Jobs
ID Job ID Ran Files Coverage
1 5903445d-4be9-4f20-89b7-53d8ac3a5048.1 22 Apr 2026 04:42PM UTC 195
39.5
Source Files on build 5903445d-4be9-4f20-89b7-53d8ac3a5048
  • Tree
  • List 195
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • CircleCI Build #5903445D...
  • fe1d2d35 on github
  • Prev Build on main (#FD706254...)
  • Next Build on main (#62FE5ED5...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc