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

fix: un-awaited prompt when creating edge function from template #6631

Merged

Conversation

cubeghost
Copy link
Contributor

@cubeghost cubeghost commented May 20, 2024

Summary

Fixes CT-1060

When creating an edge function from a template, we weren't awaiting the step where we prompted the user for the route to register the edge function on, leading to the prompt being interrupted by the "Function created!" success message as the rest of scaffoldFromTemplate executed. This sometimes appeared as the CLI hanging, since the prompt for user input was no longer on the last line, making it easy to overlook that the CLI was waiting for user input.

Unfortunately, difficult to test for this without reworking the handleQuestions test helper, which seems daunting right now 😬


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code πŸ§‘β€πŸ’». This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire πŸ”₯ (e.g. incident related), you can skip this step.
  • Read the contribution guidelines πŸ“–. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) πŸ§ͺ
  • Update or add documentation (if features were changed or added) πŸ“
  • Make sure the status checks below are successful βœ…

A picture of a cute animal (not mandatory, but encouraged)
here is my cat playing a card game

@cubeghost cubeghost requested a review from a team as a code owner May 20, 2024 21:05
Copy link

πŸ“Š Benchmark results

Comparing with e87635e

  • Dependency count: 1,364 (no change)
  • Package size: 313 MB ⬇️ 0.00% decrease vs. e87635e
  • Number of ts-expect-error directives: 999 (no change)

@cubeghost cubeghost merged commit 9207de5 into main May 20, 2024
48 checks passed
@cubeghost cubeghost deleted the ab/CT-1060/fix-function-create-template-race-condition branch May 20, 2024 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants