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

backwards-compatibility/* tests are broken and lonely #5460

Open
trentm opened this issue Feb 12, 2025 · 1 comment
Open

backwards-compatibility/* tests are broken and lonely #5460

trentm opened this issue Feb 12, 2025 · 1 comment

Comments

@trentm
Copy link
Contributor

trentm commented Feb 12, 2025

While reviewing #5456
I noticed that there are two users of "tsconfig.base.es5.json":

experimental/backwards-compatibility/node14/tsconfig.json
2:  "extends": "../../../tsconfig.base.es5.json",

experimental/backwards-compatibility/node16/tsconfig.json
2:  "extends": "../../../tsconfig.base.es5.json",

These "backcompat-node$VER" test packages started back with #1352
They are meant to test that a simple usage of NodeSDK works with an
older version of @types/node than ... either the latest or whatever version
are commonly using.

They are run via: npm run test:backcompat
Which was run in a backcompat.yml workflow.

Until 4mo later in #1748 this was removed with the comment:

Backwards compatibility compilation checks are now included as part of the regular build so there is no reason for them to have their own GHA

I think that "are now included" is because the top-level tsconfig.json in that change included the backwards-compatiblity packages in its "references" at the time.
Then, ~2y later, those references were removed in #3432

So my guess (without playing too much) is that the backward-compatibility tests haven't been run for a couple years (since PR-3432).

They are currently broken (run npm run test:backcompat).

Presumably we should drop the current node14 and node16 compat versions (our base Node.js is v18 now) and add node18 and node20 compat versions?
However, we currently use "@types/node": "18.6.5", so I'm not sure of the value.
An alternative might be to have a test-all-versions (TAV) test in the sdk-node package that runs a small "does NodeSDK-basically work" test with supported versions of @types/node. Then we'd not need separate packages for this.

@pichlermarc
Copy link
Member

Thanks for looking into that.

Presumably we should drop the current node14 and node16 compat versions (our base Node.js is v18 now) and add node18 and node20 compat versions?
However, we currently use "@types/node": "18.6.5", so I'm not sure of the value.

I think we should just drop them. From my understanding - if we never update @types/node beyond the oldest supported Node.js version, type-checking should give us the coverage we need.

Maybe we just add a lint step to ensure that the @types/node version is pinned to what our lowest supported version is and we call it a day.

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

No branches or pull requests

2 participants