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 Spack recipe (v2.3.0.1, release documentation, sync packages) #133

Merged
merged 5 commits into from
Oct 21, 2021

Conversation

ajaust
Copy link
Collaborator

@ajaust ajaust commented Oct 20, 2021

This PR does the following:

Restriction

@ajaust ajaust marked this pull request as ready for review October 20, 2021 13:54
@ajaust
Copy link
Collaborator Author

ajaust commented Oct 20, 2021

I changed the GitHub workflow to print the version of the bindings build. It currently prints 0+unknown. Does this make sense?

Copy link
Member

@BenjaminRodenberg BenjaminRodenberg left a comment

Choose a reason for hiding this comment

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

The Installed version of bindings is 0+unknown in the test (see https://github.com/precice/python-bindings/runs/3952442029#step:5:122) looks really strange. I will try to debug this. Generally it is useful to get something like Installed version of bindings is v2.3.0.1+5.gd65d39b here, because this allows us to quickly check that the CI is actually testing the right version. Currently we do not really know.

@@ -26,4 +26,4 @@ jobs:
cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/
- name: Try to build py-pyprecice with spack and test it
run: |
. /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && mkdir runner && cd runner && python3 -c "import precice; print(precice.__version__)"
. /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib.):${PYTHONPATH} && mkdir runner && cd runner && BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}"
Copy link
Member

@BenjaminRodenberg BenjaminRodenberg Oct 21, 2021

Choose a reason for hiding this comment

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

As already discussed personally: Interesting that this has ever worked...

@ajaust
Copy link
Collaborator Author

ajaust commented Oct 21, 2021

In a local Spack environment (build as in the action) I get v2.3.0.1+7.g5cab31c as version. Maybe the GitHub action clones the repository in a different way?

@BenjaminRodenberg
Copy link
Member

In a local Spack environment (build as in the action) I get v2.3.0.1+7.g5cab31c as version. Maybe the GitHub action clones the repository in a different way?

Same observation on my side, when I use docker run -ti precice/ci-spack-pyprecice-deps-1804. I'm a bit clueless right now how we could actually understand how the github action differs from a local build. Setting up a dummy repository with versioneer, github actions and spack is a possibility. But this sounds complicated.

@ajaust
Copy link
Collaborator Author

ajaust commented Oct 21, 2021

Maybe we should just add some git log -2 or a similar command to the action and see what it outputs? That should tell us whether we still have an intact git repository with the history.

@BenjaminRodenberg
Copy link
Member

I just ran the CI locally using act -j build_spack. Here, everything looks as expected:

...
| ==> py-pyprecice: Successfully installed py-pyprecice-develop-zgzaqxe3rimtfztg6tnkshtaytsu6muu
|   Fetch: 0.00s.  Build: 5.27s.  Total: 5.27s.
| [+] /opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/py-pyprecice-develop-zgzaqxe3rimtfztg6tnkshtaytsu6muu
| Installed version of bindings is v2.3.0.1+9.g57c4791
[Build Spack/build_spack]   ✅  Success - Try to build py-pyprecice with spack and test it

This is also consistent with a local build on my system:

benjamin@...:~/Programming/python-bindings$ pip3 install --user .
Processing /home/benjamin/Programming/python-bindings
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: mpi4py in /usr/lib/python3/dist-packages (from pyprecice==2.3.0.1+9.g57c4791) (3.0.3)
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from pyprecice==2.3.0.1+9.g57c4791) (1.17.4)
Building wheels for collected packages: pyprecice
  Building wheel for pyprecice (PEP 517) ... done
  Created wheel for pyprecice: filename=pyprecice-2.3.0.1+9.g57c4791-py2.py3-none-any.whl size=548674 sha256=e1a39961f81ca527ed5dbaba7ca50cbba8a6f40f55f2ebd122fc0c86ef3304ab
  Stored in directory: /home/benjamin/.cache/pip/wheels/4d/3d/7a/ce9222fbfcebb5d5c77b3da6b5f2ebe5d7a134bb0c296b25e3
Successfully built pyprecice
Installing collected packages: pyprecice
  Attempting uninstall: pyprecice
    Found existing installation: pyprecice 2.3.0.1+5.gd65d39b
    Uninstalling pyprecice-2.3.0.1+5.gd65d39b:
      Successfully uninstalled pyprecice-2.3.0.1+5.gd65d39b
Successfully installed pyprecice-2.3.0.1+9.g57c4791
benjamin@...:~/Programming/python-bindings$ python3 -c "import precice; print(precice.__version__)"
v2.3.0.1+9.g57c4791

To summarize: I'm really puzzled about the output of the action, if it is run online.

I would propose to merge this PR and create an issue on the output of the test. As long as we are not actively checking the output for correctness I would consider this a minor issue. I think we should treat this test with some care. However, it still answers the following questions from my perspective "Does the package.py work? Does our build system conflict?" (assuming that the correct revision is tested). Using act, we can still run the pipeline locally to make sure that actually the right commit is tested.

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.

2 participants