Giter Club home page Giter Club logo

Comments (9)

spigad avatar spigad commented on July 28, 2024

spiga: Please Review

from crabserver.

drsm79 avatar drsm79 commented on July 28, 2024

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.

drsm79 avatar drsm79 commented on July 28, 2024

metson: Dammit wrong ticket!

from crabserver.

drsm79 avatar drsm79 commented on July 28, 2024

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 first three issues should be addressed before you commit, and tests need to appear ASAP.

from crabserver.

spigad avatar spigad commented on July 28, 2024

spiga: Replying to [comment:5 metson]:

This looks fine, few comments:

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.

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.

drsm79 avatar drsm79 commented on July 28, 2024

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.

spigad avatar spigad commented on July 28, 2024

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.

spigad avatar spigad commented on July 28, 2024

spiga: Please Review

from crabserver.

drsm79 avatar drsm79 commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.