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

DM-12938: ap_pipe crashes if --output is absolute path #13

Merged
merged 1 commit into from Feb 6, 2018

Conversation

kfindeisen
Copy link
Member

The previous code required that ap_pipe's output repo be a relative path to an immediate subdirectory of the user's working directory, which caused crashes when an unaware user provided a different path.

@morriscb
Copy link
Contributor

morriscb commented Feb 6, 2018

Looks good overall. However, a short explanation of what oldDir is an why it's there may be in order. Esspecially the plan is at some point to remove it.

@@ -440,6 +440,10 @@ def defectIngest(repo, calib_repo, defectfiles):
- They will be added to the calib registry, but not linked like the flats and biases
'''
log = lsst.log.Log.getLogger('ap.pipe.defectIngest')
absRepo = os.path.abspath(repo)
defect_tarball = os.path.abspath(defectfiles[0] + '.tar.gz')
oldDir = os.path.abspath(os.getcwd())
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the name oldDir? This makes it sound like it will be removed later. Maybe add a comment here explaining this directory and it's relation to the absRepo path.

Copy link
Member Author

@kfindeisen kfindeisen Feb 6, 2018

Choose a reason for hiding this comment

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

"Old" as in "before mucking around with chdir." Would "startDir" be better?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, sounds good.

The previous code required that ap_pipe's output repo be a relative
path to an immediate subdirectory of the user's working directory,
which caused crashes when an unaware user provided a different path.
@kfindeisen kfindeisen merged commit eed5396 into master Feb 6, 2018
@kfindeisen kfindeisen deleted the tickets/DM-12938 branch February 25, 2019 19:51
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.

None yet

2 participants