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

[Backport 2.x] Trim trailing slashes before checking no-restricted-path rule #3054

Merged
merged 3 commits into from
Jan 6, 2023

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 8732b1c from #3020.

@opensearch-trigger-bot opensearch-trigger-bot bot requested a review from a team as a code owner December 8, 2022 22:24
kristenTian
kristenTian previously approved these changes Dec 9, 2022
@ashwin-pc
Copy link
Member

@kristenTian arent we going to verify if the windows tests pass?

@AMoo-Miki AMoo-Miki added the autocut Skip the changelog verification check on backports label Dec 12, 2022
kavilla
kavilla previously approved these changes Dec 17, 2022
…true (#3020)

`no-restricted-paths` compares source files and import statements, and their membership in restricted zones. However, when `allowSameFolder` is true, it failed to remove a trailing slash before validation which results in a false-positive.

Signed-off-by: Miki <[email protected]>

Signed-off-by: Miki <[email protected]>
(cherry picked from commit 8732b1c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
@AMoo-Miki AMoo-Miki force-pushed the backport/backport-3020-to-2.x branch from 47c2505 to 692af42 Compare December 22, 2022 19:15
@joshuarrrr joshuarrrr added the v2.5.0 'Issues and PRs related to version v2.5.0' label Dec 23, 2022
@codecov-commenter
Copy link

codecov-commenter commented Dec 28, 2022

Codecov Report

Merging #3054 (b4f0b62) into 2.x (62d36ff) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              2.x    #3054      +/-   ##
==========================================
+ Coverage   66.61%   66.65%   +0.04%     
==========================================
  Files        3219     3219              
  Lines       61531    61531              
  Branches     9431     9431              
==========================================
+ Hits        40986    41016      +30     
+ Misses      18303    18277      -26     
+ Partials     2242     2238       -4     
Flag Coverage Δ
Linux 66.60% <100.00%> (-0.01%) ⬇️
Windows 66.60% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...-eslint-plugin-eslint/rules/no_restricted_paths.js 96.96% <100.00%> (ø)
...ic/application/models/sense_editor/sense_editor.ts 64.88% <0.00%> (-0.89%) ⬇️
packages/osd-optimizer/src/node/cache.ts 53.94% <0.00%> (+1.31%) ⬆️
src/dev/build/lib/config.ts 85.29% <0.00%> (+5.88%) ⬆️
...ges/osd-apm-config-loader/src/config.test.mocks.ts 100.00% <0.00%> (+8.69%) ⬆️
packages/osd-cross-platform/src/path.ts 85.36% <0.00%> (+34.14%) ⬆️
src/setup_node_env/harden/child_process.js 76.92% <0.00%> (+38.46%) ⬆️
src/dev/build/lib/get_build_number.ts 100.00% <0.00%> (+42.85%) ⬆️

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

@kavilla kavilla dismissed stale reviews from kristenTian and themself via 692af42 January 3, 2023 19:10
@manasvinibs manasvinibs merged commit 17e6b79 into 2.x Jan 6, 2023
@github-actions github-actions bot deleted the backport/backport-3020-to-2.x branch January 6, 2023 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autocut Skip the changelog verification check on backports v2.5.0 'Issues and PRs related to version v2.5.0'
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants