Skip to content
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

Defined Shims Should Be Declared In POM #10167

Merged
merged 5 commits into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion build/shimplify.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,10 @@ def __generate_symlinks():
path,
build_ver_arr))

def __map_version_array(shim_json_string):
shim_ver = str(json.loads(shim_json_string).get('spark'))
assert shim_ver in __all_shims_arr, "all.buildvers in pom.xml does not contain %s" % shim_ver
return shim_ver

def __traverse_source_tree_of_all_shims(src_type, func):
"""Walks src/<src_type>/sparkXYZ"""
Expand All @@ -390,7 +394,7 @@ def __traverse_source_tree_of_all_shims(src_type, func):
shim_arr = shim_match.group(1).split(os.linesep)
assert len(shim_arr) > 0, "invalid empty shim comment,"\
"orphan shim files should be deleted"
build_ver_arr = map(lambda s: str(json.loads(s).get('spark')), shim_arr)
build_ver_arr = map(__map_version_array, shim_arr)
__log.debug("extracted shims %s", build_ver_arr)
assert build_ver_arr == sorted(build_ver_arr),\
"%s shim list is not properly sorted" % shim_file_path
Expand Down