Fix config leak in TestExecutorConf causing CeleryExecutor test failures#65123
Closed
dandanseo123 wants to merge 2 commits intoapache:mainfrom
Closed
Fix config leak in TestExecutorConf causing CeleryExecutor test failures#65123dandanseo123 wants to merge 2 commits intoapache:mainfrom
dandanseo123 wants to merge 2 commits intoapache:mainfrom
Conversation
TestExecutorConf tests used conf.read_string() to set config values like ssl_active=true without cleanup, leaking state into subsequent tests. This caused CeleryExecutor SSL validation (added in apache#64767) to raise ValueError in unrelated test_executor_loader tests.
1 task
wjddn279
approved these changes
Apr 13, 2026
Contributor
wjddn279
left a comment
There was a problem hiding this comment.
Thanks! Test failure will be resolved
ferruzzi
reviewed
Apr 13, 2026
| @@ -411,6 +411,23 @@ def test_repr(): | |||
| class TestExecutorConf: | |||
| """Test ExecutorConf shim class that provides team-specific configuration access.""" | |||
|
|
|||
Contributor
There was a problem hiding this comment.
I just ran into the bug this is fixing, thanks for fixing it so fast. I'd suggest using conf_vars in the tests instead of reinventing the wheel here though. If you use conf_vars, then it resets the values back after the test finishes.
1 task
ashb
requested changes
Apr 13, 2026
Contributor
Author
|
We can close this PR as PR 65126 fixed the issue. |
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.
Description
TestExecutorConftests usedconf.read_string()to set config values likessl_active=truewithout cleanup, leaking state into subsequent tests. This was harmless until #64767 added SSL validation to the CeleryExecutor. So the leakedssl_active=truenow triggers aValueErrorin unrelatedtest_executor_loadertests.Added an
autousefixture that snapshots and restores the config state after each test.follow-up: #64767
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code following the guidelines