Skip to content

Commit

Permalink
[#25970] build: Fix builds with thirdparty PR artifacts
Browse files Browse the repository at this point in the history
Summary:
This diff fixes builds with thirdparty PR artifacts:
- Dependency checking for LTO changed to use realpath on ldd output (since this emits symlink
  path when using thirdparty PR artifacts)
- GITHUB_TOKEN is now passed on to tests so they can fetch thirdparty PR artifacts needed
- Added comment in generated thirdparty_archives.yml indicating it should not be landed
Jira: DB-15297

Test Plan: Jenkins: compile only

Reviewers: steve.varnau

Reviewed By: steve.varnau

Subscribers: ybase

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D41826
  • Loading branch information
es1024 committed Feb 11, 2025
1 parent ba1a0c4 commit a518646
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/yugabyte/lto.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def add_shared_library_dependencies(self, shared_library_path: str) -> None:
ldd_output_line_match = LDD_OUTPUT_LINE_RE.match(line)
if ldd_output_line_match:
so_name = ldd_output_line_match.group(1)
so_path = ldd_output_line_match.group(2)
so_path = os.path.realpath(ldd_output_line_match.group(2))
if so_path.startswith(self.thirdparty_path + '/'):
static_lib_path = self.convert_to_static_lib(so_path)
if static_lib_path:
Expand Down
1 change: 1 addition & 0 deletions python/yugabyte/run_tests_on_spark.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def wait_for_path_to_exist(target_path: str) -> None:
"GIT_BRANCH",
"GIT_COMMIT",
"GIT_URL",
"GITHUB_TOKEN",
"JAVA_HOME",
"JENKINS_URL",
"JOB_NAME",
Expand Down
9 changes: 7 additions & 2 deletions python/yugabyte/thirdparty_archives_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def update_archive_metadata_file_with_pr(self, thirdparty_pr: int) -> None:
archives.append(release_as_dict)
new_metadata[ARCHIVES_KEY] = archives

self.write_metadata_file(new_metadata)
self.write_metadata_file(new_metadata, warn_no_land=True)
logging.info(
f"Wrote information for {len(artifacts_to_use)} pre-built "
f"yugabyte-db-thirdparty archives to {self.archive_metadata_path}.")
Expand Down Expand Up @@ -364,12 +364,17 @@ def update_archive_metadata_file_for_release(self) -> None:

def write_metadata_file(
self,
new_metadata: ThirdPartyArchivesYAML) -> None:
new_metadata: ThirdPartyArchivesYAML,
warn_no_land: bool = False) -> None:
yaml = common_util.get_ruamel_yaml_instance()
string_stream = StringIO()
yaml.dump(new_metadata, string_stream)
yaml_lines = string_stream.getvalue().split('\n')
new_lines = []
if warn_no_land:
new_lines.append(
'# This file was generated from a thirdparty PR, not a release. DO NOT LAND.')
new_lines.append('')
for line in yaml_lines:
if line.startswith(' -'):
new_lines.append('')
Expand Down

0 comments on commit a518646

Please sign in to comment.