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

do not build system-probe twice #32884

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
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
4 changes: 1 addition & 3 deletions .gitlab/binary_build/system_probe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
- find "$CI_BUILDS_DIR" ! -path '*DataDog/datadog-agent*' -delete || true # Allow failure, we can't remove parent folders of datadog-agent
script:
- inv check-go-version
- inv -e system-probe.build --strip-object-files
# fail if references to glibc >= 2.18
- objdump -p $CI_PROJECT_DIR/$SYSTEM_PROBE_BINARIES_DIR/system-probe | egrep 'GLIBC_2\.(1[8-9]|[2-9][0-9])' && exit 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to this? We need this safeguard to ensure we don't accidentally start using a newer glibc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically this has never worked, since we have a safeguard on the wrong binary. Happy to spawn another PR to add this safeguard on the actually binary shipped, the one built by omnibus

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The omnibus building of the system-probe binary is a somewhat recent addition. They could mismatch, from a glibc standpoint, if the buildimages differed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will spawn a PR to add this check you are right, better be safe on this front

- inv -e system-probe.build-object-files --strip-object-files
- inv -e system-probe.save-build-outputs $CI_PROJECT_DIR/sysprobe-build-outputs.tar.xz
variables:
KUBERNETES_MEMORY_REQUEST: "6Gi"
Expand Down
10 changes: 1 addition & 9 deletions tasks/system_probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,7 @@ def validate_object_file_metadata(ctx: Context, build_dir: str | Path = "pkg/ebp
print(f"All {total_metadata_files} object files have valid metadata")


@task(aliases=["object-files"])
def build_object_files(
ctx,
major_version='7',
Expand Down Expand Up @@ -1580,15 +1581,6 @@ def build_cws_object_files(
copy_bundled_ebpf_files(ctx, arch=arch)


@task
def object_files(
ctx, kernel_release=None, with_unit_test=False, arch: str = CURRENT_ARCH, ebpf_compiler: str = 'clang'
):
build_object_files(
ctx, kernel_release=kernel_release, with_unit_test=with_unit_test, arch=arch, ebpf_compiler=ebpf_compiler
)


def clean_object_files(ctx, major_version='7', kernel_release=None, debug=False, strip_object_files=False):
run_ninja(
ctx,
Expand Down
Loading