-
Notifications
You must be signed in to change notification settings - Fork 44
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
[Bugfix] [module_utils] [multiple modules] tmp_hlq use in utils whenever mvscmd gets called #1695
Conversation
…12/tmp_hlq_in_data_set_exists
…12/tmp_hlq_in_data_set_exists
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.
Nice and thorough.
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.
really good work here, i liked your core fix to leveraging the -Q
CLI option for specifying temporary high level qualifiers while we wait for the python api to become availble.
Change requests are:
- a note on the focus of the changelog
- a question about potentially overlooked function calls in the data set module
elif state == "uncataloged": | ||
changed = data_set.ensure_uncataloged() | ||
changed = data_set.ensure_uncataloged(tmp_hlq=tmp_hlq) | ||
return changed |
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.
how come the rest of these ensure_*
methods don't get the tmphlq
passed in? I noticed for example for ensure_absent
, you added a default value of tmphlq=None
in the function signature, but what if the user wants to define one, how does that value make it to the function call?
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.
Are you only referring to the calls in zos_data_set or also to the functions in the data_set.py util?
The calls in zos_data_set only have tmp_hlq
when they deal with common datasets, the calls that check members or GDGs don't end up using mvscmd
and thus don't include the HLQ. For the specific call to data_set.ensure_absent
, I included the HLQ at first, but then that caused errors while testing, so I removed it.
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 was referring to:
ensure_present
ensure_absent
ensure_cataloged
<-- you've got this one coveredensure_uncataloged
<-- you've got this one covered
For ensure_absent
, it calls attempt_catalog_if_necessary_and_delete
which calls data_set_cataloged
which calls mvscmd
.
For ensure_present
, it calls attempt_catalog_if_necessary
which calls data_set_cataloged
which calls mvscmd
.
To me, it seems like both ensure_present
and ensure_absent
should pass thetmphlq
all the way down the chain, otherwise, the module option would still be ignored for certain operations.
Any chance that the errors you got were because the chain of calls wasn't completely updated?
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 what other updates I made to the code, but now the calls don't end up with errors.
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.
to me, it seems like ensure_present
and ensure_absent
in the data set module needs to accomodate tmphlq
See my reply to the comment above (link)
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.
LGTM - thanks for making the requested changes!
SUMMARY
Fixes #912.
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION
Includes a lot of small changes just to pass the tmp_hlq used by modules all the way down to either
DataSet
orDataSetUtils
where it can be used every time we make a call tomvscmd
.