Repository navigation
Conversation
…y implementation --with-all was accepted and then ignored. It is bound as an explicit parameter of integration(), which also keeps it out of **args, so neither the body nor select_testers() ever saw it. With every --with-<lang> option declared default=False, select_testers() always received an explicit False for each one and its own permissive defaults never applied, so the command documented in format/Integration.rst failed with "Need to enable at least one implementation to test". Give the --with-<lang> options default=None so that "not given" stays distinguishable from an explicit --with-java=0, then fall back to the value of --with-all for the ones left unset. This is what the _set_default helper sitting above the command was written for; it had never been called.
|
|
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.
Rationale for this change
archery integration --with-allaccepts the flag and then ignores it, so it enables nothing. The command our own docs give for running everything fails:with_allis bound as an explicit parameter ofintegration(), which also keeps it out of**args, so neither the body norselect_testers()ever sees it. Every--with-<lang>option is declareddefault=False, soselect_testers()always gets an explicitFalsefor each one and its ownwith_cpp=True, with_java=True, ...defaults never get a chance to apply.As far as I can tell this has never worked. ARROW-6466 (5ca8592) added
--with-all, declared the--with-<lang>options withdefault=False, and added this helper immediately above the command:_set_defaultis not called anywhere in the repository. That reads to me like--with-allwas meant to supply the default for the individual options and the wiring was never finished, so this PR finishes it rather than inventing a new mechanism.Closes #55161.
What changes are included in this PR?
--with-<lang>options now usedefault=Noneinstead ofdefault=False. That keeps "not given" distinguishable from an explicit--with-java=0, which is what makes the precedence below possible.select_testers(), anywith_*option still unset falls back to the value of--with-all, via the existing_set_defaulthelper.Precedence ends up as: an explicitly given
--with-<lang>(or itsARCHERY_INTEGRATION_WITH_*environment variable) wins; otherwise--with-alldecides; otherwiseFalse, as before. So--with-all --with-java=0means "everything except Java", which matches the flag's help text of including implementations by default.I deliberately did not touch
docs/source/format/Integration.rst— the documented command is correct, it was the code that did not match it.Are these changes tested?
Yes, three tests in
archery/tests/test_cli.pythat patchselect_testersand assert on what it receives.Verification I ran locally, since not all of it is visible from the diff:
--with-alltests fail on unmodifiedmain(assert False is True) and pass with the change. The third, that without--with-allnothing is enabled, passes both before and after on purpose — it is there to pin down that the default behaviour is unchanged.archerytest run before and after, excluding three modules that need optional deps I don't have installed (responsesand friends): 26 failed / 24 passed / 1 skipped before, 26 failed / 27 passed / 1 skipped after. The same 26 failures are pre-existingdockerFileNotFoundErrors on this machine; the delta is exactly the three new tests.CliRunnerfor: no flags,--with-all, the full documented command,--with-all --with-java=0, and--with-cpp=1. Onmainall three--with-allcases enable nothing; with the change they enable all eight, and--with-cpp=1is unaffected either way.flake8 --config python/setup.cfgclean on both changed files.I could not run the integration tests themselves end to end, since I don't have the other implementations built here, so I have not observed an actual cross-language run under
--with-all. What I verified is the flag plumbing up to theselect_testers()call.Are there any user-facing changes?
archery integration --with-allnow does what its help text says. Nothing changes for invocations that don't pass it: with no--with-<lang>and no--with-all, every implementation is still disabled, as before.Was AI used for this PR?
In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.
The bug was found by a static scan for parameters that a function accepts and never reads, which flagged
with_all. The code, tests and this description were AI-assisted, and the verification steps listed above were all actually run rather than assumed. Happy to explain or change any part of it.PR code and description written by:
Reviewed before submission by: