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

chore: remove checks for unsupported versions of node #3689

Closed
wants to merge 4 commits into from

Conversation

SimenB
Copy link
Contributor

@SimenB SimenB commented Mar 19, 2023

Which problem is this PR solving?

Minimum supported version of node is v14, so this is dead code.

Fixes # N/A

Short description of the changes

grep-ed for process.version and removed any instance where it was used to check for a version before v14

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

N/A

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@SimenB SimenB requested a review from a team March 19, 2023 12:03
@codecov
Copy link

codecov bot commented Mar 19, 2023

Codecov Report

Merging #3689 (415e555) into main (9328558) will decrease coverage by 0.58%.
The diff coverage is n/a.

❗ Current head 415e555 differs from pull request most recent head 0a1f723. Consider uploading reports for the commit 0a1f723 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3689      +/-   ##
==========================================
- Coverage   93.66%   93.09%   -0.58%     
==========================================
  Files         277      153     -124     
  Lines        8462     4069    -4393     
  Branches     1756      811     -945     
==========================================
- Hits         7926     3788    -4138     
+ Misses        536      281     -255     

see 133 files with indirect coverage changes

@@ -38,7 +38,6 @@ import {
import type * as http from 'http';
import type * as https from 'https';
import { Socket } from 'net';
import * as semver from 'semver';
Copy link
Contributor Author

@SimenB SimenB Mar 20, 2023

Choose a reason for hiding this comment

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

note that I actually use semver in #3625. I'll make sure to update the other PR if this one lands first (or vice versa)

Copy link
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

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

Hi, Thanks for opening this PR. 🙂

While I think that we should remove this at some point, I'm not sure about removing this code right now. I think when we removed support for Node < 14, we agreed to not actively change anything that would break existing users, should they still be using Node < 14, hence why this code is still here.

I added a comment on #3583, which is attached to the 2.0 milestone, so that we do not forget about it once 2.0 rolls around.

@dyladan
Copy link
Member

dyladan commented Mar 20, 2023

Hi, Thanks for opening this PR. 🙂

While I think that we should remove this at some point, I'm not sure about removing this code right now. I think when we removed support for Node < 14, we agreed to not actively change anything that would break existing users, should they still be using Node < 14, hence why this code is still here.

I added a comment on #3583, which is attached to the 2.0 milestone, so that we do not forget about it once 2.0 rolls around.

See #3673 for example of user who is using OTel with the deprecated v14 runtime.

I agree with Marc. Unless there is a specific benefit to removing this code, I think we shouldn't actively break these users. When we announced that we were dropping support for 8, 10, 12, and 14, we already received quite a bit of pushback and all we did at that time was change the engines entry. I think we should save real hard breaks for major version releases. Even then, we may want to keep these best-effort support paths in place as long as they don't actively cause problems.

@Flarna
Copy link
Member

Flarna commented Mar 20, 2023

I think at least cleanup of code in tests is perfectly fine as it doesn't break any user code and it is definitely dead code.

@pichlermarc
Copy link
Member

I think at least cleanup of code in tests is perfectly fine as it doesn't break any user code and it is definitely dead code.

Agreed. Our devDependencies are incompatible with these unsupported versions anyway, so removing the test code is perfectly fine. 🙂

@dyladan
Copy link
Member

dyladan commented Mar 20, 2023

I think at least cleanup of code in tests is perfectly fine as it doesn't break any user code and it is definitely dead code.

That's fine, but this PR affects more than just tests

@SimenB
Copy link
Contributor Author

SimenB commented Mar 21, 2023

Should I split out the test changes?

@pichlermarc
Copy link
Member

Should I split out the test changes?

Yes, that would be the way forward, in my opinion. Removing the checks from the test files is fine, but we'll - unfortunately - have to postpone removing the checks from the actual code until we release the next major version.

@SimenB
Copy link
Contributor Author

SimenB commented Mar 22, 2023

Cool, extracted to #3696

@dyladan
Copy link
Member

dyladan commented Apr 7, 2023

I'm going to close this for now. It can be reopened when we do the 2.0 work if you don't delete the branch

@dyladan dyladan closed this Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants