-
Notifications
You must be signed in to change notification settings - Fork 219
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
fix(edge-functions): add deno.json fallback #2984
base: develop
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 12510084008Details
💛 - Coveralls |
This would fix the issue, but I wonder if we should rather move toward a more "isolation" approach with something like this in the docs for the edge functions:
Could also mention the I'm happy to close the PR and go toward this approach if we choose it instead. |
Two suggestions.
I'd prefer updating the docs to mention the suggested path for deno.json for deployment so it's less confusing for new users. |
Good spot for the I think the issue with the "convenience shortcut" is that it create the expectation that things will work the same way between all the ways you can define your deps. And even if we mention things in the docs, it's not the best for discovery. Here is what I would like to propose:
I've reworked things toward this and refactored a bit how we handle the "default path", and created a PR for the documentation here: supabase/supabase#31264 WDYT ? @sweatybridge @jgoux |
} | ||
} | ||
if noVerifyJWT != nil { | ||
function.VerifyJWT = cast.Ptr(!*noVerifyJWT) | ||
} | ||
functionConfig[name] = function | ||
} | ||
// Check validity of ImportMap paths | ||
functionsWithFallback := []string{} | ||
if fallbacksPath, err := utils.GetImportsFilePath(utils.FunctionsDir, fsys); err == nil { |
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.
If we really want to support fallback import map for deno.json, then this should be moved to pkg/config so it also works for branching.
Each function config's import_map field will point to the fully resolved path after considering all possible fallbacks.
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.
question
It seems like we didn't supported this fallback before ? I don't know how that was handled with branching I don't see the code logic for the import_map.json fallback in the pkg/config 🤔
I have two question about this:
- Won't it have side effects with the diffing of the config in such case ?
- I think we can't import utils within pkg/config without causing a cycling deps issue. What would be the best approach here ?
+1 with @sweatybridge on only updating the docs and explaining that one |
dismissing to prefer docs update #2984 (comment)
What kind of change does this PR introduce?
Closes: #2983
What is the current behavior?
Please link any relevant issues here.
What is the new behavior?
Feel free to include screenshots if it includes visual changes.
Additional context
Add any other context or screenshots.