Pants ci: Run self-check tests w/ venv generated by pants#6287
Merged
cognifloyd merged 10 commits intomasterfrom Dec 17, 2024
Merged
Pants ci: Run self-check tests w/ venv generated by pants#6287cognifloyd merged 10 commits intomasterfrom
cognifloyd merged 10 commits intomasterfrom
Conversation
…2ctl reload fails.
At least in GHA in some cases, the ps output is getting truncated, possibly respecting our COLUMNS=120 env var. This adds ww to the ps command to make it have unlimited width.
84c5a9d to
d46b106
Compare
cognifloyd
commented
Dec 12, 2024
Comment on lines
+34
to
+41
| def setUp(self): | ||
| super().setUp() | ||
| # pre-condition: Make sure there is no test pollution | ||
| sw_queues = self._get_sensor_watcher_amqp_queues( | ||
| queue_name="st2.sensor.watch.covfefe" | ||
| ) | ||
| # TODO: Maybe just delete any leftover queues from previous failed test runs. | ||
| self.assertTrue(len(sw_queues) == 0) |
Member
Author
There was a problem hiding this comment.
This change is unrelated to this PR. This test failed for several runs, and now it is magically passing.
Apparently we still have some cross test pollution with data in RabbitMQ. So, I'll leave this here and next time we see the bug, hopefully we can figure out how to prevent that cross test pollution that can make tests randomly fail.
I'm wondering about having some pytest fixture handle cleaning up all exchanges/queues for the execution slot before running any tests. If we do that, then we'd need to make sure not to break the tests that use the full st2 cluster (started with tools/launchdev.sh).
nzlosh
approved these changes
Dec 17, 2024
amanda11
approved these changes
Dec 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a Pants-based CI job to run
st2-self-checkwith a virtualenv generated by pants.I recommend reviewing each commit.
The largest chunk of this PR is in 12af930 where I add the GHA job that runs st2-self-check.
Everything else is minor cleanup (or bugfixes) of several random scripts and a test.
I can split the unrelated changes into a separate PR if needed, but they're fairly small, so I hope we can just include them here.