kratos icon indicating copy to clipboard operation
kratos copied to clipboard

chore: add node version check to test/e2e/run.sh

Open jonas-jonas opened this issue 3 years ago • 1 comments

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 [email protected]) 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 avatar Sep 22 '22 13:09 jonas-jonas

Codecov Report

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

:exclamation: 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%) :arrow_down:
driver/registry_default.go 87.50% <0.00%> (-0.21%) :arrow_down:
identity/handler.go 87.57% <0.00%> (-0.16%) :arrow_down:
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.

codecov[bot] avatar Sep 22 '22 13:09 codecov[bot]

@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 avatar Sep 27 '22 07:09 jonas-jonas

@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? :)

jonas-jonas avatar Sep 27 '22 13:09 jonas-jonas

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.

jonas-jonas avatar Sep 28 '22 07:09 jonas-jonas