-
Notifications
You must be signed in to change notification settings - Fork 25
fix: jobparameters and jobattributes pydantic models #626
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: main
Are you sure you want to change the base?
Conversation
229214d
to
47e87e4
Compare
A few questions, problably for @fstagni:
When it comes to job attributes, it seems to be in order, I haven't noticed any attribute that was not referenced in the pydantic model, both in Dirac and in the extension. So now the questions are:
From what I can see, adding a very large number of fields in a dynamic mapping could lead to a mapping explosion (https://www.elastic.co/docs/troubleshoot/elasticsearch/mapping-explosion) but it looks like we are far from the limit. |
Right now, with this patch, we only set the job metadata that are explicitly defined in the models and we miss many of them: diracx/diracx-logic/src/diracx/logic/jobs/status.py Lines 531 to 542 in 69494d8
I could just revert the commit, but we might have job metadata that are defined both as attributes and parameters (e.g. |
47e87e4
to
cbdeff4
Compare
Does not look like it is still used.
Most probably useless by now
I vaguely remember @arrabito making similar question, e.g. check DIRACGrid/DIRAC#7757 and DIRACGrid/DIRAC#7509
Maybe not used but I would be careful to remove this.
I think these 2 can go
Oh remove this.
That's normal, as job attributes are MySQL fields (parameters instead are free key-value pairs).
What do we gain with being strict?
|
cbdeff4
to
2802b6c
Compare
Then we would need to change the
Indeed, I look at it too fast, I thought they were also free key-value pairs. But the current approach is still potentially "fragile" because extensions that have additional job attributes need to extend the
We lose flexibility of course but we gain clarity. As demonstrated in the examples above, by being too flexible:
What do we gain with being flexible? Do we actually need to set anything as a job parameters? (not really related but since we talk about them: job attributes could potentially be renamed as |
The mapping should be changed in OpenSearch |
bd77d43
to
47700ae
Compare
…o the right backends
f10ce87
to
048d0fb
Compare
048d0fb
to
359b889
Compare
Aims at fixing #603 in LHCb