-
Notifications
You must be signed in to change notification settings - Fork 34
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
adapt manage_bootstrap_user.py to change in lib/galaxy/web/security introduced in Galaxy release_19.05 #61
Conversation
@drosofff I think there is a 19.05 branch. If you want to apply it to this one. I will merge 19.05 as soon as the release is out. |
Hi @bgruening It's late I am sleepy: applying what ? ;-) |
Oh, lol, no I'm sleepy all good. I thought that's the bootstrap script in ansible-extras :) Uha. going to bed now :) |
Too many ansible roles ? ;-) Have a good night, I am going to bed too |
Is there an estimate for when this may be merged into master? I am using this role in the deployment I am developing and would like to be able to use it with the most recent release. |
Hi @bgruening |
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! Sorry about the delay - good that you pinged individual reviewers, it's easy to miss things because so many things are happening in so many repositories!
files/manage_bootstrap_user.py
Outdated
from galaxy.web import security | ||
|
||
try: | ||
from galaxy.web.security import SecurityHelper as Security |
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.
Can you switch this around so that the new import is tried first, and add a comment in the except clause that this maintains backwards compatibility with galaxy versions < 19.05 ? fwiw the PR that modified this was galaxyproject/galaxy#7560
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.
Ok, this is done, together with a bit of code cleaning
files/manage_bootstrap_user.py
Outdated
@@ -268,6 +277,7 @@ def delete_bootstrap_user(ini_file, username): | |||
args = parser.parse_args() | |||
|
|||
if args.action == "create": | |||
create_bootstrap_user(args.config, args.username, args.email, args.password, args.preset_api_key) | |||
create_bootstrap_user(args.config, args.username, args.email, |
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.
When breaking up long argument lines we usually make this one argument per line:
create_bootstrap_user(args.config, args.username, args.email, | |
create_bootstrap_user(args.config, | |
args.username, | |
args.email, |
files/manage_bootstrap_user.py
Outdated
@@ -268,6 +277,7 @@ def delete_bootstrap_user(ini_file, username): | |||
args = parser.parse_args() | |||
|
|||
if args.action == "create": | |||
create_bootstrap_user(args.config, args.username, args.email, args.password, args.preset_api_key) | |||
create_bootstrap_user(args.config, args.username, args.email, | |||
args.password, args.preset_api_key) |
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.
args.password, args.preset_api_key) | |
args.password, | |
args.preset_api_key) |
Thanks @drosofff! |
see changes here galaxyproject/galaxy@528497f
The fix allows successfully bootstrapping a user in release_19.05 and preserves backward compatibility with < release_19.05