-
Notifications
You must be signed in to change notification settings - Fork 132
+opensearch #4818
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
+opensearch #4818
Conversation
jhheider
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good; just some style notes.
projects/opensearch.org/package.yml
Outdated
| - gradle -Dbuild.snapshot=false ":distribution:archives:no-jdk-{{hw.platform}}-tar:assemble" | ||
| - mkdir -p "{{prefix}}" | ||
| - tar --strip-components=1 -xf distribution/archives/no-jdk-{{hw.platform}}-tar/build/distributions/opensearch-*.tar.gz -C "{{prefix}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what a weird way to have to do it; sadly, python poetry is similar.
you should be able to add it to the install script, assuming you can build all the required parameters. would you like me to wait until you add that to merge? |
|
sure - let me dig into it. |
| ./gradlew publishPluginZipPublicationToZipStagingRepository -Dopensearch.version={{version}} -Dbuild.snapshot=false -Dbuild.version_qualifier= | ||
| ./gradlew publishPluginZipPublicationToMavenLocal -Dbuild.snapshot=false -Dbuild.version_qualifier= -Dopensearch.version={{version}} | ||
| mkdir -p ./build/distributions/lib | ||
| cp -v ./jni/release/libopensearchknn* ./build/distributions/lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this build generates native libraries with the .jnilib extension. when i was packaging this for my team (pre-pkgx) i had to codesign and notarize the libraries. i know you guys have some infra around this stuff already but i just wanted to make sure since it wasn't a dylib that it would be ok?
it seems to work locally fwiw.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally, yes, our codesigning logic has worked for over a year. the only package i can see that's needed anything different is: https://github.com/pkgxdev/pantry/blob/main/projects/github.com/sindresorhus/macos-term-size/package.yml
|
oops, sorry.. didn't see that force push. might've clobbered each other there. |
|
no worries; i just did update-with-rebase |
includes knn plugin
|
great progress here, but still a few issues.
|
|
from boost.org: # boost.org has libs that end up with name @rpath/libboost_atomic.dylib (offset 24)
# so we need to add @loader_path to the rpath
- run: |
for LIB in *.dylib; do
install_name_tool -add_rpath @loader_path $LIB
done
working-directory: ${{prefix}}/lib
if: darwini'll re-run darwin-x86_64 once the rest finish (though it should have the same issue). linux doesn't use |
|
that .meta url is fine, so something is up with |
the real tests i wrote in the yml only run on darwin. opensearch can't run as root (mysql package has a similar comment in it), so i just output the version instead which can at least sanity check the package. the problem is that the knn plugin is lazily loaded so that's not really tested at all on linux. maybe there's some simple-ish solution munging env with sudo to make that work.
makes sense. unfortunately past my bedtime so will have to try in the morning. getting close though! m1 build is totally working end to end. |
trying to see what's wrong with jsonslurper
it's too noisy to see what's going on
err, i meant postgres pantry/projects/postgresql.org/package.yml Lines 80 to 85 in fde48d5
|
|
not sure what happened with that |
|
looks good. i tried to clean up the various |
|
nice! |
|
And there we go. That was a big one. Thanks @scottjg ! |
|
hm, failing to find libc on macos12: https://github.com/pkgxdev/pantry/actions/runs/7516912520/job/20462627197 possibly we need to add an rpath somewhere? |
| zip -r opensearch-knn-{{version}}.0.zip lib/ | ||
| {{prefix}}/bin/opensearch-plugin install --batch file:`pwd`/opensearch-knn-{{version}}.0.zip | ||
| working-directory: k-NN | ||
| - run: echo 'export OPENSEARCH_JAVA_OPTS="-Djava.library.path=$OPENSEARCH_HOME/plugins/opensearch-knn/lib $OPENSEARCH_JAVA_OPTS"' >> opensearch-env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it's happening when opensearch boots, then it shouldn't be loading the knn plugin yet. it might be related to this.
i tried to modify the java library path here so that the native plugin dependencies would be loaded properly. maybe it needs some more paths? hmm...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it maybe need a runtime.env.OPENSEARCH_JAVA_OPTS: key?
|
so, i guess it's in opensearch itself where it's trying to call |
my attempt at adding the opensearch package. there is an existing homebrew package that i used as a reference. this is my first time contributing to the pantry so please let me know if any changes are needed.
i would also like to contribute building the k-NN plugin and native binaries for opensearch. this is normally shipped with opensearch binaries by the upstream project but annoyingly they don't include the native libraries for macos despite them working fine on the platform. i was hoping someone could maybe point me at an example of including a second distribution tarball.