-
Notifications
You must be signed in to change notification settings - Fork 190
[8.0] Interpret outputPath with LFN: prefix as an absolute one #8603
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
Open
atsareg
wants to merge
9
commits into
DIRACGrid:rel-v8r0
Choose a base branch
from
atsareg:fix-outputpath
base: rel-v8r0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+180
−5
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0045bac
feat: interpret outputPath with LFN: prefix as absolute one
atsareg ad22da4
feat: make output LFNs globbable
atsareg ab0fb97
fix: fixed path evaluation
atsareg e7fb85f
feat: added documentation on outputData/Path/SE specification
atsareg 9e7827f
feat: improve the docs quality
atsareg 6db9106
feat: added output data jobWrapper tests
atsareg 12535c3
fix: make more explicit file list evaluation test
atsareg dadf667
fix: make the tests independent of the order of reported files
atsareg 279175f
fix: try to please docutils
atsareg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -951,9 +951,19 @@ def __transferOutputDataFiles(self, outputData, outputSE, outputPath): | |
| else: | ||
| nonlfnList.append(out) | ||
|
|
||
| # Check whether list of outputData has a globbable pattern | ||
| # Check whether the list of LFNs has globbable patterns | ||
| globbedLfnList = [] | ||
| for lfn in lfnList: | ||
| lfnPath = os.path.dirname(lfn) | ||
| lfnLocal = os.path.basename(lfn) | ||
| globbedLfnList += [os.path.join(lfnPath, gLfn) for gLfn in List.uniqueElements(getGlobbedFiles(lfnLocal))] | ||
| if globbedLfnList and globbedLfnList != lfnList: | ||
| self.log.info("Found a pattern in the output data LFN list, LFNs to upload are:", ", ".join(globbedLfnList)) | ||
| lfnList = globbedLfnList | ||
|
|
||
| # Check whether the list of outputData has a globbable pattern | ||
| globbedOutputList = List.uniqueElements(getGlobbedFiles(nonlfnList)) | ||
| if globbedOutputList != nonlfnList and globbedOutputList: | ||
| if globbedOutputList and globbedOutputList != nonlfnList: | ||
| self.log.info( | ||
| "Found a pattern in the output data file list, files to upload are:", ", ".join(globbedOutputList) | ||
| ) | ||
|
|
@@ -1113,6 +1123,10 @@ def __getLFNfromOutputFile(self, outputFile, outputPath=""): | |
| # If output path is given, append it to the user path and put output files in this directory | ||
| if outputPath.startswith("/"): | ||
| outputPath = outputPath[1:] | ||
| # If output path is given with the LFN: prefix, take it as an absolute path | ||
| elif outputPath.startswith("LFN:"): | ||
| outputPath = outputPath[4:] | ||
| basePath = "" | ||
|
Comment on lines
+1126
to
+1129
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this block be before the previous 2 lines? For the case when |
||
| else: | ||
| # By default the output path is constructed from the job id | ||
| subdir = str(int(self.jobID / 1000)) | ||
|
|
||
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
Oops, something went wrong.
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.
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.
There is a code duplication between these inserted lines and those that follow, care to refactor for simplicity?