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(clients): call postinstall-node-version-check #2594

Closed
wants to merge 7 commits into from

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Jul 16, 2021

Issue

Follow-up to #2592

Description

Calls postinstall-node-version-check in clients

Testing

Tested in package @aws-sdk/client-s3:

$ fnm use 8
Using Node v8.17.0

$ yarn postinstall
yarn run v1.22.10
error @aws-sdk/[email protected]: The engine "node" is incompatible with this module. Expected version ">=10.0.0". Got "8.17.0"
error Commands cannot run with an incompatible environment.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

$ fnm use 10
Using Node v10.24.1

$ yarn postinstall
yarn run v1.22.10
$ postinstall-node-version-check
Done in 0.11s.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@160aeba). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2594   +/-   ##
=======================================
  Coverage        ?   60.30%           
=======================================
  Files           ?      516           
  Lines           ?    27435           
  Branches        ?     6591           
=======================================
  Hits            ?    16546           
  Misses          ?    10889           
  Partials        ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 160aeba...03892c7. Read the comment docs.

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • CodeBuild project: sdk-staging-test
  • Commit ID: 03892c7
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@G-Rath
Copy link

G-Rath commented Jul 16, 2021

Just an FYI package managers will typically not cache packages that have postinstall (as well as other differences in behaviour), as it's meant to be for running additional build steps (i.e, compiling native C libs) that could be OS and environment specific, so this change will impact every downstream consumer (and their CIs) more than you might expect.

A more idiomatic way of enforcing the node version would be to specify it in the engines field, which package managers check when installing.

@trivikr
Copy link
Member Author

trivikr commented Jul 17, 2021

A more idiomatic way of enforcing the node version would be to specify it in the engines field, which package managers check when installing.

The aim of this change is to notify about Node.js 10.x deprecation for a future date, i.e. 2022-01-01 and not to end support of Node.js 10.x right away.

this change will impact every downstream consumer (and their CIs) more than you might expect

@G-Rath Is there a better way to notify users of the pending deprecation?
We are going to publish a blog post, and depending on Node.js 10.x usage drop we'll also update API reference or Developer Guide. But we wanted to notify developers using the SDK directly.

@G-Rath
Copy link

G-Rath commented Jul 17, 2021

@trivikr the best idiomatic way I think would be to publish the new > 10 major alongside the current >= 10 major, but have those versions be marked as deprecated with the message being "Support for Node 10 will be dropped at some point - ideally switch to v(whatever the next major version is)".

Since you're using transpiling tools, this shouldn't be a big increase in maintenance aside from a one-off bit of work to rework your CI to handle publishing both major versions & deprecating one of them.

If you were confident in your setup, you could even have the packages actually be compiled for the different minimum node versions, so the > 10 major wouldn't have unnecessarily transpiled code - but that wouldn't be required for this setup to work.

@trivikr
Copy link
Member Author

trivikr commented Jul 20, 2021

Closing as we would be calling emitWarningIfUnsupportedVersion in runtimeConfig after #2574 is merged.

@github-actions
Copy link

github-actions bot commented Aug 4, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2021
@trivikr trivikr deleted the postinstall-clients-external branch August 18, 2021 23:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants