-
Notifications
You must be signed in to change notification settings - Fork 2
Proposal of new diffJobSettings.py functionalities #19
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: master
Are you sure you want to change the base?
Conversation
m-dati
commented
Dec 20, 2022
- Expanded diff logic with common-extra print,
- help improved,
- short options added, -j, -n, -c
- json comments display added
- single ID print added, to display all #ID content [comments optionally included]
|
Example run : |
|
Single ID run example: |
diffJobSettings.py
Outdated
| args = parser.parse_args() | ||
|
|
||
| source_url='' | ||
| obvious_differs=("NAME") |
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.
why you have dropped this variable ?
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.
As I understood, it was needed to exclude NAME from difference list (continue).
In this update I included the NAME parameter too in the list of data, to show all the differences, therefore this variable and related check-if was no more needed.
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.
But eventually, for more local customizations, I could restore both variable and check and leave empty that list: obvious_differs=()
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.
skip-list applied
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.
when I was using first versions of this script I have seen a lot of variables which always different and knowing that they different does not bring any valuable info . For example there is "WORKER_ID" variable ofc. it will differ from run to run because certain worker picked up randomly from currently available and it does not help you anyhow knowing that yet another random value is selected . Same goes to test "NAME" , it will be always different because NAME variable contains job ID so name is unique .
Main purpose of this script ( at least for me ) is to compare failed job with same one but passed, to try to find single one which cause the failure . The purpose of "obvious_differes" variables is to remove the "noise" from the list . To see only variables which really have chance to be failure cause and NAME have almost no chance to be that variable ( as many others , I planned to extend this list but never had a chance ... )
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.
I agree with your POV. I restored the code, but I let empty the list: in this case, I gonna restore the original settings (NAME), so that each one local copy can be eventually changed on one own need.
Future implementations could eventually provide a more option with fileds to skip :-)
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.
I don't see this changes yet , maybe your forgot to push them ?
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.
changes ongoing ... :) will be online soon
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.
Please, see the last commit: added skip default 'NAME' and a new option to eventually enter more fileds to skip.
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.
Consider we that the job json has up to 3 levels (job.level1.level2) dictionary and actual diff is only performed in the job.settings.. Therefore the current excluded fields can be in that 3rd level only, none in other 2nd levels as job.assets or job.state, in this implementation :)
|
generally I like it , and I gonna merge it . well done Maurizio ! But let's clarify few small questions |
- Expanded diff logic with common-extra print, - help improved, - short options added, - json comments display added - single ID print added
|
In a future version the 'sensible' data could be optionally auto-hidden |
|
In this last commit |
- skipdiff opt added: list of settings fields to skip from all diffs; default NAME