-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: support data transfer protection in HDFS artifacts. Fixes #13482 #13483
feat: support data transfer protection in HDFS artifacts. Fixes #13482 #13483
Conversation
6cd885f
to
cacc094
Compare
@terrytangyuan @sarabala1979 |
workflow/artifacts/hdfs/hdfs.go
Outdated
// Do nothing | ||
default: | ||
return errors.Errorf(errors.CodeBadRequest, "%s.dataTransferProtection must be one of 'authentication', 'integrity', 'privacy', or empty", errPrefix) | ||
} |
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.
Thanks for adding the validation here, although I'm torn on whether we should validate this or not. On one hand, if the ClientOptions
ever change for DataTransferProtection
then we'd have to update this when the version in go.mod gets updated. I'm wondering if it may be easy for someone to update the go.mod and then forget to check this part - what do you think?
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 agree that your concern is valid. I initially added validation based on the three modes specified in https://github.com/colinmarc/hdfs/blob/master/client.go#L24-L28. While I don't expect these options to change frequently, I agree that if they do change in the future, this validation might be easily overlooked.
@juliev0 Thank you for reviewing my PR, I agreed with your feedback and have removed the validation. Thank you. |
Signed-off-by: Injun Baeg <ij.baeg@navercorp.com>
Signed-off-by: Injun Baeg <ij.baeg@navercorp.com>
…with future updates Signed-off-by: Injun Baeg <ij.baeg@navercorp.com>
Signed-off-by: Injun Baeg <ij.baeg@navercorp.com>
68b0013
to
ca34b16
Compare
/retest |
@Looka149 assuming the CI failures aren't related to your change, would you mind adding empty commits until the CI passes? |
Signed-off-by: Injun Baeg <ij.baeg@navercorp.com>
@juliev0 Hi. I have merged the main branch, and the CI tests have completed successfully. Thanks. |
options := hdfs.ClientOptions{ | ||
Addresses: addresses, | ||
Addresses: addresses, | ||
DataTransferProtection: dataTransferProtection, |
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 make artifacts more sustainable (other than plugins #5862), I've been arguing we should perhaps accept arbitrary YAML string output more often. E.g. in this case:
clientOptions: |
dataTransferProtection: true
That way we don't have to add a new feature every time a user wants to configure something else
Although it doesn't apply in every case, to be fair
Fixes #13482
Motivation
As shown in https://github.com/argoproj/argo-workflows/blob/main/examples/hdfs-artifact.yaml, I am working on storing artifacts in HDFS. In my environment, the HDFS cluster has
dfs.data.transfer.protection
set toauthentication
. When I run the example, I encounter aread: connection reset by peer
error.Modifications
The HDFS client supports the data transfer protection option, which can be configured to
authentication
,integrity
,privacy
, or left empty, as detailed in this pull request. With this configuration, the issue described above is resolved.This feature is available in versions v2.4.0, v2.3.0, v2.2.1, and v2.2.0 (see commit). Since we are using version v2.4.0 of the HDFS client (as specified here), we can utilize this feature.
Verification
Referring to the hdfs-artifact.yaml example, you can specify the value of
artifacts.hdfs.dataTransferProtection
as 'authentication', 'integrity', 'privacy', or leave it empty.If an incorrect value is provided, the following error will occur.