-
Notifications
You must be signed in to change notification settings - Fork 184
feat: verify CS config commit using diracx model validation #8351
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
base: integration
Are you sure you want to change the base?
feat: verify CS config commit using diracx model validation #8351
Conversation
|
I'm not completely sure the verification was expected to be in |
3261199 to
7cd1dd8
Compare
|
I think your understanding is correct, the check should be at modification time. I would not create a new module, you can add your new function inside Modificator.py or inside src/DIRAC/FrameworkSystem/Utilities/diracx.py |
|
Thanks @fstagni for the clarification. |
|
One possible issue I see in what I've done is that, if my understanding is correct, in Modificatior, Is that ok like this? or should I verify only the current changes? |
|
It's probably OK. I am also wondering if instead of simply displaying a warning, the commit should simply be refused. |
In the issue it is precised that:
|
| yield client | ||
|
|
||
|
|
||
| def diracxVerifyConfig(cfgData): |
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.
This won't work for converting the CS, see https://diracx.diracgrid.org/en/latest/admin/how-to/install/convert-cs/ for the procedure.
Running it in a subproces with a timeout is probably a good idea.
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.
Ah indeed. Then I will call the diracx cli to validate the config.
Here me and @chaen disagree but I also think it should be refused. Maybe it would be good to gate it behind an option in the CS service. |
014be21 to
90c38d1
Compare
1b3a58e to
8036c6e
Compare
Verify the CS config using diracx model validation before committing. If validation fails a warning is diplayed.
closes #8302