-
Notifications
You must be signed in to change notification settings - Fork 6
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
HTCONDOR-1731 Try replacing dots in token names with underscores #87
HTCONDOR-1731 Try replacing dots in token names with underscores #87
Conversation
@djw8605 this is my first time writing in Go, so please be as harsh as possible on my code style and whatnot 🙂 |
37b4293
to
cd1b54b
Compare
While adding support for underscores in URL schemes was laudible, there is still a problem parsing the (illegal) URLs upstream in HTCondor. Until we come up with a permanent solution, our workaround is to have users submit with a "." in place of the "_" (similar to how the client handles underscores internally) and have any plugins do the conversion from "." to "_" when doing token discovery. Here I have refactored the HTCondor-specific token discovery code into its own function, which will search for both tokens with and without "." replaced with "_" in their filenames. The TestGetToken test was expanded to test URL schemes using both "_" and "." and token files named with both "_" and ".".
cd1b54b
to
8930b9b
Compare
@jhiemstrawisc reassigning review to you (same applies, any Go feedback welcome!) |
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.
The approach looks solid, but my one minor nitpick is the mixing of camel and snake case. Elsewhere in the client we've tried to stick to camel case. Can you update variable names to match?
Done for the |
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.
LGTM
This PR brings a PR from OSDF-Client to Pelican that handles parsing token names with `.`s in their name. For more information, see: htcondor/osdf-client#87
Workaround for https://opensciencegrid.atlassian.net/browse/HTCONDOR-1731
While adding support for underscores in URL schemes was laudable, there is still a problem parsing the (illegal) URLs upstream in HTCondor. Until we come up with a permanent solution, our workaround is to have users submit with a
.
in place of the_
(similar to how the client handles underscores internally) and have any plugins do the conversion from.
to_
when doing token discovery.I have refactored the HTCondor-specific token discovery code into its own function, which will search for both tokens with and without
.
replaced with_
in their filenames. TheTestGetToken
test was expanded to test URL schemes using both_
and.
and token files named with both_
and.
.