-
Notifications
You must be signed in to change notification settings - Fork 106
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
Fix various bugs in dag/steps decorator #1221
Merged
Merged
Conversation
This file contains 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
Signed-off-by: Elliot Gunton <[email protected]>
Signed-off-by: Elliot Gunton <[email protected]>
* Add `clear_context` fixture as global context was causing failures in tests unrelated to new decorators (kwarg error test will exit the context in an error, leaving it with `declaring == True`) Signed-off-by: Elliot Gunton <[email protected]>
* Function input must be none or a single arg (of Input type subclass) Signed-off-by: Elliot Gunton <[email protected]>
Signed-off-by: Elliot Gunton <[email protected]>
elliotgunton
added
semver:patch
A change requiring a patch version bump
type:bug
A general bug
labels
Sep 30, 2024
* Refactors _get_artifacts and _get_inputs to with add_missing_path input var, with default = False to match the _get_outputs equivalent Signed-off-by: Elliot Gunton <[email protected]>
elliotgunton
force-pushed
the
fix-dag-decorator
branch
from
September 30, 2024 15:20
a805abe
to
19be598
Compare
* `kwargs` will only contain Task/Step kwargs so if the function is being called outside of a Hera context or during the decorator setup, we can just drop the kwargs and call func(*args) (which will only contain a Hera Input) Signed-off-by: Elliot Gunton <[email protected]>
elliotgunton
force-pushed
the
fix-dag-decorator
branch
from
October 1, 2024 09:51
b025306
to
df6819b
Compare
alicederyn
suggested changes
Oct 1, 2024
* Fixes #1218 * Parameter/Artifact fields (apart from the name) were not being carried through, we can use the annotation and change value_from/from_ directly * We can now using Annotated and leave out the name from Parameters/Artifacts, so we need the name from the field when hoisting output Signed-off-by: Elliot Gunton <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
alicederyn
reviewed
Oct 1, 2024
Signed-off-by: Elliot Gunton <[email protected]>
Signed-off-by: Elliot Gunton <[email protected]>
Signed-off-by: Elliot Gunton <[email protected]>
Signed-off-by: Elliot Gunton <[email protected]>
* Fixes #1219 * Inform user they are doing funky stuff with an error Signed-off-by: Elliot Gunton <[email protected]>
* Fixes #1222 * Setting result or exit_code for a dag/steps function doesn't make sense, check if they are non-default values on return from the dag setup function and error if so. Signed-off-by: Elliot Gunton <[email protected]>
* Fixes #1170 * Add a DAG to the template set example Signed-off-by: Elliot Gunton <[email protected]>
alicederyn
reviewed
Oct 2, 2024
This comment was marked as resolved.
This comment was marked as resolved.
That example was wrong to begin with 😅 |
Should we write code to test the docstrings in the user guide? |
I don't think it's worth doing this for now, if we just copy/paste from an example workflow in the examples folder we should be good. It would be better to add linting #1163 for all the examples |
* Allow users to pass in `name=None` in their Tasks (e.g. if they have parameterised Task creation) * Check that the object returned from the dag has a class matching the one declared in the function signature, but cannot be a subclass Signed-off-by: Elliot Gunton <[email protected]>
Signed-off-by: Elliot Gunton <[email protected]>
alicederyn
approved these changes
Oct 2, 2024
sambhav
approved these changes
Oct 2, 2024
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.
Pull Request Checklist
Description of PR
Various syntax-focused fixes from the issue, including (by commit order)
Input
class, anything else now raises an errorInput
classpath
for Steps/DAG artifact inputs (which would be a lint error)result
orexit_code
for Steps/DAG