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

replace ci prefix only at rewriting part #1681

Merged
merged 4 commits into from
Mar 2, 2022

Conversation

tianleh
Copy link
Member

@tianleh tianleh commented Mar 1, 2022

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

Description

We observed that https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/latest/linux/arm64/builds/opensearch/manifest.yml
is being redirected to
https://ci.opensearch.org/distribution-build-opensearch/1.3.0/1204/linux/arm64/builds/opensearch/manifest.yml

and ended up with AccessDenied error. Thus we shall not remove ci/dbc during redirect. Instead, it shall only happen at the rewrite part.

Issues Resolved

Test

update unit test for this.

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 March 1, 2022 20:01
@codecov-commenter
Copy link

Codecov Report

Merging #1681 (b6a6c0f) into main (9cb1ffb) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #1681   +/-   ##
=========================================
  Coverage     94.74%   94.74%           
  Complexity       14       14           
=========================================
  Files           166      166           
  Lines          3501     3501           
  Branches         25       25           
=========================================
  Hits           3317     3317           
  Misses          181      181           
  Partials          3        3           
Impacted Files Coverage Δ
...loyment/lambdas/cf-url-rewriter/cf-url-rewriter.ts 100.00% <100.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 9cb1ffb...b6a6c0f. Read the comment docs.

@gaiksaya gaiksaya requested a review from dblock March 1, 2022 20:42
@tianleh tianleh requested a review from peternied March 1, 2022 22:18
Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

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

Could there be a missing test case that can be added? I'm not certain from the current logic if all scenarios are getting coverage.

@tianleh
Copy link
Member Author

tianleh commented Mar 1, 2022

Could there be a missing test case that can be added? I'm not certain from the current logic if all scenarios are getting coverage.

Thought about this as well. The underlying issue is that the url without ci/dbc ( https://ci.opensearch.org/distribution-build-opensearch/1.3.0/1204/linux/arm64/builds/opensearch/manifest.yml) doesn't work. I could create a follow up issue to see how we can gate such. Or I can add a unit test to ensure that the url must contain ci/dbc?

Signed-off-by: Tianle Huang <[email protected]>
Signed-off-by: Tianle Huang <[email protected]>
@tianleh
Copy link
Member Author

tianleh commented Mar 1, 2022

Could there be a missing test case that can be added? I'm not certain from the current logic if all scenarios are getting coverage.

Added checks and related unit tests for such. Please help take a look. @peternied

Signed-off-by: Tianle Huang <[email protected]>
@tianleh
Copy link
Member Author

tianleh commented Mar 1, 2022


-----------------------------|---------|----------|---------|---------|-------------------
File                         | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-----------------------------|---------|----------|---------|---------|-------------------
All files                    |     100 |      100 |     100 |     100 |                   
 lambdas/cf-url-rewriter     |     100 |      100 |     100 |     100 |                   
  cf-url-rewriter.ts         |     100 |      100 |     100 |     100 |                   
  https-get.ts               |     100 |      100 |     100 |     100 |                   
 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: 3 passed, 3 total
Tests:       13 passed, 13 total
Snapshots:   0 total
Time:        3.3 s

@peternied peternied merged commit 9c24976 into opensearch-project:main Mar 2, 2022
@gaiksaya
Copy link
Member

gaiksaya commented Mar 2, 2022

Hi @tianleh, the new changes are deployed. Please check.

Thanks!

@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