[v7r2] HTTPs services within DIRAC#4677
Conversation
andresailer
left a comment
There was a problem hiding this comment.
Basically random observations, mostly typos.
fstagni
left a comment
There was a problem hiding this comment.
Don't you want to run the "dummy" integration tests of Tornado in the CI?
| self._request(retry=retry + 1, stream=stream, outputFile=outputFile, **kwargs) | ||
|
|
||
| errStr = "%s: %s" % (str(e), rawText) | ||
| return S_ERROR(errStr) |
There was a problem hiding this comment.
It may be worth here returning S_ERROR with the response status code or describe the http codes in the DErrno and return them according to the received status code.
There was a problem hiding this comment.
Hum, I think I understand what you mean. I'll think of it, but I do not think it is a good idea to re-map all the HTTP status code to a DErrno error code. However you are correct that we should distinguish the cases where we get really an HTTP error, or if we get another exception (network for example). I'll try to come up with something
051c31e to
a10cbc4
Compare
|
There are some conflicts, please rebase/fix. |
|
@fstagni I think there is again a cockup with the required tests. This is constantly a source of problem. Can we either have them all or none as required ? |
1ddc171 to
7facb5d
Compare
|
I will just put None as required (the interface is pretty silly...) |
fstagni
left a comment
There was a problem hiding this comment.
Mostly comments and a few requests.
2e4cce1 to
284183d
Compare
|
OK I think this time it's good to go. @andresailer @chrisburr @fstagni anyone care to do the final review ? |
b2491d5 to
9ab2e64
Compare
|
@andresailer done ! |
chrisburr
left a comment
There was a problem hiding this comment.
Just a few uses additions of io.open that should be reverted.
There will be a handful more Python 3 issues but I'll fix them after this is merged rather than making more conflicts with my Python 3 PRs.
Co-authored-by: Andre Sailer <andre.philippe.sailer@cern.ch>
4a1ab16 to
a0230d7
Compare
…tornado patch repo
| - Auth attributes are still there (``auth_yourMethod``). | ||
|
|
||
| The interface of the DISET request handler was preserved, in particular: | ||
| * ``getCSOption`` |
There was a problem hiding this comment.
| * ``getCSOption`` | |
| * ``getCSOption`` |
I think this needs a newline before the bullet list
| ************ | ||
|
|
||
| Two special python packages are needed: | ||
| * git+https://github.com/DIRACGrid/tornado.git@iostreamConfigurable : in place of the standard tornado. This adds configurable feature to tornado |
There was a problem hiding this comment.
| * git+https://github.com/DIRACGrid/tornado.git@iostreamConfigurable : in place of the standard tornado. This adds configurable feature to tornado | |
| * git+https://github.com/DIRACGrid/tornado.git@iostreamConfigurable : in place of the standard tornado. This adds configurable feature to tornado |
Another newline needed here
|
|
||
| From the client side, no change is needed since :py:meth:`DIRAC.Core.Tornado.Client.TornadoClient.TornadoClient.receiveFile` keeps the interface | ||
|
|
||
| This procedure is not optimized server side (see commented ``export_streamToClient`` implementation in :py:class`DIRAC.Core.Tornado.Server.TornadoService.TornadoService`). |
There was a problem hiding this comment.
| This procedure is not optimized server side (see commented ``export_streamToClient`` implementation in :py:class`DIRAC.Core.Tornado.Server.TornadoService.TornadoService`). | |
| This procedure is not optimized server side (see commented ``export_streamToClient`` implementation in :py:class:`DIRAC.Core.Tornado.Server.TornadoService.TornadoService`). |
|
|
||
| - `Presentation of HTTPS in DIRAC <https://docs.google.com/presentation/d/1t0hVpceXgV8W8R0ef5raMK3sUgXWnKdCmJUrG_5LsT4/edit?usp=sharing>`_. | ||
| - `Presentation of HTTPS migration <https://docs.google.com/presentation/d/1NZ8iKRv3c0OL1_RTXL21hP6YsAUXcKSCqDL2uhkf8Oc/edit?usp=sharing>`_. | ||
| - `Summary presentation (latest) <https://indico.cern.ch/event/945474/>`. |
There was a problem hiding this comment.
| - `Summary presentation (latest) <https://indico.cern.ch/event/945474/>`. | |
| - `Summary presentation (latest) <https://indico.cern.ch/event/945474/>`_. |
andresailer
left a comment
There was a problem hiding this comment.
I was wrong about the :py:class; that was fine. Only the one missing colon was giving a bad display. There might be some packages missing now for the readthedocs.org documentation, so this maybe needs a fix PR right after
This PR replaces #3815 and is mostly based on the work of @louisjdmartin
It should be totally transparent for the existing, as the existing code was mostly left untouched. Most of it is well documented and tested, but a lot of clean up still needs to be done.
This initial PR:
When originally designed (2 years ago), a lot of tests were written in order to compare the behaviour of DISET and HTTPs server, as well as performance tests. These tests are still included here in case of need, but no effort has been made to automate it.
The aim of the approach here is that the replacement of the protocol should be as transparent as possible. However, there are known problems, well detailed in various presentations and tasks (links in the docs) that may make it tricky in some places, in particular for global variables.
Having to rebase that two year old extensively tested code was quite some work. Thus I hope that this PR is not going to sit long before being merged.
BEGINRELEASENOTES
*Tests
FIX: Ignore tornado services and test DBs
NEW: new integration tests for Tornado based services
Core:
NEW: X509Chain returns DN entry
NEW: introduction of Tornado based services
ENDRELEASENOTES