Skip to content
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

feature(turborepo): Port login without sso team #3372

Merged

Conversation

NicholasLYang
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Jan 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 27, 2023 at 4:07PM (UTC)
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 27, 2023 at 4:07PM (UTC)
examples-nonmonorepo 🔄 Building (Inspect) Visit Preview Jan 27, 2023 at 4:07PM (UTC)
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 27, 2023 at 4:07PM (UTC)
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 27, 2023 at 4:07PM (UTC)
examples-vite-web 🔄 Building (Inspect) Visit Preview Jan 27, 2023 at 4:07PM (UTC)
3 Ignored Deployments
Name Status Preview Comments Updated
examples-cra-web ⬜️ Ignored (Inspect) Visit Preview Jan 27, 2023 at 4:07PM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jan 27, 2023 at 4:07PM (UTC)
turbo-vite-web ⬜️ Ignored (Inspect) Jan 27, 2023 at 4:07PM (UTC)

@vercel
Copy link

vercel bot commented Jan 18, 2023

@NicholasLYang is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added area: ci area: turbopack pkg: create-turbo Issues related to npx create-turbo labels Jan 18, 2023
@NicholasLYang NicholasLYang force-pushed the nicholasyang/login-without-sso-team branch from 4533602 to 54c8539 Compare January 18, 2023 22:32
@github-actions github-actions bot added area: docs Improvements or additions to documentation area: examples Improvements or additions to examples area: site pkg: turbo-ignore packages/turbo-ignore labels Jan 24, 2023
@NicholasLYang NicholasLYang marked this pull request as ready for review January 24, 2023 19:32
@NicholasLYang NicholasLYang requested review from a team as code owners January 24, 2023 19:32
Copy link
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. The only blocker is the --__test-run support so our integration tests keep working. It would also be great if we could port the Test_run unit test to Rust so we don't drop test coverage.

Comment on lines 51 to 64
pub fn rainbow<'a>(&self, text: &'a str) -> Cow<'a, str> {
if self.should_strip_ansi {
return Cow::Borrowed(text);
}

let mut out = Vec::new();
for (i, c) in text.char_indices() {
let (r, g, b) = Self::rainbow_rgb(i);
out.push(format!(
"\x1b[1m\x1b[38;2;{};{};{}m{}\x1b[0m\x1b[0;1m",
r, g, b, c
));
}
out.push(RESET.to_string());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking, but we use tiny_gradient in the shim for coloring. It would be nice to consolidate our gradient logic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah...I'm personally of the opinion that we should keep this because it has a fallback for Apple Terminal and has color stripping.

crates/turborepo-lib/src/retry.rs Outdated Show resolved Hide resolved
crates/turborepo-lib/src/retry.rs Outdated Show resolved Hide resolved
crates/turborepo-lib/src/commands/login.rs Outdated Show resolved Hide resolved
crates/turborepo-lib/src/commands/login.rs Outdated Show resolved Hide resolved
Comment on lines +11 to +15
#[async_trait]
pub trait UserClient {
fn set_token(&mut self, token: String);
async fn get_user(&self) -> Result<UserResponse>;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this trait is here for testing, but I'm not seeing any use this. Will we need to refactor the login to use this trait before we can add tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little bit. I can add tests as a follow up PR

crates/turborepo-lib/src/commands/login.rs Show resolved Hide resolved
@chris-olszewski
Copy link
Member

Looks like failures are from a bad Cargo.lock?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ci area: docs Improvements or additions to documentation area: examples Improvements or additions to examples area: site pkg: create-turbo Issues related to npx create-turbo pkg: turbo-ignore packages/turbo-ignore pr: automerge Kodiak will merge these automatically after checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants