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

Begin to generalize integration tests to other queue systems #160

Open
wants to merge 46 commits into
base: develop
Choose a base branch
from

Conversation

ml-evs
Copy link
Member

@ml-evs ml-evs commented Aug 2, 2024

Pending e.g. #159, I have started to generalise the integration tests so we can make a mega combined Dockerfile that runs e.g., Slurm, SGE and potentially other queuing systems in the same container for testing purposes. This PR is the first step in that. Probably we could test remote shell execution first too. Depending on how awkward it is to set up multiple queues together, it might be that each one runs in a different container.

@ml-evs ml-evs force-pushed the ml-evs/generalize-integration-tests branch from 78f6054 to 35d0e40 Compare August 3, 2024 14:07
@codecov-commenter
Copy link

codecov-commenter commented Aug 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.92%. Comparing base (8df1979) to head (4b2c416).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #160   +/-   ##
========================================
  Coverage    47.92%   47.92%           
========================================
  Files           43       43           
  Lines         5156     5156           
  Branches      1118     1118           
========================================
  Hits          2471     2471           
  Misses        2424     2424           
  Partials       261      261           

@gpetretto
Copy link
Contributor

Hi @ml-evs, thanks for setting this up. Since the dependence on the queue system is only in the submission and check of the jobs I wonder if it is worth running all the tests for all the systems.
Could it be more effective to have these tests on all the queue systems directly in qtoolkit?

@ml-evs
Copy link
Member Author

ml-evs commented Aug 22, 2024

Hi @ml-evs, thanks for setting this up. Since the dependence on the queue system is only in the submission and check of the jobs I wonder if it is worth running all the tests for all the systems. Could it be more effective to have these tests on all the queue systems directly in qtoolkit?

Hi @gpetretto, sorry I missed this. Happy to have this migrated wherever you see fit, though I think having e2e tests for jobflow-remote are still appropriate here.

A status update on this PR in particular: SGE is proving pretty nasty to set up, attempting to follow the few guides I can find online and sadly the main init_cluster configuration script is segfaulting on what should be a straightforward operation (setting the manager's username). I'll keep probing with more recent versions and see how far I can get.

@gpetretto
Copy link
Contributor

Hi @gpetretto, sorry I missed this. Happy to have this migrated wherever you see fit, though I think having e2e tests for jobflow-remote are still appropriate here.

A status update on this PR in particular: SGE is proving pretty nasty to set up, attempting to follow the few guides I can find online and sadly the main init_cluster configuration script is segfaulting on what should be a straightforward operation (setting the manager's username). I'll keep probing with more recent versions and see how far I can get.

Indeed it might be good to have a few different queue managers to test. Especially if it is confirmed that for example SGE does not support query by list of ids.

@ml-evs ml-evs force-pushed the ml-evs/generalize-integration-tests branch 2 times, most recently from 0e54d6b to ae798fd Compare September 1, 2024 13:31
@ml-evs ml-evs force-pushed the ml-evs/generalize-integration-tests branch from 7577c6c to 4062fdf Compare September 9, 2024 10:22
@ml-evs ml-evs force-pushed the ml-evs/generalize-integration-tests branch from e311fb0 to b1ee827 Compare September 19, 2024 14:15
@ml-evs ml-evs force-pushed the ml-evs/generalize-integration-tests branch from 645d9cb to 8637ef5 Compare September 25, 2024 09:32
@ml-evs ml-evs force-pushed the ml-evs/generalize-integration-tests branch from 4a2d843 to 05acc12 Compare October 11, 2024 13:42
@ml-evs ml-evs force-pushed the ml-evs/generalize-integration-tests branch from 4c7c7ea to e3cd1a3 Compare October 11, 2024 14:06
@ml-evs ml-evs marked this pull request as ready for review October 11, 2024 14:23
@ml-evs ml-evs requested a review from gpetretto October 11, 2024 14:23
@ml-evs
Copy link
Member Author

ml-evs commented Oct 11, 2024

Hi @gpetretto, I think this is now 99% of the way there... at least locally, I can now SSH into the SGE container and run jobs. Any remaining issues might be related to @QuantumChemist's qtoolkit PR, but it is hard to say at this point. This was really painful to implement, but I think the pain was specific to SGE itself.

The main issue was needing to reverse engineer how to set up user permissions for the SGE queue (see cc613ba) without being able to use the bundled qmon GUI, and without there being any online documentation. With a lot of rubber-ducking with Claude (hours) I was able to get it working so the jobflow user can submit jobs.

Locally, I see the jobs being submitted and the usual JFR processes "working", but for some reason no output is being written or copied back to the runner at the moment.

As a general point, we might consider entirely splitting the integration tests and unit tests into separate jobs. I'm not sure how much the integration tests are really contributing to the codecov, which is the only real reason to run them together, but as the integration tests are slow (both building the Docker containers and actually running them), it's probably beneficial to split them and figure out a way to combine the coverage stats down the line (e.g., the jobs could both create a GH actions artifact containing the coverage, then a separate job can combine them and upload to codecov).

Copy link
Contributor

@gpetretto gpetretto left a comment

Choose a reason for hiding this comment

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

Thanks @ml-evs for all the work! The PR looks good to me.

As for the coverage, indeed most will be from the standard tests, but there are definitely some functionalities that are only tested in the integration tests (e.g. the batch submission). If the merging of the coverage files is done as in #180 it could be fine running the tests separately.

@davidwaroquiers
Copy link
Member

From discussion in #201, should we add python 3.12 here as part of the github ci testing workflow.

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.

4 participants