这是indexloc提供的服务,不要输入任何密码
Skip to content

Inferencing for environment variables. #1599

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

Merged
merged 3 commits into from
Aug 1, 2022

Conversation

nathanhammond
Copy link
Contributor

To prevent overly-aggressive cache partitioning, add per-task inferencing of framework.

@vercel
Copy link

vercel bot commented Jul 29, 2022

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

A member of the Team first needs to authorize it.

@nathanhammond nathanhammond force-pushed the primitive-inferencing branch from 5260013 to 8ae3856 Compare July 29, 2022 22:17
@vercel
Copy link

vercel bot commented Jul 29, 2022

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

Name Status Preview Updated
turbo-site ✅ Ready (Inspect) Visit Preview Sep 1, 2022 at 4:47PM (UTC)

var envPrefixes []string
framework := inference.InferFramework(pt.Pkg)
if framework != nil && framework.EnvPrefix != "" {
envPrefixes = append(envPrefixes, framework.EnvPrefix)
Copy link
Member

@tknickman tknickman Aug 1, 2022

Choose a reason for hiding this comment

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

Can we some verbose (debug level) logging here?

It would be helpful to optionally be able to see what is getting cached (or just a log that indicates a framework was detected and the prefix) in the case when a build becomes uncachable due to an env var and we need to help debug.

This is also something we should probably revisit in a more holistic way in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Going to fast-follow this as our logging story isn't well-plumbed and this will need to be a more-invasive change.

}

// InferFramework returns a reference to a matched framework
func InferFramework(pkg *fs.PackageJSON) *Framework {
Copy link
Member

Choose a reason for hiding this comment

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

Nice. This is going to come in handy soon (automatic outputs?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note the name of this branch: primitive.

So much can be done...

@tknickman tknickman added the pr: fixship A PR which is approved with notes and does not require re-review. label Aug 1, 2022
@nathanhammond nathanhammond added pr: automerge Kodiak will merge these automatically after checks pass and removed pr: fixship A PR which is approved with notes and does not require re-review. labels Aug 1, 2022
@kodiakhq kodiakhq bot merged commit a650e73 into vercel:main Aug 1, 2022
@nathanhammond nathanhammond deleted the primitive-inferencing branch August 1, 2022 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Kodiak will merge these automatically after checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants