Skip to content

Conversation

@nccatoni
Copy link
Collaborator

Motivation

Changes

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • If PR title starts with [<language>], double-check that only <language> is impacted by the change
  • No system-tests internal is modified. Otherwise, I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added (or removed)?

@github-actions
Copy link
Contributor

github-actions bot commented Oct 22, 2025

CODEOWNERS have been resolved as:

migration.py                                                            @DataDog/system-tests-core
tests/test_the_test/manifests/manifests_parser_test/java.yml            @DataDog/system-tests-core
tests/test_the_test/manifests/manifests_parser_test/python.yml          @DataDog/system-tests-core
utils/manifest/__init__.py                                              @DataDog/system-tests-core
utils/manifest/core.py                                                  @DataDog/system-tests-core
utils/manifest/declaration.py                                           @DataDog/system-tests-core
utils/manifest/parser.py                                                @DataDog/system-tests-core
utils/manifest/rule.py                                                  @DataDog/system-tests-core
utils/manifest/schema.json                                              @DataDog/system-tests-core
utils/manifest/validate.py                                              @DataDog/system-tests-core
conftest.py                                                             @DataDog/system-tests-core
format.sh                                                               @DataDog/system-tests-core
manifests/agent.yml                                                     @DataDog/system-tests-core
manifests/cpp.yml                                                       @DataDog/dd-trace-cpp
manifests/cpp_httpd.yml                                                 @DataDog/system-tests-core
manifests/cpp_nginx.yml                                                 @DataDog/system-tests-core
manifests/dd_apm_inject.yml                                             @DataDog/system-tests-core
manifests/dotnet.yml                                                    @DataDog/apm-dotnet @DataDog/asm-dotnet
manifests/golang.yml                                                    @DataDog/dd-trace-go-guild
manifests/java.yml                                                      @DataDog/asm-java @DataDog/apm-java
manifests/k8s_cluster_agent.yml                                         @DataDog/system-tests-core
manifests/nodejs.yml                                                    @DataDog/dd-trace-js
manifests/php.yml                                                       @DataDog/apm-php @DataDog/asm-php
manifests/python.yml                                                    @DataDog/apm-python @DataDog/asm-python
manifests/python_lambda.yml                                             @DataDog/system-tests-core
manifests/python_otel.yml                                               @DataDog/system-tests-core
manifests/ruby.yml                                                      @DataDog/ruby-guild @DataDog/asm-ruby
manifests/rust.yml                                                      @DataDog/apm-rust
tests/test_the_test/manifests/manifests_agent_edit/agent.yml            @DataDog/system-tests-core
tests/test_the_test/manifests/manifests_agent_edit/python.yml           @DataDog/system-tests-core
tests/test_the_test/manifests/manifests_python_edit/agent.yml           @DataDog/system-tests-core
tests/test_the_test/manifests/manifests_python_edit/python.yml          @DataDog/system-tests-core
tests/test_the_test/manifests/manifests_ref/agent.yml                   @DataDog/system-tests-core
tests/test_the_test/manifests/manifests_ref/python.yml                  @DataDog/system-tests-core
tests/test_the_test/test_compute_libraries_and_scenarios.py             @DataDog/system-tests-core
tests/test_the_test/test_manifest.py                                    @DataDog/system-tests-core
utils/_decorators.py                                                    @DataDog/system-tests-core
utils/scripts/compute_libraries_and_scenarios.py                        @DataDog/system-tests-core
manifests/parser/__init__.py                                            @DataDog/system-tests-core
manifests/parser/core.py                                                @DataDog/system-tests-core
manifests/parser/schema.json                                            @DataDog/system-tests-core
tests/test_the_test/test_existing_versions.py                           @DataDog/system-tests-core

@nccatoni nccatoni changed the title Migration script Manifests migration Nov 3, 2025
@nccatoni nccatoni force-pushed the nccatoni/manifest-migration branch from 3addd02 to 84b9daa Compare November 3, 2025 16:17
@nccatoni nccatoni force-pushed the nccatoni/manifest-migration branch from 84b9daa to aab6bb4 Compare November 3, 2025 16:20
@nccatoni nccatoni force-pushed the nccatoni/manifest-migration branch from 7a87ca7 to e3c5f7a Compare November 19, 2025 12:28
@nccatoni nccatoni force-pushed the nccatoni/manifest-migration branch from e3c5f7a to 46e60b9 Compare November 19, 2025 12:31
@nccatoni nccatoni force-pushed the nccatoni/manifest-migration branch from 6647ba8 to 3e9fcbb Compare November 20, 2025 15:57
@@ -1,129 +0,0 @@
import os
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this file has been removed ?

self.parse_declaration()

@staticmethod
def fix_separator(version: str) -> str:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel like we should be more strict with the content of manifest, less complexity, and cleaner data.

Do we have lot of use case to fix ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree but we won't be able to fix the versioning in the libraries themselves and having a different version syntax in the manifests compared to the rest of the lib repo could be confusing

from .types import ManifestData, Condition, SkipDeclaration


def match_condition(
Copy link
Collaborator

Choose a reason for hiding this comment

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

This function should a method of Condition, no ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It could but it is never used outside of match_rule

Comment on lines +57 to +60
path = rule.split("/")
path = [part for part in path if part]
rest = rule.split("::")
rule_elements = [*path[:-1], path[-1].split("::")[0], *rest[1:]]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can be done with rule_elements = Path(rule.replace("::", "/")).parts

pathlib.Path is a great tool to manipulate paths.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

rule_elements = rule.replace("::", "/").split("/") would also work no ?

Comment on lines 67 to 69
if len(rule_elements) > len(nodeid_elements):
return False
return all(elements[0] == elements[1] for elements in zip(rule_elements, nodeid_elements, strict=False))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if len(rule_elements) > len(nodeid_elements):
return False
return all(elements[0] == elements[1] for elements in zip(rule_elements, nodeid_elements, strict=False))
return nodeid_elements[:len(rule_elements)] == rule_elements

force_skip: bool = False,
):
if not inspect.isfunction(item) and not inspect.isclass(item) and not isinstance(item, pytest.Module):
if (
Copy link
Collaborator

Choose a reason for hiding this comment

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

IIUC, this block should be isinstance(item, pytest.Item) only ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

mmmh, no, it's can be called b decorator, so it's the prototype that should be kept to pytest.Item | FunctionType | MethodType

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants