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

[BUG] Plugin helpers fix related to fs promises module #2486

Merged

Conversation

kavilla
Copy link
Member

@kavilla kavilla commented Oct 3, 2022

Description

In Node v10, there was no dedicated module for fs/promises. Causing the plugin helpers to fail while building out plugins.

Solved by importing promises from fs then using the desired methods.

Signed-off-by: Kawika Avilla [email protected]

Issues Resolved

#2485

Check List

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

In Node v10, there was no dedicated module for fs/promises.
Causing the plugin helpers to fail while building out plugins.

Solved by importing promises from fs then using the desired
methods.

Issue Resolved:
opensearch-project#2485

Signed-off-by: Kawika Avilla <[email protected]>
@kavilla kavilla force-pushed the avillk/1.x/fix_plugin_version_bump branch from 4cc430a to 322287c Compare October 3, 2022 21:20
@kavilla kavilla requested a review from joshuarrrr October 3, 2022 21:23
@kavilla
Copy link
Member Author

kavilla commented Oct 3, 2022

integ passed locally and unit tests seem to be passing. due to the nature of this, will merge in.

@kavilla kavilla merged commit 945cfe6 into opensearch-project:1.x Oct 3, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 3, 2022
In Node v10, there was no dedicated module for fs/promises.
Causing the plugin helpers to fail while building out plugins.

Solved by importing promises from fs then using the desired
methods.

Issue Resolved:
#2485

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 945cfe6)
kavilla pushed a commit that referenced this pull request Oct 3, 2022
In Node v10, there was no dedicated module for fs/promises.
Causing the plugin helpers to fail while building out plugins.

Solved by importing promises from fs then using the desired
methods.

Issue Resolved:
#2485

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 945cfe6)
@opensearch-trigger-bot
Copy link
Contributor

The backport to 1.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.x 1.x
# Navigate to the new working tree
cd .worktrees/backport-1.x
# Create a new branch
git switch --create backport/backport-2486-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 945cfe65ff7042ba27cffd798b6b627e7b89fa5d
# Push it to GitHub
git push --set-upstream origin backport/backport-2486-to-1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.x

Then, create a pull request where the base branch is 1.x and the compare/head branch is backport/backport-2486-to-1.x.

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.

[BUG][1.3] Plugin build fails with Error: Cannot find module 'fs/promises'
3 participants