vercel / turborepo

Build system optimized for JavaScript and TypeScript, written in Rust
https://turbo.build/repo/docs
MIT License
26.21k stars 1.81k forks source link

[turborepo] Additional artifact metadata #2802

Closed ThibautMarechal closed 8 months ago

ThibautMarechal commented 1 year ago

Which project is this feature idea for?

Turborepo

Describe the feature you'd like to request

While building my custum turborepo remote cache server, I wanted to know a bit more information about where an artifact come from. Example here: image I'm using the "team" field to identify wich repository is used. On the screen, 1 line correspond to 1 artifact. An artifact is (correct me if I'm wrong) the outputs of a pipeline in a package. Could it be possible to have the information about the pipeline name and the package name that produce the artifact ? Could be also nice to have that information at the analyticsEvents level so we can make a difference between turbo build or turbo test

Describe the solution you'd like

Add HTTP headers to the HTTP request that PUT an artifacts x-package-name x-pipeline-name

Add the informations in the AnalyticsEvent level

{
  duration: number;
  event: EventType;
  hash: string;
  sessionId: string;
  source: SourceType;
  package: string; // new field
  pipeline: string; // new field
}

Describe alternatives you've considered

Turborepo could also provide some kind of plugin, or hook to modify the analytics / artifacts HTTP requests.

anthonyshew commented 8 months ago

There's an open RFC here if you'd like to add your thoughts there. I'll provide a link to this issue on the RFC, as well.