-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
2
-
StorEng - Defined Pipeline
I am still getting the following warning when running the script even though my code changes are not impacting the mentioned types:
####################### MESSAGE ############################ s_all run of: "python3 primitive_check.py" resulted in: Code changes made since this branch diverged from develop include the following concurrency control primitives: ['volatile', 'WT_ORDERED_READ', 'WT_PUBLISH'] If you have introduced or removed a primitive it will impact the in progress shared variable review project. Please reach out accordingly. #######################
The script could be improved by performing a simple diff between the tip of the branch being modified and develop using the following command:
git diff <current_branch>..develop
The code changes could be the following ones:
diff --git a/dist/primitive_check.py b/dist/primitive_check.py index 59df27343..7f246964a 100755 --- a/dist/primitive_check.py +++ b/dist/primitive_check.py @@ -33,9 +33,12 @@ primitives = [ ] command = "git rev-parse --show-toplevel" -root = subprocess.run(command, capture_output=True, text=True, shell=True).stdout +root = subprocess.run(command, capture_output=True, text=True, shell=True).stdout.strip() -command = f"git diff {common_functions.last_commit_from_dev()} -- src/" +command = "git rev-parse --abbrev-ref HEAD" +branch = subprocess.run(command, capture_output=True, text=True, shell=True).stdout.strip() + +command = f"git diff develop..{branch}" diff = subprocess.run(command, capture_output=True, cwd=root.strip(), text=True, shell=True).stdout found = False found_primitives = []
- duplicates
-
WT-12199 Remove the primitive_check.py dist script
- Closed