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

Align arguments of connect() in node:tls and node:net to Node (#10854) #10870

Merged

Conversation

henrikstorck
Copy link
Contributor

@henrikstorck henrikstorck commented May 6, 2024

What does this PR do?

The handling of arguments in Bun's implementation of connect() (node:tls) deviates from the available combinations of arguments in Node. This breaks compatibility for many packages that rely on the order of parameters in Node.

I adjusted the connect method to allow the same amount and order of arguments as Node.

  • Code changes

How did you verify your code works?

  • I included a test for the new code, or existing tests cover it
  • I ran my tests locally and they pass (bun-debug test test-file-name.test)

Copy link

github-actions bot commented May 7, 2024

@henrikstorck, your commit has failing tests :(

💪 3 failing tests Darwin AARCH64

💻 4 failing tests Darwin x64 baseline

💻 5 failing tests Darwin x64

🪟💻 8 failing tests Windows x64 baseline

🪟💻 10 failing tests Windows x64

View logs

@henrikstorck henrikstorck changed the title Align tls.connect arguments with node (#10854) Align arguments of connect() in node:tls and node:net with Node (#10854) May 7, 2024
@henrikstorck henrikstorck changed the title Align arguments of connect() in node:tls and node:net with Node (#10854) Align arguments of connect() in node:tls and node:net to Node (#10854) May 7, 2024
@henrikstorck
Copy link
Contributor Author

Might fix some of the following issues:
#10711
#7851
#6681
#4540
#4136
#4033
#3701
#3170
taskforcesh/bullmq#2237

Maybe related to this but unlikely:
#5147

@Jarred-Sumner
Copy link
Collaborator

Jarred-Sumner commented May 7, 2024

Thank you for this. Looks like there are some failing node:tls tests. Our tests might be wrong and need to be updated.

@henrikstorck
Copy link
Contributor Author

Thank you for this. Looks like there are some failing node:tls tests. Our tests might be wrong and need to be updated.

Do you mean the github-actions message from 20h ago?

I pushed a few commits since then. Should be a lot less failing tests now

@henrikstorck
Copy link
Contributor Author

@Jarred-Sumner It just finished re-running the tests and no more failing node:tls tests I think

@paperdave paperdave merged commit 6217d78 into oven-sh:main May 7, 2024
41 of 52 checks passed
@nektro
Copy link
Contributor

nektro commented May 8, 2024

this appears to have broken test/js/third_party/postgres/postgres.test.ts on all platforms and is now showing up in other PRs. reverting the commit locally fixes it. the failure did not show up here because tests were skipped since this came from a contribution and the TLS_POSTGRES_DATABASE_URL was thus not exposed to the CI environment.

@nektro
Copy link
Contributor

nektro commented May 8, 2024

Going to revert this and revisit. Apologies!

@henrikstorck
Copy link
Contributor Author

@nektro Sorry!
Thank you for noticing though.

Are there any other tests failing because of this?
Would like to make sure they all pass again before recreating the PR

@nektro
Copy link
Contributor

nektro commented May 8, 2024

no worries! thank u for the patch :)

that looked to be like the only one. all the new ones you added worked. I'm working on making a new PR to test all the changes and will add you as co-author

@henrikstorck
Copy link
Contributor Author

henrikstorck commented May 9, 2024

Hey @nektro, were you able to reproduce the failing tests locally?
When I use my local db and run the test, they pass.
Not sure what I'm doing wrong.
Thanks in advance.

image

@nektro
Copy link
Contributor

nektro commented May 9, 2024

yeah with 6217d78 checked out and making a fresh build the Postgres test file was timing out for me locally

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

4 participants