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

chore(iast): fix wheel build error on macOS #12536

Merged
merged 8 commits into from
Feb 27, 2025

Conversation

avara1986
Copy link
Member

@avara1986 avara1986 commented Feb 27, 2025

With this PR, all macOS wheels should include the IAST .so file. If not, it will trigger an error in the CI

  • Fix IAST C++ code to support macOS 10.13 or later
  • Enable smoke tests for all macOS builds in build_python_3.yml
  • Remove the "optional" flag for the IAST build in setup.py to ensure a fast failure if any issues arise

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

Copy link
Contributor

github-actions bot commented Feb 27, 2025

CODEOWNERS have been resolved as:

ddtrace/appsec/_iast/_taint_tracking/Aspects/Helpers.cpp                @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/Aspects/Helpers.h                  @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/TaintTracking/TaintRange.cpp       @DataDog/asm-python
setup.py                                                                @DataDog/python-guild
tests/smoke_test.py                                                     @DataDog/apm-core-python

@avara1986 avara1986 added changelog/no-changelog A changelog entry is not required for this PR. ASM Application Security Monitoring backport 2.19 backport 2.20 backport 3.0 backport 2.21 backport 3.1 labels Feb 27, 2025
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Feb 27, 2025

Datadog Report

Branch report: avara1986/i-35591-iast_on_macos
Commit report: b2438be
Test service: dd-trace-py

✅ 0 Failed, 43 Passed, 290 Skipped, 52.31s Total duration (5m 53.44s time saved)

@pr-commenter
Copy link

pr-commenter bot commented Feb 27, 2025

Benchmarks

Benchmark execution time: 2025-02-27 10:56:57

Comparing candidate commit b2438be in PR branch avara1986/i-35591-iast_on_macos with baseline commit 2aa4ffb in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 418 metrics, 2 unstable metrics.

@avara1986 avara1986 requested a review from juanjux February 27, 2025 10:16
@avara1986 avara1986 changed the title chore(iast): iast wheel error on macos chore(iast): building wheel raises an error in macos Feb 27, 2025
@avara1986 avara1986 changed the title chore(iast): building wheel raises an error in macos chore(iast): fix wheel build error on macOS Feb 27, 2025
@avara1986 avara1986 marked this pull request as ready for review February 27, 2025 10:49
@avara1986 avara1986 requested review from a team as code owners February 27, 2025 10:49
@avara1986 avara1986 merged commit 2ef9f1e into main Feb 27, 2025
868 of 869 checks passed
@avara1986 avara1986 deleted the avara1986/i-35591-iast_on_macos branch February 27, 2025 12:45
Copy link
Contributor

The backport to 2.19 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.19 2.19
# Navigate to the new working tree
cd .worktrees/backport-2.19
# Create a new branch
git switch --create backport-12536-to-2.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2ef9f1ed81db0f1d8d37758976aa892bac131ef3
# Push it to GitHub
git push --set-upstream origin backport-12536-to-2.19
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.19

Then, create a pull request where the base branch is 2.19 and the compare/head branch is backport-12536-to-2.19.

Copy link
Contributor

The backport to 2.20 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.20 2.20
# Navigate to the new working tree
cd .worktrees/backport-2.20
# Create a new branch
git switch --create backport-12536-to-2.20
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2ef9f1ed81db0f1d8d37758976aa892bac131ef3
# Push it to GitHub
git push --set-upstream origin backport-12536-to-2.20
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.20

Then, create a pull request where the base branch is 2.20 and the compare/head branch is backport-12536-to-2.20.

github-actions bot pushed a commit that referenced this pull request Feb 27, 2025
With this PR, all macOS wheels should include the IAST `.so` file. If
not, it will trigger an error **in the CI**
- Fix IAST C++ code to support macOS 10.13 or later
- Enable smoke tests for all macOS builds in `build_python_3.yml`
- Remove the "optional" flag for the IAST build in `setup.py` to ensure
a fast failure if any issues arise

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

(cherry picked from commit 2ef9f1e)
Copy link
Contributor

The backport to 2.21 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.21 2.21
# Navigate to the new working tree
cd .worktrees/backport-2.21
# Create a new branch
git switch --create backport-12536-to-2.21
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2ef9f1ed81db0f1d8d37758976aa892bac131ef3
# Push it to GitHub
git push --set-upstream origin backport-12536-to-2.21
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.21

Then, create a pull request where the base branch is 2.21 and the compare/head branch is backport-12536-to-2.21.

github-actions bot pushed a commit that referenced this pull request Feb 27, 2025
With this PR, all macOS wheels should include the IAST `.so` file. If
not, it will trigger an error **in the CI**
- Fix IAST C++ code to support macOS 10.13 or later
- Enable smoke tests for all macOS builds in `build_python_3.yml`
- Remove the "optional" flag for the IAST build in `setup.py` to ensure
a fast failure if any issues arise

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

(cherry picked from commit 2ef9f1e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASM Application Security Monitoring backport 2.19 backport 2.20 backport 2.21 backport 3.0 backport 3.1 changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants