Skip to content

Commit

Permalink
Merge branch 'main' into fix-config-128-bit-traceid-generation
Browse files Browse the repository at this point in the history
  • Loading branch information
frrahat authored Jan 13, 2025
2 parents 851df9b + 0905049 commit 8bbecc0
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 16 deletions.
13 changes: 0 additions & 13 deletions .circleci/config.templ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -404,19 +404,6 @@ jobs:
paths:
- "."

appsec_iast_packages:
<<: *machine_executor
parallelism: 5
steps:
- when:
condition:
matches: { pattern: "main", value: << pipeline.git.branch >> }
steps:
- run_test:
pattern: 'appsec_iast_packages'
snapshot: true
- run: echo "This test is skipped outside of main branch"

appsec_integrations:
<<: *machine_executor
parallelism: 13
Expand Down
26 changes: 26 additions & 0 deletions hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,32 @@ test = [
[[envs.appsec_iast_native.matrix]]
python = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

## ASM appsec_iast_packages

[envs.appsec_iast_packages]
template = "appsec_iast_packages"
dependencies = [
"pytest",
"pytest-cov",
"requests",
"hypothesis",
"requests",
"astunparse",
"flask",
"virtualenv-clone"
]

[envs.appsec_iast_packages.scripts]
test = [
"uname -a",
"pip freeze",
"DD_CIVISIBILITY_ITR_ENABLED=0 DD_IAST_REQUEST_SAMPLING=100 _DD_APPSEC_DEDUPLICATION_ENABLED=false python -m pytest tests/appsec/iast_packages",
]

[[envs.appsec_iast_packages.matrix]]
python = ["3.9", "3.10", "3.11", "3.12"]


## ASM FastAPI

[envs.appsec_threats_fastapi]
Expand Down
6 changes: 6 additions & 0 deletions scripts/gen_gitlab_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class JobSpec:
timeout: t.Optional[int] = None
skip: bool = False
paths: t.Optional[t.Set[str]] = None # ignored
only: t.Optional[t.Set[str]] = None # ignored

def __str__(self) -> str:
lines = []
Expand Down Expand Up @@ -60,6 +61,11 @@ def __str__(self) -> str:
for key, value in env.items():
lines.append(f" {key}: {value}")

if self.only:
lines.append(" only:")
for value in self.only:
lines.append(f" - {value}")

if self.parallelism is not None:
lines.append(f" parallel: {self.parallelism}")

Expand Down
9 changes: 6 additions & 3 deletions tests/appsec/suitespec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ suites:
retry: 2
runner: hatch
appsec_iast_packages:
parallelism: 5
parallelism: 4
paths:
- '@bootstrap'
- '@core'
Expand All @@ -84,8 +84,11 @@ suites:
- '@remoteconfig'
- tests/appsec/iast/*
- tests/appsec/iast_packages/*
runner: riot
snapshot: true
retry: 2
runner: hatch
timeout: 50m
only:
- 'main'
appsec_integrations:
parallelism: 7
paths:
Expand Down

0 comments on commit 8bbecc0

Please sign in to comment.