Repository navigation
Conversation
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
Build the Dashboard's "Command to re-run" from the task's parameter definitions, so boolean and optional values are formatted the way the command-line parser expects.
The worker sends the formatted parameters to the scheduler alongside the existing task metadata:
--flagwhen true and are omitted when false.--flag=trueor--flag=false.Noneare omitted.--name=value, with POSIX-shell quoting viashlex.join. This also preserves values that start with-.Omission is only allowed when the effective default restores the same value. If it would change the task, or the default cannot be read, the Dashboard shows that a re-run command is unavailable. For example, omitting an implicit boolean set to
Falsewould be wrong if its configured default isTrue.The command assumes the same Luigi configuration as the worker. Task IDs, parameter serialization and the command-line parser are unchanged. The new metadata is optional; older workers, schedulers and saved scheduler state retain the existing display. Private parameters remain excluded.
Motivation and Context
Fixes #3363. The current Dashboard JSON-quotes every serialized value, producing commands such as
--rerun "False". An implicitBoolParameteris a flag rather than a flag/value pair, so copying that command fails. Optional values also need their parameter definitions to determine whether omission preserves the original task.#3456 was an earlier attempt at this issue and was closed by its author. This is a separate implementation.
Have you tested this? If so, how?
-values, private parameters and defaults that cannot be reproduced by omission.showErrorTracefunction and Mustache template for current, empty, unavailable and legacy responses. Full-browser testing has not been performed.Implemented with Codex and independently reviewed with Claude.