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

Add flag for whether patches should be committed #1653

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

jmazanec15
Copy link
Member

Description

Related to #1651. This change adds a flag to gradle and cmake for whether patches should be committed to the native libs. Committing the changes prevents the build from repeating itself everytime cmake is run, but it requires user config for git on the host environment. non-dev environments (i.e. artifact build envs) typically do not have user configured and lead to failures like:

> Task :cmakeJniLib FAILED
-- The C compiler identification is GNU 12.2.1
-- The CXX compiler identification is GNU 12.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/rh/gcc-toolset-12/root/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/rh/gcc-toolset-12/root/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Applying custom patches.
CMake Error at cmake/init-nmslib.cmake:24 (message):
-- Configuring incomplete, errors occurred!
  Failed to apply patch:
See also "/tmp/tmp5umkevdi/k-NN/jni/CMakeFiles/CMakeOutput.log".

  Committer identity unknown

  

  *** Please tell me who you are.

  

  Run

  

    git config --global user.email "[email protected]"
    git config --global user.name "Your Name"

  

  to set your account's default identity.

  Omit --global to set the identity only in this repository.

  

  fatal: unable to auto-detect email address (got
  'ci-runner@ea81dc527acc.(none)')

Call Stack (most recent call first):
  CMakeLists.txt:84 (include)

Issues Resolved

#1651

Check List

  • Commits are signed as 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.

@peterzhuamazon
Copy link
Member

@jmazanec15 just to note you can remove the dco.yml in .github/workflows as it has already been replaced by the dco app.

@jmazanec15
Copy link
Member Author

Will do thanks @peterzhuamazon

Copy link
Member

@ryanbogan ryanbogan left a comment

Choose a reason for hiding this comment

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

LGTM!

@jmazanec15 jmazanec15 merged commit b3829c3 into opensearch-project:main Apr 24, 2024
50 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 24, 2024
Signed-off-by: John Mazanec <[email protected]>
(cherry picked from commit b3829c3)
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