-
Notifications
You must be signed in to change notification settings - Fork 191
feat: region expansion #1333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: region expansion #1333
Conversation
…egionExpansion_profileSubcomman the commit.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1333 +/- ##
==========================================
+ Coverage 14.47% 17.92% +3.44%
==========================================
Files 2345 1844 -501
Lines 204313 164489 -39824
Branches 184677 144685 -39992
==========================================
- Hits 29568 29477 -91
+ Misses 173288 133562 -39726
+ Partials 1457 1450 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…veloper-cli into feature/region-expansion
…veloper-cli into feature/region-expansion
} | ||
|
||
select_profile_interactive(true).await?; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the whoami
variable in select_profile_interactive
to false in the profile subcommand and set it to true in the login flow. The idea is that when users log in and only have one profile, we automatically select it and skip the profile selection step. However, when switching profiles, users will still be able to see and select from their available profiles.
if profiles.is_empty() { | ||
info!("Available profiles was empty"); | ||
return Ok(()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every IdC user should have at least one profile. Should we consider throwing an error message if the profile list is empty or if fetching the profiles fails?
inner::Inner::Consolas(_) => Err(Error::UnsupportedConsolas("list_available_profiles")), | ||
inner::Inner::Mock => Ok(vec![ | ||
Profile { | ||
arn: "my:arn:1".to_owned(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - use a valid arn format for these
|
||
let _ = fig_settings::state::remove_value("api.selectedCustomization"); | ||
|
||
if let Some(profile_region) = profile.arn.split(':').nth(3) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - could use a Profile::arn
method for parsing the region out
|
||
#[derive(Debug, Deserialize, Serialize)] | ||
pub struct Profile { | ||
pub arn: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating an Arn
type which has a structure region already parsed out would be neat, instead of silently failing if arn is somehow ever invalid
* add user profile sub command with mock profiles * checkpoint * modify protos and add handlers * coorprate with real response * remove unused code * add profile in whoami * hi yifan * byebye ctrlc handler * hi chay (add profile_arn) * remove nonstreaming q client * add profile telemetry * add profile selector in dashboard * cleanup * revise whoami flag in login&profile command flow * add amazonq_profileState * finish up major tasks * fix lints --------- Co-authored-by: YIFAN LIU <evannliu@amazon.com>
No description provided.