-
Notifications
You must be signed in to change notification settings - Fork 87
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
base: main
Are you sure you want to change the base?
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.29% 17.76% +3.47%
==========================================
Files 2335 1834 -501
Lines 201929 161970 -39959
Branches 182293 142302 -39991
==========================================
- Hits 28860 28771 -89
+ Misses 171663 131801 -39862
+ Partials 1406 1398 -8 ☔ 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
No description provided.