Skip to content

Comments

ci: move the pygoat test to gitlab and hatch and make it faster#13002

Merged
juanjux merged 31 commits intomainfrom
juanjux/move-pygoat-test-to-gitlab
Apr 2, 2025
Merged

ci: move the pygoat test to gitlab and hatch and make it faster#13002
juanjux merged 31 commits intomainfrom
juanjux/move-pygoat-test-to-gitlab

Conversation

@juanjux
Copy link
Collaborator

@juanjux juanjux commented Apr 1, 2025

Description

  • Moves from riot + CircleCI to hatch + gitlab.
  • Remove the docker stuff.
  • Faster: from 10-12 minutes to 5-7.

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

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2025

CODEOWNERS have been resolved as:

.riot/requirements/363e03d.txt                                          @DataDog/apm-python
.riot/requirements/e768555.txt                                          @DataDog/apm-python
tests/appsec/integrations/pygoat_tests/fixtures/pygoat.xz               @DataDog/asm-python
tests/appsec/integrations/pygoat_tests/fixtures/remake_pygoat_fixture.sh  @DataDog/asm-python
tests/appsec/integrations/pygoat_tests/run_pygoat.sh                    @DataDog/asm-python
.circleci/config.templ.yml                                              @DataDog/python-guild @DataDog/apm-core-python
.gitignore                                                              @DataDog/apm-core-python
docker-compose.yml                                                      @DataDog/apm-core-python
hatch.toml                                                              @DataDog/python-guild
lib-injection/sources/min_compatible_versions.csv                       @DataDog/apm-core-python
min_compatible_versions.csv                                             @DataDog/apm-core-python
riotfile.py                                                             @DataDog/apm-python
tests/appsec/integrations/pygoat_tests/test_pygoat.py                   @DataDog/asm-python
tests/appsec/suitespec.yml                                              @DataDog/asm-python
tests/internal/test_auto.py                                             @DataDog/apm-core-python
.riot/requirements/285d807.txt                                          @DataDog/apm-python

juanjux added 2 commits April 1, 2025 13:06
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 230 ± 2 ms.

The average import time from base is: 230 ± 2 ms.

The import time difference between this PR and base is: -0.2 ± 0.1 ms.

The difference is not statistically significant (z = -1.85).

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 1.742 ms (0.76%)
ddtrace.bootstrap.sitecustomize 1.163 ms (0.51%)
ddtrace.bootstrap.preload 1.163 ms (0.51%)
ddtrace.internal.products 1.163 ms (0.51%)
ddtrace.internal.remoteconfig.client 0.617 ms (0.27%)
ddtrace 0.579 ms (0.25%)

juanjux added 2 commits April 1, 2025 14:41
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
@pr-commenter
Copy link

pr-commenter bot commented Apr 1, 2025

Benchmarks

Benchmark execution time: 2025-04-02 10:24:23

Comparing candidate commit 465d51b in PR branch juanjux/move-pygoat-test-to-gitlab with baseline commit dc10e19 in branch main.

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

juanjux added 2 commits April 1, 2025 16:13
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
@juanjux juanjux self-assigned this Apr 1, 2025
@juanjux juanjux added changelog/no-changelog A changelog entry is not required for this PR. ASM Application Security Monitoring labels Apr 1, 2025
juanjux added 4 commits April 1, 2025 16:27
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
@juanjux juanjux marked this pull request as ready for review April 1, 2025 15:25
@juanjux juanjux requested review from a team as code owners April 1, 2025 15:25
@juanjux juanjux changed the title chore: first pygoat test chore: move the pygoat test to gitlab and hatch and make it faster Apr 1, 2025
juanjux added 2 commits April 1, 2025 17:47
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
@avara1986
Copy link
Member

LGTM! thank you for migrate this appsec test. I love this smart approach without docker, congrats!

juanjux added 11 commits April 2, 2025 09:51
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
@juanjux juanjux requested a review from avara1986 April 2, 2025 09:11
@juanjux juanjux enabled auto-merge (squash) April 2, 2025 09:37
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
@juanjux juanjux merged commit 5b3a8f2 into main Apr 2, 2025
684 checks passed
@juanjux juanjux deleted the juanjux/move-pygoat-test-to-gitlab branch April 2, 2025 10:37
@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2025

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-13002-to-2.21
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5b3a8f23a3af8d96666cff11bfda0d4a573df30a
# Push it to GitHub
git push --set-upstream origin backport-13002-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-13002-to-2.21.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2025

The backport to 3.1 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-3.1 3.1
# Navigate to the new working tree
cd .worktrees/backport-3.1
# Create a new branch
git switch --create backport-13002-to-3.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5b3a8f23a3af8d96666cff11bfda0d4a573df30a
# Push it to GitHub
git push --set-upstream origin backport-13002-to-3.1
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-3.1

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

@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2025

The backport to 3.2 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-3.2 3.2
# Navigate to the new working tree
cd .worktrees/backport-3.2
# Create a new branch
git switch --create backport-13002-to-3.2
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5b3a8f23a3af8d96666cff11bfda0d4a573df30a
# Push it to GitHub
git push --set-upstream origin backport-13002-to-3.2
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-3.2

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

github-actions bot pushed a commit that referenced this pull request Apr 2, 2025
## Description

- Moves from riot + CircleCI to hatch + gitlab.
- Remove the docker stuff.
- Faster: from 10-12 minutes to 5-7.

## 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)

---------

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Alberto Vara <alberto.vara@datadoghq.com>
(cherry picked from commit 5b3a8f2)
juanjux added a commit that referenced this pull request Apr 2, 2025
- Moves from riot + CircleCI to hatch + gitlab.
- Remove the docker stuff.
- Faster: from 10-12 minutes to 5-7.

- [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))

- [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)

---------

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Alberto Vara <alberto.vara@datadoghq.com>
(cherry picked from commit 5b3a8f2)
juanjux added a commit that referenced this pull request Apr 2, 2025
- Moves from riot + CircleCI to hatch + gitlab.
- Remove the docker stuff.
- Faster: from 10-12 minutes to 5-7.

- [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))

- [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)

---------

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Alberto Vara <alberto.vara@datadoghq.com>
(cherry picked from commit 5b3a8f2)
juanjux added a commit that referenced this pull request Apr 2, 2025
- Moves from riot + CircleCI to hatch + gitlab.
- Remove the docker stuff.
- Faster: from 10-12 minutes to 5-7.

- [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))

- [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)

---------

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Alberto Vara <alberto.vara@datadoghq.com>
(cherry picked from commit 5b3a8f2)
juanjux added a commit that referenced this pull request Apr 2, 2025
…port 3.3] (#13019)

Backport 5b3a8f2 from #13002 to 3.3.

## Description

- Moves from riot + CircleCI to hatch + gitlab.
- Remove the docker stuff.
- Faster: from 10-12 minutes to 5-7.

## 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)

Co-authored-by: Juanjo Alvarez Martinez <juanjo.alvarezmartinez@datadoghq.com>
erikayasuda added a commit that referenced this pull request Apr 2, 2025
…port 2.21) (#13029)

Backport #13002

## 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)

---------

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: erikayasuda <153395705+erikayasuda@users.noreply.github.com>
chojomok pushed a commit that referenced this pull request Apr 7, 2025
## Description

- Moves from riot + CircleCI to hatch + gitlab.
- Remove the docker stuff.
- Faster: from 10-12 minutes to 5-7.

## 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)

---------

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Alberto Vara <alberto.vara@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ASM Application Security Monitoring 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