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

Return success if files accepted regardless of DB status #2286

Merged

Conversation

williamjallen
Copy link
Collaborator

CDash currently returns a 503 error if the database is unavailable, which causes CTest to print errors. This PR changes the behavior to instead return a HTTP 200 status code if the files are successfully received, regardless of whether they can be stored in the database at that particular time.

@zackgalbreath
Copy link
Contributor

zackgalbreath commented Jun 27, 2024

I think this is a good opportunity to add an end-to-end test of CTest with deferred submissions. I started working on this but got sidetracked. Here's some rough pseudocode of how I was imagining this would work:

  1. Invalidate DB_DATABASE like we do here
  2. Call CTest (either with -D or using a driver script like in the existing "simple" test cases
  3. Verify expected behavior: ctest doesn't throw any errors, the XML files land in the inbox, etc.
  4. Restore DB_DATABASE and call php artisan submission:queue
  5. Verify that the build got parsed successfully.

How to actually achieve this "cleanly" from phpunit is less clear to me. Just a bunch of exec() calls?

@williamjallen
Copy link
Collaborator Author

@zackgalbreath I agree that that seems like a good thing to do. Are you opposed to pushing back the testing work to CDash 3.6?

@zackgalbreath
Copy link
Contributor

@zackgalbreath I agree that that seems like a good thing to do. Are you opposed to pushing back the testing work to CDash 3.6?

That's okay with me. I'd rather this fix make it into 3.5 than miss the cutoff date.

@williamjallen williamjallen added this pull request to the merge queue Jun 28, 2024
Merged via the queue into Kitware:master with commit 155fa3b Jun 28, 2024
6 checks passed
@williamjallen williamjallen deleted the return-success-if-files-accepted branch June 28, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants