This means that if I explicitly pass a URL as a parameter, this class will silently ignore it and do something different based on the settings. That seems pretty non-intuitive to me. At the least, I'd expect to log some sort of warning, but even that isn't great — in general, I'd expect the API to take arguments its given directly rather than deferring to defaults.
Without having carefully looked at the other code, I think you probably want something more like:
def __init__(self, url=settings.RUCIO_HOST):
if url:
self.url = url
else:
raise
Yan Grange (6014fcad) at 12 Jul 12:24
fix Rucio URL definition to take RUCIO_HOST if specified
... and 1 more commit
When I set up my own ESAP that needs to talk to its own Rucio instance, I have to configure the URL both in the envrionment through the RUCIO_HOST and RUCIO_AUTH_HOST as well as in the esap/esap/esap_config.yaml
file which contains a url
and a user_url
. This is not really documented and may lead to some weird errors because the URL used to list the scopes is taken from the environment while the URL that is used to find the files within a scope is taken from the latter.
I am looking into this so I may propose a fix today.
you can use os.getenv("OIDC_AUDIENCE", "rucio")
instead of try except
This MR intends to fix esap-general#210 and esap-general#211
Yan Grange (9a84af55) at 11 Jul 13:30
Fix issue with test
Yan Grange (b944f64d) at 11 Jul 13:21
Adapt test to new variable
Yan Grange (e713b804) at 11 Jul 13:12
Adding oidc audience as a configurable
Yan Grange (ac53542f) at 11 Jul 13:07
There are a handful of things that I noticed when we (Tangerine) tried to deploy ESAP on a local node. This MR covers all those. There are some fixes on the docker-compose files and a few suggestions for the README documentation.
In the end we managed to set up ESAP talking the the ESCAPE Rucio instance, but failed at connecting to the SKA Rucio instance so we may have a slightly better look at that later, and naybe file an issue somewhere here.
John Swinbank (fca9439b) at 10 May 07:02
Merge branch 'tangerine_fixes' into 'main'
... and 3 more commits
Thanks Yan!
John Swinbank (9f692c6a) at 10 May 06:59
Tweak wording of README
When trying to connect ESAP to the SKAO Rucio, this failed because the aud
of the OIDC request is expected to be slightly different in this case. This is an extension of the original aud (adding an extra https://wlcg.cern.ch/jwt/v1/any
to it, but I think it may be nicer to make this configurable using an environment variable.
There are a handful of things that I noticed when we (Tangerine) tried to deploy ESAP on a local node. This MR covers all those. There are some fixes on the docker-compose files and a few suggestions for the README documentation.
In the end we managed to set up ESAP talking the the ESCAPE Rucio instance, but failed at connecting to the SKA Rucio instance so we may have a slightly better look at that later, and naybe file an issue somewhere here.
Yan Grange (1d176fab) at 09 May 09:37
Documentation improvement proposals
Yan Grange (c6b3df2c) at 08 May 14:36
Minor docker-compose fixes
John Swinbank (7dfe450a) at 03 May 12:39
Link to main ESAP docs