8000 [contrib.hdfs.target.HdfsFlagTarget] fixed argument forwarding to the… by dgronskij · Pull Request #2634 · spotify/luigi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[contrib.hdfs.target.HdfsFlagTarget] fixed argument forwarding to the… #2634

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

Closed
wants to merge 1 commit into from
Closed

Conversation

dgronskij
Copy link
@dgronskij dgronskij commented Jan 24, 2019

There is a mismatch between HdfsTarget.__init__ signature and how it's called from the HdfsFlagTarget.__init__

@@ -214,7 +214,7 @@ def __init__(self, path, format=None, client=None, flag='_SUCCESS'):
if path[-1] != "/":
raise ValueError("HdfsFlagTarget requires the path to be to a "
"directory. It must end with a slash ( / ).")
super(HdfsFlagTarget, self).__init__(path, format, client)
super(HdfsFlagTarget, self).__init__(path, format, is_tmp=False, fs=client)
Copy link
Member

Choose a reason for hiding this comment

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

There is not need to set is_tmp=False which is the default value in HdfsTarget.

Copy link
Author

Choose a reason for hiding this comment

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

I thought that for sake of human readability I better should name-mention parameters that seem being out of context / have different naming but if it doesn't fit, I'll change that

Copy link
Member

Choose a reason for hiding this comment

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

I meant there is no need to pass in is_tmp, fs=client is sufficient.

Copy link
Author

Choose a reason for hiding this comment

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

Agreed, fixed

@honnix
Copy link
Member
honnix commented Jan 24, 2019

Looks like a good fix. How come this was not caught by test case? It was introduced by this PR: #2559

@dgronskij
Copy link
Author
dgronskij commented Jan 24, 2019

@honnix the test case covers only path / format parameters. Not sure if we have to check fs(client) / is_tmp too. It's a pity the new class breaks naming convention though.

@honnix
Copy link
Member
honnix commented Jan 24, 2019

It would be nicer we can add test case to cover the change. But I don't have strong opinion in this case. What do you say @dlstadther ?

@dlstadther
Copy link
Collaborator

I'm not overly familiar with these HDFS classes. @dgronskij What is the naming convention which is broken?

I agree with @honnix that test coverage would be great. I often rely on Travis tests in areas of Luigi to which i'm much less familiar.

@dgronskij
Copy link
Author
dgronskij commented Jan 25, 2019

@dlstadther, well by "broken" I meant using client in the module where fs keyword is already used with the same meaning. Nevermind:)

BTW, it seems to me (please, correct me if it's not true, I have no previous experience with Travis CI / Nose) that HDFS related stuff is not tested at all:

# - TOXENV=py27-cdh

There is no notion of hdfs target tests in travis build log, too.
How is it meant to be tested? Manual runs against forked repos (by the way, is it possible)?

Moreover, HdfsTargetTestMixin that test HdfsFlagTarget via test_flag_target seems to be broken since format variable not being defined anywhere.

UPD
The original test was really broken, I will make a fix for it.

@stale
Copy link
stale bot commented Jun 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If closed, you may revisit when your time allows and reopen! Thank you for your contributions.

@stale stale bot added the wontfix label Jun 1, 2019
@stale stale bot closed this Jun 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0