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

Remove setup-circleci.sh and update setup scripts #8454

Closed
wants to merge 11 commits into from

Conversation

majetideepak
Copy link
Collaborator

@majetideepak majetideepak commented Jan 19, 2024

Move all adapter dependencies to setup-adapters.sh
Add DuckDB build to setup-centos8.sh

Copy link

netlify bot commented Jan 19, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit aaad1c0
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/65b836ca3dd73b0008fd15f3

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 19, 2024
@majetideepak majetideepak marked this pull request as draft January 19, 2024 15:52
@majetideepak
Copy link
Collaborator Author

I will verify this on a VM and fix the adapter dependencies.

@majetideepak majetideepak changed the title Remove redundant setup-circleci.sh Reuse setup-centos8.sh in setup-circlei.sh Jan 19, 2024
@majetideepak majetideepak marked this pull request as ready for review January 19, 2024 20:02
@majetideepak
Copy link
Collaborator Author

@assignUser can you please provide feedback? Thanks.

@assignUser
Copy link
Collaborator

Like the idea but there seem to be some issues with missing packages on the centos7 based image. Otherwise it looks good.

One caveat: we will likely get rid of the centos7 based images due to EOL, so it's probably not worth it to spend too much time on this.

@majetideepak
Copy link
Collaborator Author

Like the idea but there seem to be some issues with missing packages on the centos7 based image. Otherwise it looks good.

The issue is that we need to copy setup-centos8.sh in the dockerfile as well. Do you know where this dockerfile lives?

@assignUser
Copy link
Collaborator

In the scripts folder https://github.com/facebookincubator/velox/blob/main/scripts%2Fcircleci-container.dockfile

You will need to add the COPY in a separate PR to update the container and rebase here (or push the updated container to your fork and use it for testing here and revert before merge)

@majetideepak
Copy link
Collaborator Author

You will need to add the COPY in a separate PR to update the container

@assignUser The Docker images got built without having to COPY in a separate PR. Is there a way we can test the new image built from this PR? Can you also review again? I rebased with your fmt changes. Thanks.

@majetideepak
Copy link
Collaborator Author

I copied script-circleci.sh to script-centos8.sh except for the hadoop package that the CI tests need.

@kgpai
Copy link
Contributor

kgpai commented Jan 24, 2024

Hi @majetideepak , Trying to understand motivation for this change, apart from refactoring and reducing code is there something else ? Would it make sense to have only the centos8 container say going forward (we should be off of circleci soon anyway) . Having one container with all dependencies for adapters etc, should speed things up imv .

@majetideepak
Copy link
Collaborator Author

majetideepak commented Jan 24, 2024

@kgpai Currently, the Prestissimo docker build for centos8 is broken. The centos8 setup script diverged from circleci.sh script here https://github.com/facebookincubator/velox/pull/5743/files
On the prestissimo side this divergence caused an issue since folly, fbthrift are now installed in Velox in circleci.sh but not in centos8.sh
We should have one setup script for Centos8 in Velox. We should move all the adapter dependencies to setup-adapters.sh and use that to create docker containers.

@assignUser
Copy link
Collaborator

The Docker images got built without having to COPY in a separate PR. Is there a way we can test the new image built from this PR?

Yes you can build the change here but it will not be used as the PR job lacks permissions to upload the container. We can't test a freshly build container as the cci job starts within the container, so it has to be known before.

With gha we might be able to add a step that checks for changes in the container and rebuilds it if needed and uses that local container to run the actual build or so but that added complexity might not be worth it. I will think about it.

Copy link
Collaborator

@assignUser assignUser left a comment

Choose a reason for hiding this comment

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

We should have one setup script for Centos8 in Velox. We should move all the adapter dependencies to setup-adapters.sh

That makes sense, looking at these changes we can then just remove the separate cci script?

@majetideepak majetideepak changed the title Reuse setup-centos8.sh in setup-circlei.sh Remove setup-circleci.sh and update setup-centos8.sh Jan 25, 2024
@majetideepak
Copy link
Collaborator Author

@assignUser Can you take a look now?
I need your help with the next steps. Let me know if I need to split this PR. Thanks.

@kgpai
Copy link
Contributor

kgpai commented Jan 25, 2024

So to summarize:

  1. There will be one centos8 build
  2. This build will be used for all PR CI (except say macos etc)
  3. It will have all dependencies (including the adapter ones, which should lead to faster builds).

Shall we also rename the container file from circleci-container to say just ci-container ?

@majetideepak
Copy link
Collaborator Author

Shall we also rename the container file from circleci-container to say just ci-container ?

This name makes sense, but I need help in landing this change. Let me know if I need to make this change in this PR or separately.

@kgpai
Copy link
Contributor

kgpai commented Jan 25, 2024

@majetideepak Let me know how I can help.

We can make the name change in a separate PR if its easier.

wget_and_untar http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz lzo &
wget_and_untar https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.gz boost &
wget_and_untar https://github.com/google/snappy/archive/1.1.8.tar.gz snappy &
wget_and_untar https://github.com/fmtlib/fmt/archive/10.1.1.tar.gz fmt &
Copy link
Collaborator

Choose a reason for hiding this comment

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

This line went missing in the refactor and leading to the build errors due to no fmt source.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you for pointing this out. Will fix this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I copied the setup-circleci.sh to setup-centos8.sh this time again.

@majetideepak majetideepak force-pushed the fix-scripts branch 2 times, most recently from 546543a to 7ea5e84 Compare January 25, 2024 03:48
@facebook-github-bot
Copy link
Contributor

@kgpai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

OPENSSL_ROOT_DIR=$(brew --prefix [email protected]) \
cmake_install -DBUILD_TESTS=OFF -DFOLLY_HAVE_INT128_T=ON
}

function install_fizz {
github_checkout facebookincubator/fizz "${FB_OS_VERSION}"
OPENSSL_ROOT_DIR=$(brew --prefix [email protected]) \
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@assignUser do we still need the OPENSSL_ROOT_DIR variable with the upgrade?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tested this. We infact have to remove this variable. Fizz is failing to build otherwise.

[79/85] Linking CXX executable bin/fizz-bogoshim
FAILED: bin/fizz-bogoshim 
: && /Library/Developer/CommandLineTools/usr/bin/c++ -mcpu=apple-m1+crc -std=c++17 -fvisibility=hidden -fvisibility=hidden -fvisibility-inlines-hidden -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -mmacosx-version-min=13.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/BogoShim.dir/test/BogoShim.cpp.o -o bin/fizz-bogoshim  -Wl,-rpath,/opt/homebrew/lib  lib/libfizz.a  /opt/homebrew/Cellar/libsodium/1.0.19/lib/libsodium.dylib  /Users/deepak/workspace/oss/prestissimo_velox_deps/lib/libfolly.a  /Users/deepak/workspace/oss/prestissimo_velox_deps/lib/libfmt.a  /opt/homebrew/lib/libboost_context-mt.dylib  /opt/homebrew/lib/libboost_filesystem-mt.dylib  /opt/homebrew/lib/libboost_atomic-mt.dylib  /opt/homebrew/lib/libboost_program_options-mt.dylib  /opt/homebrew/lib/libboost_regex-mt.dylib  /opt/homebrew/lib/libboost_system-mt.dylib  /opt/homebrew/lib/libboost_thread-mt.dylib  /opt/homebrew/lib/libevent.dylib  /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/usr/lib/libz.tbd  /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/usr/lib/libbz2.tbd  /opt/homebrew/lib/liblz4.dylib  /opt/homebrew/lib/libsnappy.dylib  /opt/homebrew/lib/libsodium.dylib  -lc++abi  /opt/homebrew/opt/[email protected]/lib/libssl.dylib  /opt/homebrew/opt/[email protected]/lib/libcrypto.dylib  /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/usr/lib/libz.tbd  /opt/homebrew/lib/libzstd.dylib  /opt/homebrew/lib/libglog.dylib  /opt/homebrew/lib/libgflags.2.2.2.dylib  /Users/deepak/workspace/oss/prestissimo_velox_deps/lib/libdouble-conversion.a && :
ld: Undefined symbols:
  _EVP_PKEY_get_bits, referenced from:
      folly::AsyncSSLSocket::getSSLCertSize() const in libfolly.a[174](AsyncSSLSocket.cpp.o)
  _SSL_get1_peer_certificate, referenced from:
      folly::AsyncSSLSocket::getPeerCertificate() const in libfolly.a[174](AsyncSSLSocket.cpp.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Copy link
Contributor

Choose a reason for hiding this comment

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

I was able to build this with openssl root dir etc..
The error you are seeing is because its picking up openssl 3 binary but building against openssl 1 header.. If it builds against openssl 1 binary you wont see that issue.

@majetideepak majetideepak changed the title Remove setup-circleci.sh and update setup-centos8.sh Remove setup-circleci.sh and update setup scripts Jan 29, 2024
@facebook-github-bot
Copy link
Contributor

@kgpai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@kgpai merged this pull request in ec3b7a7.

Copy link

Conbench analyzed the 1 benchmark run on commit ec3b7a70.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

@mbasmanova
Copy link
Contributor

@kgpai @majetideepak @assignUser

Looks like this change add fizz, wangle and other Prestissimo-specific dependencies to Velox. I assume this is not intentional. Let's fix.

@assignUser
Copy link
Collaborator

These are needed for fbthrift, which is needed for remote functions (and in the future parquet when we switch Apache thrift for fbthrift)

@mbasmanova
Copy link
Contributor

These are needed for fbthrift, which is needed for remote functions (and in the future parquet when we switch Apache thrift for fbthrift)

Interesting. So we have a lot of more dependencies in Velox now. Have we communicated addition of these dependencies somewhere?

@majetideepak
Copy link
Collaborator Author

So we have a lot of more dependencies in Velox now. Have we communicated addition of these dependencies somewhere?

@mbasmanova what we thought was a simple fmt upgrade that is backward compatible turned out to be false on MacOS.
This broke Prestissimo. This lead to other dependencies to be updated. I noticed we don't document dependencies in general.
I am pushing a PR shortly to add this documentation also add minimum required versions to CMake so that users know that the dependencies need an update.

@majetideepak
Copy link
Collaborator Author

Issue here #8602

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants