-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Conversation
@nathanhammond is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
5260013
to
8ae3856
Compare
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
var envPrefixes []string | ||
framework := inference.InferFramework(pt.Pkg) | ||
if framework != nil && framework.EnvPrefix != "" { | ||
envPrefixes = append(envPrefixes, framework.EnvPrefix) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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?)
There was a problem hiding this comment.
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...
To prevent overly-aggressive cache partitioning, add per-task inferencing of framework.