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

Retry on file/folder deletion with Windows longpath support #9561

Merged
merged 3 commits into from
Mar 18, 2025

Conversation

peterzhuamazon
Copy link
Member

@peterzhuamazon peterzhuamazon commented Mar 18, 2025

Description

Retry on file/folder deletion with Windows longpath support

Issues Resolved

#9397 (comment)
opensearch-project/opensearch-build#3747

Screenshot

Testing the changes

Before:

 info [  opensearch-dashboards  ] Cleaning npm from node
   │ debg Deleting patterns: [
   │        'C:/Users/ContainerAdministrator/tmpp467uwp9/OpenSearch-Dashboards/build/opensearch-dashboards-3.0.0-beta1-windows-x64/node/**/node_modules',
   │        'C:/Users/ContainerAdministrator/tmpp467uwp9/OpenSearch-Dashboards/build/opensearch-dashboards-3.0.0-beta1-windows-x64/node/**/npm*',
   │        'C:/Users/ContainerAdministrator/tmpp467uwp9/OpenSearch-Dashboards/build/opensearch-dashboards-3.0.0-beta1-windows-x64/node/**/npx*',
   │        'C:/Users/ContainerAdministrator/tmpp467uwp9/OpenSearch-Dashboards/build/opensearch-dashboards-3.0.0-beta1-windows-x64/node/**/corepack*',
   │        'C:/Users/ContainerAdministrator/tmpp467uwp9/OpenSearch-Dashboards/build/opensearch-dashboards-3.0.0-beta1-windows-x64/node/**/nodevars*'
   │      ]
   │ERROR failure 1 sec
   │ERROR Error: EPERM: operation not permitted, rmdir 'C:\Users\ContainerAdministrator\tmpp467uwp9\OpenSearch-Dashboards\build\opensearch-dashboards-3.0.0-beta1-windows-x64\node\fallback\node_modules\npm\node_modules\node-gyp'

After: https://build.ci.opensearch.org/job/distribution-build-opensearch-dashboards/8370/console

 info [  opensearch-dashboards  ] Cleaning npm from node
   │ debg Deleting patterns: [
   │        'C:/3gd065l8/OpenSearch-Dashboards/build/opensearch-dashboards-3.0.0-alpha1-windows-x64/node/**/node_modules',
   │        'C:/3gd065l8/OpenSearch-Dashboards/build/opensearch-dashboards-3.0.0-alpha1-windows-x64/node/**/npm*',
   │        'C:/3gd065l8/OpenSearch-Dashboards/build/opensearch-dashboards-3.0.0-alpha1-windows-x64/node/**/npx*',
   │        'C:/3gd065l8/OpenSearch-Dashboards/build/opensearch-dashboards-3.0.0-alpha1-windows-x64/node/**/corepack*',
   │        'C:/3gd065l8/OpenSearch-Dashboards/build/opensearch-dashboards-3.0.0-alpha1-windows-x64/node/**/nodevars*'
   │      ]
   │ debg Retry 1/5 on \\?\C:\3gd065l8\OpenSearch-Dashboards\build\opensearch-dashboards-3.0.0-alpha1-windows-x64\node\node_modules\npm, waiting for 1000
   │ debg Retry 1/5 on \\?\C:\3gd065l8\OpenSearch-Dashboards\build\opensearch-dashboards-3.0.0-alpha1-windows-x64\node\fallback\node_modules, waiting for 1000
   │ debg Deleted 574 files/directories
   │ succ ✓ 2 sec

Changelog

  • skip

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link
Contributor

❌ Changelog Entry Missing Hyphen

Changelog entries must begin with a hyphen (-).

Copy link

codecov bot commented Mar 18, 2025

Codecov Report

Attention: Patch coverage is 5.00000% with 19 lines in your changes missing coverage. Please review.

Project coverage is 61.81%. Comparing base (0d0836b) to head (7314213).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/dev/build/lib/fs.ts 5.00% 19 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9561      +/-   ##
==========================================
- Coverage   61.82%   61.81%   -0.02%     
==========================================
  Files        3825     3825              
  Lines       92040    92058      +18     
  Branches    14598    14602       +4     
==========================================
  Hits        56902    56902              
- Misses      31464    31482      +18     
  Partials     3674     3674              
Flag Coverage Δ
Linux_1 28.94% <ø> (ø)
Linux_2 56.38% <ø> (ø)
Linux_3 39.42% <ø> (ø)
Linux_4 28.84% <5.00%> (-0.01%) ⬇️
Windows_1 28.96% <ø> (ø)
Windows_2 56.33% <ø> (ø)
Windows_3 39.42% <ø> (ø)
Windows_4 28.84% <5.00%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@peterzhuamazon peterzhuamazon changed the title Add timeout and retry deletion for osd core Add retry on deletion with windows longpath support for osd core Mar 18, 2025
Copy link
Contributor

❌ Changelog Entry Missing Hyphen

Changelog entries must begin with a hyphen (-).

1 similar comment
Copy link
Contributor

❌ Changelog Entry Missing Hyphen

Changelog entries must begin with a hyphen (-).

@peterzhuamazon
Copy link
Member Author

Note that @AMoo-Miki probably already have the longpath thing handled somewhere but I am not sure how to find or import those.

This is a quick fix so that 3.0.0-alpha1 can be built properly on windows.

Thanks.

Copy link
Contributor

❌ Changelog Entry Missing Hyphen

Changelog entries must begin with a hyphen (-).

1 similar comment
Copy link
Contributor

❌ Changelog Entry Missing Hyphen

Changelog entries must begin with a hyphen (-).

@peterzhuamazon peterzhuamazon force-pushed the main branch 5 times, most recently from dd9ebf0 to f470846 Compare March 18, 2025 05:33
@peterzhuamazon
Copy link
Member Author

Hi @ashwin-pc @sejli could you help me with how to update tests and changelog?

Thanks.

@github-actions github-actions bot added Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry and removed failed changeset labels Mar 18, 2025
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
@peterzhuamazon peterzhuamazon marked this pull request as ready for review March 18, 2025 13:49
@peterzhuamazon peterzhuamazon changed the title Add retry on deletion with windows longpath support for osd core Add retry on file/folder deletion with Windows longpath support for osd core Mar 18, 2025
@peterzhuamazon peterzhuamazon changed the title Add retry on file/folder deletion with Windows longpath support for osd core Add retry on file/folder deletion with Windows longpath support Mar 18, 2025
@peterzhuamazon peterzhuamazon changed the title Add retry on file/folder deletion with Windows longpath support Retry on file/folder deletion with Windows longpath support Mar 18, 2025
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
@peterzhuamazon
Copy link
Member Author

Hi @virajsanghvi @ashwin-pc @kavilla @ananzh @sejli @AMoo-Miki could you help approve this PR to unblock 3.0.0-alpha1?

Thanks.

@peterzhuamazon peterzhuamazon merged commit 59bcae1 into opensearch-project:main Mar 18, 2025
71 of 74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release repeat-contributor Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry v3.0.0
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants