Skip to content

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

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft

feat: region expansion #1333

wants to merge 20 commits into from

Conversation

chaynabors
Copy link
Member

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Apr 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 17.76%. Comparing base (93ca9c2) to head (b845ad2).
Report is 6 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

}

select_profile_interactive(true).await?;

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(());
}

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(),
Copy link
Contributor

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) {
Copy link
Contributor

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,
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants