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

Update tool scripts to run in windows #2371

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

peternied
Copy link
Member

Description

Update tool scripts to run in windows. They were missed during support for Windows, will backport this to 1.3.X as well

Issues Resolved

Testing

Manually tested on my windows machine

Failure cause

...\opensearch-2.4.1\plugins\opensearch-security\tools>hash.bat test
OPENSEARCH_JAVA_HOME or JAVA_HOME must be defined

Success

.\opensearch-2.4.1\plugins\opensearch-security\tools>set OPENSEARCH_JAVA_HOME="...\opensearch-2.4.1-windows-x64\opensearch-2.4.1\jdk"
.\opensearch-2.4.1-windows-x64\opensearch-2.4.1\plugins\opensearch-security\tools>hash.bat test
Picked up JAVA_TOOL_OPTIONS: -Dlog4j2.formatMsgNoLookups=true
[Password:]
$2y$12$KjgWovKVps84wOMlwOQtu.b8TRL9uFrqv5eZ3/N4RgcHnOImln5aG

Check List

  • New functionality includes testing
  • New functionality has been documented
  • 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.

@peternied peternied added windows backport 1.3 backport to 1.3 branch labels Jan 4, 2023
@peternied peternied requested a review from a team January 4, 2023 18:26
@peternied peternied self-assigned this Jan 4, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2023

Codecov Report

Merging #2371 (10dc0b0) into main (67e4176) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main    #2371      +/-   ##
============================================
- Coverage     61.09%   61.07%   -0.02%     
+ Complexity     3271     3268       -3     
============================================
  Files           260      260              
  Lines         18363    18363              
  Branches       3250     3250              
============================================
- Hits          11219    11216       -3     
- Misses         5559     5560       +1     
- Partials       1585     1587       +2     
Impacted Files Coverage Δ
.../dlic/auth/ldap2/LDAPConnectionFactoryFactory.java 57.46% <0.00%> (-1.50%) ⬇️
...search/security/transport/SecurityInterceptor.java 75.38% <0.00%> (-0.77%) ⬇️

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

@peternied peternied added backport 1.x backport to 1.x branch backport 2.x backport to 2.x branch and removed backport 1.3 backport to 1.3 branch labels Jan 5, 2023
@peternied peternied merged commit 8ccad5c into opensearch-project:main Jan 6, 2023
@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-2371-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8ccad5c7d2653fda12acabc1b94afe2b3d9a99dd
# Push it to GitHub
git push --set-upstream origin backport/backport-2371-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-2371-to-1.x.

opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 6, 2023
peternied added a commit that referenced this pull request Jan 6, 2023
(cherry picked from commit 8ccad5c)

Co-authored-by: Peter Nied <[email protected]>
peternied added a commit to peternied/security that referenced this pull request Jan 6, 2023
peternied added a commit to peternied/security that referenced this pull request Jan 6, 2023
@peternied peternied deleted the fix-tools branch January 6, 2023 21:19
peternied added a commit that referenced this pull request Jan 12, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 12, 2023
Backport 8ccad5c from #2371

Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
(cherry picked from commit ffc64e5)
cwperks pushed a commit that referenced this pull request Jan 12, 2023
…2399)

Backport 8ccad5c from #2371

Signed-off-by: Peter Nied <[email protected]>
(cherry picked from commit ffc64e5)

Co-authored-by: Peter Nied <[email protected]>
wuychn pushed a commit to ochprince/security that referenced this pull request Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.x backport to 1.x branch backport 2.x backport to 2.x branch windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] securityadmin and hash scripts do not work in Windows
4 participants