-
Notifications
You must be signed in to change notification settings - Fork 172
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
[v6r18] PilotsLogging DB/Service/Client #2918
Conversation
- adding tables for PilotsLogging using SQLAlchemy - adding functions to handle DB operations for PilotsLogging - added deleting from PilotsLogging when deleting pilot
…ated from PilotAgents
…my, not DIRAC DB mechanism
+ typo spotted
- adding tables for PilotsLogging using SQLAlchemy - adding functions to handle DB operations for PilotsLogging - added deleting from PilotsLogging when deleting pilot
+ typo spotted
…Logging2 * 'PilotsLogging2' of github.com:miloszz/DIRAC: (27 commits) Fixed indentation Function auth moved to ConfigTemplate.cfg + typo spotted Adjusting filename for convention problem with case sensitiveness in filename Error handling using DErrno Code cosmetics Removing "from types import (...)" Code cosmetics Tests moved from TestDIRAC Removing "from types import (...)" Include PilotsLogging service in ConfigTemplate.cfg PilotsLogging, cherry-picking... Allow deleting PilotsLogging for list of PilotIDs. Tightening authorizations for handler functions PilotsLoggingDB.sql file for dirac-install integration. Dropping Core.Base.DB dependency - database is handled using SQLAlchemy, not DIRAC DB mechanism Code and comments cosmetics Deleting PilotsLogging when deleting pilot - updated + error handling Refactorisation of Pilots Logging. Database, service and client separated from PilotAgents Fixes in error handling ...
|
Content looks good to me. Please follow the advices given in landscape, especially see if the "12 errors" reported are real errors or just things that pylint does not understand (in this last case, use a per-line Also, doc should be added in this same PR: administration docs and developer docs. |
|
Changes Unknown when pulling 0cce84a on miloszz:PilotsLogging2 into * on DIRACGrid:rel-v6r15*. |
|
||
Each logging entry includes: | ||
|
||
- current status of the Pilot - has to be one of predefined list of possible states, |
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.
possible states
: I understand this list of states is not in the current PR.
When such definition is available (in another PR) please link to it.
Great that also developer documentation has been added. It would be even greater if administrator documentation would be added, basically answering the following questions:
|
The last point above made me to realize that there's no dirac script that, say, can answer the question "what are the pilots logging messages for pilot 12345?". Or am I missing something? |
I suggest to add a line with
for handlers, as per construction these files will otherwise always show a "code smell" for every exposed function. |
|
||
from sqlalchemy.sql.schema import ForeignKey, PrimaryKeyConstraint | ||
from sqlalchemy.sql.sqltypes import DateTime | ||
from sqlalchemy.orm import sessionmaker, scoped_session, mapper |
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.
mapper is unused
Changes Unknown when pulling cb62e3a on miloszz:PilotsLogging2 into * on DIRACGrid:rel-v6r15*. |
|
Still having some pylint errors and I'm afraid only way to avoid them is to add exception (or redesign DIRAC Service machinery). I think it will be for almost if not all services: in code global variables for databases are defined as Falses, when executing, real objects are assigned when service is started but pylint doesn't recognise it (Instance of 'bool' has no XXX member). Also using global is pointed as something bad. As well as functions with many statements, many returns and many branches. |
|
Changes Unknown when pulling 9668d92 on miloszz:PilotsLogging2 into * on DIRACGrid:rel-v6r15*. |
This branch has now conflicts that would need to be resolved. And the target branch should become v6r16. |
DB, Service and Client for handling extended pilot logging.
Uses SQLAlchemy for database handling, DErrno for errors.
PR recreated for cleanup.