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

feat: port in use #6887

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

feat: port in use #6887

wants to merge 7 commits into from

Conversation

wconrad265
Copy link
Contributor

🎉 Thanks for submitting a pull request! 🎉

Summary

This pull request addresses these issues found below

We (@tlane25) outline the problem in the comments in #6840.

This pull request adds better error handling for users who open a port for a serverless function.


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)

wconrad265 and others added 2 commits October 18, 2024 15:30
nforms the user that this could be from a netlify function opening ports

Co-authored-by: Thomas Lane <tlane25@users.noreply.github.com>
Co-authored-by: Thomas Lane <163203257+tlane25@users.noreply.github.com>
@wconrad265 wconrad265 changed the title Port in use feat: port in use Oct 18, 2024
@wconrad265 wconrad265 marked this pull request as ready for review October 18, 2024 20:48
@wconrad265 wconrad265 requested a review from a team as a code owner October 18, 2024 20:48
Copy link
Contributor

@DanielSLew DanielSLew left a comment

Choose a reason for hiding this comment

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

Looks good, just a small nit about any types.

src/commands/main.ts Outdated Show resolved Hide resolved
@wconrad265 wconrad265 requested a review from a team as a code owner October 22, 2024 19:48
t added 2 commits October 22, 2024 16:19
Co-authored-by: Will <wconrad265@users.noreply.github.com>
Co-authored-by: Will <wconrad265@users.noreply.github.com>
@wconrad265
Copy link
Contributor Author

This has been updated with a new type.

@@ -1,4 +1,4 @@
<!DOCTYPE html>
Copy link
Contributor

Choose a reason for hiding this comment

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

why was this changed?

Copy link
Contributor Author

@wconrad265 wconrad265 Oct 24, 2024

Choose a reason for hiding this comment

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

image

When we were trying to push this commit, we kept having a prettier format error for this file. This is what it recommended that we do, to update to a lowercase doctype. From my understanding, there is no functional difference between the two.

@@ -73,3 +73,11 @@ export type NetlifyOptions = {
state: StateConfig
frameworksAPIPaths: FrameworksAPIPaths
}

export interface AddressInUseError extends Error {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would just add this into the same error type as optional fields

Copy link
Contributor

@tlane25 tlane25 Oct 24, 2024

Choose a reason for hiding this comment

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

The Error type lives in ~external/38d21a27-4378-4895-a56a-d0fa5726a379/lib.es2022.error.d.ts. I think it's from a dependency/ external source.

package.json Outdated Show resolved Hide resolved
wconrad265 and others added 2 commits October 24, 2024 09:22
Co-authored-by: Thomas Lane <163203257+tlane25@users.noreply.github.com>
Co-authored-by: Thomas Lane <tlane25@users.noreply.github.com>
Co-authored-by: Thomas Lane <163203257+tlane25@users.noreply.github.com>
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.

3 participants