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

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

Build:
DEFAULT BRANCH: main
Ran 22 Apr 2026 04:42PM UTC
Files 195
Run time 6s
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.1

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

25081 of 63502 relevant lines covered (39.5%)

9.54 hits per line

Source Files on job 5903445d-4be9-4f20-89b7-53d8ac3a5048.1
  • Tree
  • List 195
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 5903445
  • fe1d2d35 on github
  • Prev Job for on main (#fd706254-7889-4200-94a5-969d025abb71.1)
  • Next Job for on main (#62fe5ed5-6e34-49b5-8031-8ab30a16f150.1)
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