Comments (9)
spiga: Please Review
from crabserver.
metson: The change to Requests.py looks fine to me - Rick do you want to look over the two RequestManager changes (they also look fine but I don't know the code).
from crabserver.
metson: Dammit wrong ticket!
from crabserver.
metson: This looks fine, few comments:
- line 102 (and a few other places) has {{{return json.dumps(result)}}} - that shouldn't be necessary, just return the dictionary and the framework will encode it appropriately (you might need to set your accept header in your client, or modify the server's Formatter to only return json). https://twiki.cern.ch/twiki/bin/view/CMS/DMWTTutorialDatabaseREST#RESTFormatter might be useful.
- I think {{{postUserConfig}}} should only return the {{{DocID}}} and not the database URL/name, because you'll have a one to one crab server:couchdb. At best it's useless information (the server will always use the same database) and at worse it's information leaking.
- I think the server should just set the team as 'analysis' (maybe one day base it on VOMS role? e.g. for physics group accounting) and not expose that to the client (in a similar way as the production system ignores the user)
- the imports are a bit funny, why do
{{{import WMCore.RequestManager.RequestMaker.CheckIn as CheckIn}}}
when you can do
{{{from WMCore.RequestManager.RequestMaker import CheckIn}}}
?
- I think the second {{{HTTPError}}} in {{{postRequest}}} should probably raise a 500 error, it's a problem in the server not in the request from the client
- There's no unit tests for this, before going much further the test coverage needs to increase a lot. REST_t.py in https://svnweb.cern.ch/trac/CMSDMWM/browser/WMCore/trunk/test/python/WMCore_t/WebTools_t is probably a good place to start
I think the first three issues should be addressed before you commit, and tests need to appear ASAP.
from crabserver.
spiga: Replying to [comment:5 metson]:
This looks fine, few comments:
- line 102 (and a few other places) has {{{return json.dumps(result)}}} - that shouldn't be necessary, just return the dictionary and the framework will encode it appropriately (you might need to set your accept header in your client, or modify the server's Formatter to only return json). https://twiki.cern.ch/twiki/bin/view/CMS/DMWTTutorialDatabaseREST#RESTFormatter might be useful.
ok. fine.
- I think {{{postUserConfig}}} should only return the {{{DocID}}} and not the database URL/name, because you'll have a one to one crab server:couchdb. At best it's useless information (the server will always use the same database) and at worse it's information leaking.
Ok.you are right... I'm not sure user doesn't want to access the pset into couch.. but we'll change this later only if needed.
- I think the server should just set the team as 'analysis' (maybe one day base it on VOMS role? e.g. for physics group accounting) and not expose that to the client (in a similar way as the production system ignores the user)
ok. this answer to one of my questions. For sure we cannot ignore since the team is a key point to have all the pieces talking each other.
- the imports are a bit funny, why do
{{{import WMCore.RequestManager.RequestMaker.CheckIn as CheckIn}}}
when you can do
{{{from WMCore.RequestManager.RequestMaker import CheckIn}}}
?
mistake.
- I think the second {{{HTTPError}}} in {{{postRequest}}} should probably raise a 500 error, it's a problem in the server not in the request from the client
I'll check and then change.
- There's no unit tests for this, before going much further the test coverage needs to increase a lot. REST_t.py in https://svnweb.cern.ch/trac/CMSDMWM/browser/WMCore/trunk/test/python/WMCore_t/WebTools_t is probably a good place to start
I think the first three issues should be addressed before you commit, and tests need to appear ASAP.
Ok. a patch without tests will be attached soon.
from crabserver.
metson: Replying to [comment:6 spiga]:
- I think the server should just set the team as 'analysis' (maybe one day base it on VOMS role? e.g. for physics group accounting) and not expose that to the client (in a similar way as the production system ignores the user)
ok. this answer to one of my questions. For sure we cannot ignore since the team is a key point to have all the pieces talking each other.
Ignore might not be the right word, but having some simple sane default for all CRAB servers as the baseline seems reasonable to me.
from crabserver.
spiga: Replying to [comment:7 metson]:
Replying to [comment:6 spiga]:
- I think the server should just set the team as 'analysis' (maybe one day base it on VOMS role? e.g. for physics group accounting) and not expose that to the client (in a similar way as the production system ignores the user)
ok. this answer to one of my questions. For sure we cannot ignore since the team is a key point to have all the pieces talking each other.
Ignore might not be the right word, but having some simple sane default for all CRAB servers as the baseline seems reasonable to me.
absolutely agree!
from crabserver.
spiga: Please Review
from crabserver.
metson: (In b88f053) Improve CRAB API. Add config api which act as a proxy and do the upload to CouchDB. Fixes #1254
From: spiga [email protected]
from crabserver.
Related Issues (20)
- #813: Test dev CRABClient using test2 REST instance and CMSSW_13_0_2 CMSSW release HOT 8
- checktaperecall - sometimes fails without clear cause HOT 4
- Improve PyPI images building process HOT 2
- #814: Test dev CRABClient using test2 REST instance and CMSSW_13_0_2 CMSSW release HOT 7
- RUCIO_Transfers should store also scope in filetransfersdb HOT 2
- rationalize configurations and common functions
- adapt Publisher_rucio to have rucio scope:name in tm_dbs_blockname HOT 2
- fix /opt/rucio/etc/rucio.cfg in pypi contaiiners
- [PyPI] Use local timezone for all images HOT 2
- avoid exiting container on command error HOT 4
- Change entrypoint of TW process to simple binary script
- keep tmp directory in TW only for 6 hours
- #815: Test prod CRABClient using test12 REST instance and CMSSW_13_0_2 CMSSW release HOT 7
- make text select via mouse for copy/paste work in pypi container
- stop extending TapeRecall rule when data is on disk HOT 3
- new DN for cmscrab service account
- FTS_Transfer does not handle external connection and bookkeeping properly, caused some files to be stale in the state "SUBMITTED" HOT 7
- incorrect handling of partial dataset
- Change entrypoint of Publisher process to simple binary script
- #816: Test prod CRABClient using preprod REST instance and CMSSW_13_0_2 CMSSW release HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crabserver.