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

fix failed jest by unifying cdk versions #1675

Merged
merged 6 commits into from
Feb 28, 2022

Conversation

tianleh
Copy link
Member

@tianleh tianleh commented Feb 26, 2022

Signed-off-by: Tianle Huang [email protected]

Description

Fix https://github.com/opensearch-project/opensearch-build/runs/5341305055?check_suite_focus=true

Follow up of #1660

Issues Resolved

https://github.com/opensearch-project/opensearch-build/runs/5341305055?check_suite_focus=true

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@tianleh tianleh requested a review from a team as a code owner February 26, 2022 01:48
@tianleh tianleh marked this pull request as draft February 26, 2022 01:48
@codecov-commenter
Copy link

codecov-commenter commented Feb 26, 2022

Codecov Report

Merging #1675 (b1e26b5) into main (6c5887e) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1675      +/-   ##
============================================
+ Coverage     94.59%   94.62%   +0.02%     
  Complexity       14       14              
============================================
  Files           159      164       +5     
  Lines          3387     3459      +72     
  Branches          7       21      +14     
============================================
+ Hits           3204     3273      +69     
- Misses          180      183       +3     
  Partials          3        3              
Impacted Files Coverage Δ
...loyment/lambdas/cf-url-rewriter/cf-url-rewriter.ts 50.00% <0.00%> (ø)
deployment/lib/identities.ts 100.00% <0.00%> (ø)
deployment/lib/artifacts-public-access.ts 100.00% <0.00%> (ø)
deployment/lib/build-artifact-stack.ts 100.00% <0.00%> (ø)
deployment/lib/buckets.ts 100.00% <0.00%> (ø)

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 6c5887e...b1e26b5. Read the comment docs.

@tianleh
Copy link
Member Author

tianleh commented Feb 26, 2022

opensearch@5981838b19ee deployment]$   yarn test -- --coverage
yarn run v1.22.15
warning package.json: No license field
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ jest --coverage
 PASS  test/lambdas/cf-url-rewriter/cf-url-rewriter.test.ts
Bundling asset MyTestStack/CfUrlRewriter/Code/Stage...

  ...3b9112600de776682be4ae92d21963b9c98337c2b5288dd26146d5230/index.js  747b 

Bundling asset MyTestStack/CfUrlRewriter/Code/Stage...

  ...a86d968b7b18508cac611d93ece96bb545c09a638b7f0519d5f12454b/index.js  747b 

 PASS  test/build-artifact-stack.test.ts
-----------------------------|---------|----------|---------|---------|-------------------
File                         | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-----------------------------|---------|----------|---------|---------|-------------------
All files                    |   94.91 |      100 |   85.71 |   94.91 |                   
 lambdas/cf-url-rewriter     |      50 |      100 |      50 |      50 |                   
  cf-url-rewriter.ts         |      50 |      100 |      50 |      50 | 9-13              
 lib                         |     100 |      100 |     100 |     100 |                   
  artifacts-public-access.ts |     100 |      100 |     100 |     100 |                   
  buckets.ts                 |     100 |      100 |     100 |     100 |                   
  build-artifact-stack.ts    |     100 |      100 |     100 |     100 |                   
  identities.ts              |     100 |      100 |     100 |     100 |                   
-----------------------------|---------|----------|---------|---------|-------------------

Test Suites: 2 passed, 2 total
Tests:       4 passed, 4 total
Snapshots:   0 total
Time:        4.876 s
Ran all test suites.
Done in 5.59s.

@tianleh
Copy link
Member Author

tianleh commented Feb 26, 2022

Local is working but Github action is failing.

Signed-off-by: Tianle Huang <[email protected]>
Signed-off-by: Tianle Huang <[email protected]>
Signed-off-by: Tianle Huang <[email protected]>
Signed-off-by: Tianle Huang <[email protected]>
Signed-off-by: Tianle Huang <[email protected]>
Signed-off-by: Tianle Huang <[email protected]>
@tianleh tianleh changed the title check failed ci fix failed jest by unifying cdk versions Feb 26, 2022
@tianleh tianleh marked this pull request as ready for review February 26, 2022 03:28
Copy link
Member

@zelinh zelinh left a comment

Choose a reason for hiding this comment

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

Thanks for the fix here! Have you tried if the latest version of aws-cdk v1.146.0 works for this?

@tianleh
Copy link
Member Author

tianleh commented Feb 26, 2022

The 1.145 version is chosen to be parity with others https://github.com/opensearch-project/opensearch-build/blob/main/deployment/package.json#L31

We can explore more updates later.

@tianleh
Copy link
Member Author

tianleh commented Feb 28, 2022

@zelinh please help take a look when available.

Copy link
Member

@zelinh zelinh left a comment

Choose a reason for hiding this comment

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

Thanks!

@zelinh zelinh merged commit 986736d into opensearch-project:main Feb 28, 2022
@tianleh
Copy link
Member Author

tianleh commented Mar 2, 2022

Link to main issue #1492

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.

4 participants