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
Package handle template #2137
Package handle template #2137
Conversation
fiskus
commented
Mar 29, 2021
•
edited
edited
- Unit tests
- Automated tests (e.g. Preflight)
- Documentation
- Changelog entry
Codecov Report
@@ Coverage Diff @@
## master #2137 +/- ##
==========================================
- Coverage 44.20% 44.19% -0.02%
==========================================
Files 488 488
Lines 23640 23678 +38
Branches 3014 3019 +5
==========================================
+ Hits 10450 10464 +14
- Misses 12344 12368 +24
Partials 846 846
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
hasValidationErrors: true, | ||
form: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed form
only, and sort other properties alphabetically
hasValidationErrors: true, | ||
form: true, | ||
initialValues: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I added initialValues
shared/schemas/workflows.yml.json
Outdated
} | ||
} | ||
} | ||
}, | ||
"properties": { | ||
"version": { | ||
"const": "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sir-sigurd I don't know should I increment version? I've added additional property package_handle
, probably version should be 1.1
now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not sure if we decided on some global approach to schema versioning, but i'd say we should increment minor version to indicate feature addition while preserving compatibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks ok, tho i'm not sure about using initialValues
object persisted in react state vs granular values for individual fields.
) | ||
|
||
const [initialValues, setInitialValues] = React.useState({ | ||
files: initialFiles, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this way files initial value wont be updated on input props change (it shouldnt be a problem in practice bc it wont be changing while the dialog is open, but anyways, we should keep that in mind).
btw why did you consolidate all the initial values into one object and put it into state var?
what are the benefits of this vs using separate computed and state vars?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one benefit — it works :)
I couldn't make it work with updating initialValue
per field, they just don't update
directory: undefined, | ||
username: undefined, | ||
}), | ||
).toBe('/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this expectation doesnt match the description ("should return null")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like this belongs to the it
below
shared/schemas/workflows.yml.json
Outdated
} | ||
} | ||
} | ||
}, | ||
"properties": { | ||
"version": { | ||
"const": "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not sure if we decided on some global approach to schema versioning, but i'd say we should increment minor version to indicate feature addition while preserving compatibility
@@ -7,6 +7,25 @@ | |||
"workflows" | |||
], | |||
"additionalProperties": false, | |||
"definitions": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have duplicate schema files in python code and catalog?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
probably |
Was done here #2364 |