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

port(Turborepo): Add github prefixing in Rust #6471

Merged
merged 8 commits into from
Nov 17, 2023
Merged

Conversation

gsoltis
Copy link
Contributor

@gsoltis gsoltis commented Nov 16, 2023

Description

Slightly hacky way of doing this. It's a little expandable for more providers, but not all of the way. Getting all the way will require a larger output refactor.

  • add support for a generic "fencepost" for grouped logs
  • add a couple github specific hooks

Testing Instructions

Updated test for absolute paths in errors

Closes TURBO-1640

@gsoltis gsoltis requested a review from a team as a code owner November 16, 2023 00:24
Copy link

vercel bot commented Nov 16, 2023

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

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo 🔄 Building (Inspect) Visit Preview 💬 Add feedback Nov 17, 2023 0:24am
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 17, 2023 0:24am
9 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Nov 17, 2023 0:24am
examples-cra-web ⬜️ Ignored (Inspect) Visit Preview Nov 17, 2023 0:24am
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Nov 17, 2023 0:24am
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Nov 17, 2023 0:24am
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Nov 17, 2023 0:24am
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Nov 17, 2023 0:24am
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Nov 17, 2023 0:24am
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Nov 17, 2023 0:24am
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Nov 17, 2023 0:24am

Copy link
Contributor

github-actions bot commented Nov 16, 2023

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

github-actions bot commented Nov 16, 2023

🟢 CI successful 🟢

Thanks

Copy link
Contributor

@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.

Approving since we're moving quick, but I do think we can keep the turborepo-ui crate focused on just outputting stuff and not make it aware of CI vendors.

Very much looking forward to eventually getting #6314 merged in post-port.

Comment on lines 19 to 32
pub enum Fenceposts {
Github(String),
}

impl Fenceposts {
fn prefix_suffix(&self) -> (Option<String>, Option<String>) {
match self {
Self::Github(task_name) => (
Some(format!("::group::{task_name}\n")),
Some("::endgroup::\n".to_string()),
),
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels like this belongs in the turborepo-ci crate instead of here.

crates/turborepo-ui/src/output.rs Outdated Show resolved Hide resolved
crates/turborepo-ui/src/output.rs Outdated Show resolved Hide resolved
crates/turborepo-ui/src/output.rs Outdated Show resolved Hide resolved
crates/turborepo-ui/src/output.rs Outdated Show resolved Hide resolved
crates/turborepo-ui/src/output.rs Outdated Show resolved Hide resolved
Comment on lines 102 to 104
pub fn as_github_task_id(&self) -> String {
format!("{}:{}", self.package, self.task)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't die on this hill, but this doesn't feel like it needs to be defined on TaskId, I think it would better be defined as a function in turborepo-ci maybe on the Vendor type.

gsoltis and others added 5 commits November 16, 2023 15:50
Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>
Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>
Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>
Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>
Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>
@gsoltis gsoltis merged commit 7be88cb into main Nov 17, 2023
61 of 62 checks passed
@gsoltis gsoltis deleted the gsoltis/github_prefixing branch November 17, 2023 01:20
@gsoltis gsoltis restored the gsoltis/github_prefixing branch November 17, 2023 04:36
@gsoltis gsoltis deleted the gsoltis/github_prefixing branch November 17, 2023 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants