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: add node version check to test/e2e/run.sh #2745

Merged
merged 4 commits into from
Oct 4, 2022
Merged

Conversation

jonas-jonas
Copy link
Member

resolves #2738

This PR adds a (temporary) version check to the e2e run script to avoid timeout issues starting with node version 17 and up.

Related issue(s)

#2738

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I am following the contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security. vulnerability,
    I confirm that I got green light (please contact security@ory.sh) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added or changed the documentation.

Further Comments

@jonas-jonas jonas-jonas changed the title chore(e2e): add node version check to test/e2e/run.sh chore: add node version check to test/e2e/run.sh Sep 22, 2022
@codecov
Copy link

codecov bot commented Sep 22, 2022

Codecov Report

Merging #2745 (0a7862b) into master (439f015) will decrease coverage by 0.00%.
The diff coverage is n/a.

❗ Current head 0a7862b differs from pull request most recent head 4db6ebf. Consider uploading reports for the commit 4db6ebf to get more accurate results

@@            Coverage Diff             @@
##           master    #2745      +/-   ##
==========================================
- Coverage   75.14%   75.14%   -0.01%     
==========================================
  Files         294      293       -1     
  Lines       17068    16908     -160     
==========================================
- Hits        12826    12705     -121     
+ Misses       3266     3232      -34     
+ Partials      976      971       -5     
Impacted Files Coverage Δ
persistence/sql/persister_courier.go 84.52% <0.00%> (-0.33%) ⬇️
driver/registry_default.go 87.50% <0.00%> (-0.21%) ⬇️
identity/handler.go 87.57% <0.00%> (-0.16%) ⬇️
driver/registry.go 61.11% <0.00%> (ø)
request/builder.go 74.50% <0.00%> (ø)
courier/test/persistence.go 100.00% <0.00%> (ø)
selfservice/flow/login/handler.go 78.40% <0.00%> (ø)
selfservice/flow/settings/handler.go 68.00% <0.00%> (ø)
selfservice/strategy/oidc/provider_microsoft.go 0.00% <0.00%> (ø)
courier/handler.go
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@piotrmsc piotrmsc left a comment

Choose a reason for hiding this comment

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

Change itself works, could be maybe bit simpler by grabbing and checking only major version but I have a question to GHA running e2e
https://github.com/ory/kratos/blob/master/.github/workflows/ci.yaml#L109
it is using ubuntu-latest, won't this cause problems? I don't see nodejs version pinning there?

@jonas-jonas
Copy link
Member Author

@piotrmsc, yeah, I tried a lot of stuff to just get the major version, but couldn't figure out how to get regex capture groups working in bash. If you have an idea, lmk.

it is using ubuntu-latest, won't this cause problems? I don't see nodejs version pinning there?

I think it is using the LTS version, which is 16.17, currently. But yes, for the time being, we should also pin the version somehow. I'll look into it.

@jonas-jonas
Copy link
Member Author

@piotrmsc I have cleaned up the check in the script and pinned the node version to 16 in the workflow file.

Could you take another look? :)

Copy link
Contributor

@piotrmsc piotrmsc left a comment

Choose a reason for hiding this comment

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

works, but general question: maybe it's better to just adjust the scripts to work with newer versions of node?

@jonas-jonas
Copy link
Member Author

works, but general question: why we don't in general adjust the scripts to work with newer versions of node?

Because that will require updating a bunch of dependencies in a bunch of projects (React, React Native, express examples) and then hope that they fixed the issue downstream. There is just too much going on to tell if this is an easy fix or if it will take longer. This change is just to save everyone some headache if they forget to change the Node version to 16.

@aeneasr aeneasr merged commit 7e7e58b into master Oct 4, 2022
@aeneasr aeneasr deleted the node-check-e2e-run branch October 4, 2022 12:28
harnash pushed a commit to Wikia/kratos that referenced this pull request Oct 13, 2022
peturgeorgievv pushed a commit to senteca/kratos-fork that referenced this pull request Jun 30, 2023
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.

test(e2e): check node -v when starting E2E tests
3 participants