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

Adding safe folder to allow CI to compile DAGMC #816

Merged
merged 16 commits into from Aug 18, 2022

Conversation

shimwell
Copy link
Member

Description

Attempt to fix the CI that builds and publishes the docker images

Motivation and Context

Why is this change required? What problem does it solve?
The latest action to publish the docker image failed with this error message

CMake Warning at CMakeLists.txt:27 (message):
-- Submodule update
  Could not determine the commit SHA for DAGMC.
fatal: unsafe repository ('/__w/DAGMC/DAGMC' is owned by someone else)
To add an exception for this directory, call:
	git config --global --add safe.directory /__w/DAGMC/DAGMC
CMake Error at CMakeLists.txt:38 (message):
  git submodule update --init --recursive failed with 128, please checkout
  submodules
-- Configuring incomplete, errors occurred!
See also "/root/build_dir/DAGMC-static/bld/CMakeFiles/CMakeOutput.log".

https://github.com/svalinn/DAGMC/actions/runs/2637740871

This PR adds the folder to the safe directory folders

Changes

bug fix

Behavior

What is the current behavior? What is the new behavior?
broken CI - hopefully a fixed CI (I can't be sure as file owership issues in the CI can't be fully reproduced)

Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

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

Suggested using the ${GITHUB_WORKSPACE} variable instead

.github/workflows/docker_publish.yml Outdated Show resolved Hide resolved
.github/workflows/docker_publish.yml Outdated Show resolved Hide resolved
Co-authored-by: Paul Wilson <paul.wilson@wisc.edu>
@gonuke
Copy link
Member

gonuke commented Jul 14, 2022

Judging from the action logs in your account, I don't think this works. I think it needs to be added with a git command as in changelog_test.yml

@shimwell
Copy link
Member Author

Judging from the action logs in your account, I don't think this works. I think it needs to be added with a git command as in changelog_test.yml

Rerunning the docker build CI on my fork https://github.com/shimwell/DAGMC/actions/runs/2672087279

@shimwell
Copy link
Member Author

Looks like there is another error while compiling moab in the docker file.

error: bad install directory or PYTHONPATH

@bam241
Copy link
Member

bam241 commented Jul 15, 2022

I think the root problem occurred before:

[ 55%] Building CXX object test/CMakeFiles/file_options_test.dir/__/src/FileOptions.cpp.o
[1479](https://github.com/shimwell/DAGMC/runs/7348179098?check_suite_focus=true#step:5:1480)
The directory '/github/home/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
[1480](https://github.com/shimwell/DAGMC/runs/7348179098?check_suite_focus=true#step:5:1481)
The directory '/github/home/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
[1481](https://github.com/shimwell/DAGMC/runs/7348179098?check_suite_focus=true#step:5:1482)
Obtaining file:///root/build_dir/moab/bld/pymoab

I think we need to declare as safe both the build dir and the install dir.

@shimwell
Copy link
Member Author

Looks like the latest error is due to PyMoab being installed into a folder that is not in the PYTHONPATH and also the PYTHONPATH is empty 👀

https://github.com/shimwell/DAGMC/runs/7362738426?check_suite_focus=true

@gonuke
Copy link
Member

gonuke commented Jul 21, 2022

I guess that didn't work - Maybe try the 5.3.2 release candidate now?

@shimwell
Copy link
Member Author

shimwell commented Aug 2, 2022

Looks like adding the PYTHONPATH resulted in the dockerfiles building
https://github.com/shimwell/DAGMC/actions/runs/2780302592

Nice work @bam241

Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

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

While the addition of the PYTHONPATH allows it to work, I'm dubious of whether it's the 100% correct solution. Maybe it's temporary until we untangle the other parts of the build process?

@@ -80,6 +80,8 @@ RUN /root/etc/CI/docker/build_hdf5.sh

FROM hdf5 AS moab

ENV PYTHONPATH=/root/build_dir/moab/bld/pymoab/lib/python3.6/site-packages
Copy link
Member

Choose a reason for hiding this comment

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

This makes me wonder if we are installing MOAB in the wrong place? Or not installing it at all? Or we are installing it in the right place and we should reference that place here instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

we could add a python import command to the dockerfile to see if it is found by python if that helps check it it was installed

python -c "import pymoab"

Copy link
Member

@bam241 bam241 Aug 2, 2022

Choose a reason for hiding this comment

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

The problem does not come from us.
It comes from Moab.
when they build and install pymoab they install it locally with pip -e for testing purposes
The problem is this is prevented because /root/build_dir/moab/bld/pymoab/lib/python3.6/site-packages is not in our PYTHONPATH

see:
here in pymoab CMakelist.txt

Copy link
Member

Choose a reason for hiding this comment

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

Hmmm… maybe the problem is that line 91 in the pymoab CMake is commented out?!?

Copy link
Member

Choose a reason for hiding this comment

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

Looks like @pshriwise commented this out in 2018 🤣

Copy link
Member Author

Choose a reason for hiding this comment

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

Wow that survived a long time

@gonuke
Copy link
Member

gonuke commented Aug 18, 2022

Thanks @shimwell - we'll go with this pending a future change in MOAB

@gonuke gonuke merged commit 980c901 into svalinn:develop Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants