Skip to content
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 data type passed in Global WorkQueue for getDatasetLocations() #11862

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

amaltaro
Copy link
Contributor

@amaltaro amaltaro commented Jan 15, 2024

Fixes #11861 (complement to #11810)

Status

ready

Description

Cast simple string object to list in getDatasetLocations method, otherwise we iterate over each character instead of each dataset name

Is it backward compatible (if not, which system it affects?)

YES

Related PRs

Fixes a mistake from #11810

External dependencies / deployment changes

None

@amaltaro amaltaro requested a review from vkuznet January 15, 2024 16:52
@cmsdmwmbot
Copy link

Jenkins results:

  • Python3 Unit tests: failed
    • 1 new failures
    • 2 changes in unstable tests
  • Python3 Pylint check: failed
    • 9 warnings and errors that must be fixed
    • 22 comments to review
  • Pylint py3k check: succeeded
  • Pycodestyle check: succeeded

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/14767/artifact/artifacts/PullRequestReport.html

@@ -139,7 +139,7 @@ def newQueueElement(self, **args):
for data, sites in viewitems(ele['Inputs']):
if not sites:
# make call to rucio to get list of replicas for this input data
locations = self.getDatasetLocations(data, account=self.rucioAcct)
locations = self.getDatasetLocations([data], account=self.rucioAcct)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth to check data type of data before wrapping it up into list data type? Or allow getDatasetLocations to accept both a single dataset or list of datasets?

Accept a single dataset string and cast it to list
@amaltaro
Copy link
Contributor Author

@vkuznet Valentin, that approach is fine with me as well. I have updated this PR to accept either a string or a list of strings in getDatasetLocations(). Please have another look.

@cmsdmwmbot
Copy link

Jenkins results:

  • Python3 Unit tests: failed
    • 1 new failures
    • 2 changes in unstable tests
  • Python3 Pylint check: failed
    • 9 warnings and errors that must be fixed
    • 22 comments to review
  • Pylint py3k check: succeeded
  • Pycodestyle check: succeeded

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/14768/artifact/artifacts/PullRequestReport.html

@amaltaro amaltaro merged commit 83da703 into dmwm:master Jan 15, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong data type passed for getDatasetLocations() in StartPolicyInterface module
3 participants