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

OnBoarding: Add amazon 2 arm64 #3131

Merged
6 changes: 6 additions & 0 deletions tests/auto_inject/test_auto_inject_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ def test_install_uninstall(self, virtual_machine):
@scenarios.simple_installer_auto_injection
class TestSimpleInstallerAutoInjectManual(base.AutoInjectBaseTest):
@flaky(weblog_variant="test-app-java-buildpack", reason="Docker hub rate limmits")
# We are skipping all the machines. TODO fix this
@bug(
condition=context.weblog_variant == "test-app-python-alpine-libgcc"
and f"os_AlmaLinux_8_arm64" in context.configuration,
reason="APMON-1576",
)
def test_install(self, virtual_machine):
logger.info(f"Launching test_install for : [{virtual_machine.name}]...")
self._test_install(virtual_machine)
Expand Down
24 changes: 23 additions & 1 deletion utils/_context/_scenarios/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,35 +560,43 @@ def all_endtoend_scenarios(test_object):
"SIMPLE_INSTALLER_AUTO_INJECTION",
"Onboarding Container Single Step Instrumentation scenario (minimal test scenario)",
scenario_groups=[ScenarioGroup.ONBOARDING],
github_workflow="libinjection",
)

installer_auto_injection = InstallerAutoInjectionScenario(
"INSTALLER_AUTO_INJECTION", doc="Installer auto injection scenario", scenario_groups=[ScenarioGroup.ONBOARDING]
"INSTALLER_AUTO_INJECTION",
doc="Installer auto injection scenario",
scenario_groups=[ScenarioGroup.ONBOARDING],
github_workflow="libinjection",
)

installer_host_auto_injection_chaos = InstallerAutoInjectionScenario(
"INSTALLER_HOST_AUTO_INJECTION_CHAOS",
doc="Installer auto injection scenario with chaos (deleting installation folders, files)",
scenario_groups=[ScenarioGroup.ONBOARDING],
github_workflow="libinjection",
)

installer_not_supported_auto_injection = InstallerAutoInjectionScenario(
"INSTALLER_NOT_SUPPORTED_AUTO_INJECTION",
"Onboarding host Single Step Instrumentation scenario for not supported languages",
scenario_groups=[ScenarioGroup.ONBOARDING],
github_workflow="libinjection",
)

installer_auto_injection_block_list = InstallerAutoInjectionScenario(
"INSTALLER_AUTO_INJECTION_BLOCK_LIST",
"Onboarding Single Step Instrumentation scenario: Test user defined blocking lists",
scenario_groups=[ScenarioGroup.ONBOARDING],
github_workflow="libinjection",
)

installer_auto_injection_ld_preload = InstallerAutoInjectionScenario(
"INSTALLER_AUTO_INJECTION_LD_PRELOAD",
"Onboarding Host Single Step Instrumentation scenario. Machines with previous ld.so.preload entries",
vm_provision="auto-inject-ld-preload",
scenario_groups=[ScenarioGroup.ONBOARDING],
github_workflow="libinjection",
)

simple_auto_injection_profiling = InstallerAutoInjectionScenario(
Expand All @@ -600,6 +608,7 @@ def all_endtoend_scenarios(test_object):
"DD_INTERNAL_PROFILING_LONG_LIVED_THRESHOLD": "1500",
},
scenario_groups=[ScenarioGroup.ONBOARDING],
github_workflow="libinjection",
)
host_auto_injection_install_script_profiling = InstallerAutoInjectionScenario(
"HOST_AUTO_INJECTION_INSTALL_SCRIPT_PROFILING",
Expand All @@ -608,6 +617,7 @@ def all_endtoend_scenarios(test_object):
agent_env={"DD_PROFILING_ENABLED": "auto"},
app_env={"DD_PROFILING_UPLOAD_PERIOD": "10", "DD_INTERNAL_PROFILING_LONG_LIVED_THRESHOLD": "1500"},
scenario_groups=[ScenarioGroup.ONBOARDING],
github_workflow="libinjection",
)

container_auto_injection_install_script_profiling = InstallerAutoInjectionScenario(
Expand All @@ -617,27 +627,31 @@ def all_endtoend_scenarios(test_object):
agent_env={"DD_PROFILING_ENABLED": "auto"},
app_env={"DD_PROFILING_UPLOAD_PERIOD": "10", "DD_INTERNAL_PROFILING_LONG_LIVED_THRESHOLD": "1500"},
scenario_groups=[ScenarioGroup.ONBOARDING],
github_workflow="libinjection",
)

host_auto_injection_install_script = InstallerAutoInjectionScenario(
"HOST_AUTO_INJECTION_INSTALL_SCRIPT",
"Onboarding Host Single Step Instrumentation scenario using agent auto install script",
vm_provision="host-auto-inject-install-script",
scenario_groups=[ScenarioGroup.ONBOARDING],
github_workflow="libinjection",
)

container_auto_injection_install_script = InstallerAutoInjectionScenario(
"CONTAINER_AUTO_INJECTION_INSTALL_SCRIPT",
"Onboarding Container Single Step Instrumentation scenario using agent auto install script",
vm_provision="container-auto-inject-install-script",
scenario_groups=[ScenarioGroup.ONBOARDING],
github_workflow="libinjection",
)

local_auto_injection_install_script = InstallerAutoInjectionScenario(
"LOCAL_AUTO_INJECTION_INSTALL_SCRIPT",
"Tobe executed locally with krunvm. Installs all the software fron agent installation script, and the replace the apm-library with the uploaded tar file from binaries",
vm_provision="local-auto-inject-install-script",
scenario_groups=[ScenarioGroup.ONBOARDING],
github_workflow="libinjection",
)

##DEPRECATED SCENARIOS: Delete after migration of tracer pipelines + auto_inject pipelines
Expand All @@ -647,11 +661,13 @@ def all_endtoend_scenarios(test_object):
"SIMPLE_HOST_AUTO_INJECTION",
"DEPRECATED: Onboarding Container Single Step Instrumentation scenario (minimal test scenario)",
scenario_groups=[ScenarioGroup.ONBOARDING],
github_workflow="libinjection",
)
simple_container_auto_injection = InstallerAutoInjectionScenario(
"SIMPLE_CONTAINER_AUTO_INJECTION",
"DEPRECATED: Onboarding Container Single Step Instrumentation scenario (minimal test scenario)",
scenario_groups=[ScenarioGroup.ONBOARDING],
github_workflow="libinjection",
)

# Replaced by SIMPLE_AUTO_INJECTION_PROFILING
Expand All @@ -663,6 +679,7 @@ def all_endtoend_scenarios(test_object):
"DD_PROFILING_UPLOAD_PERIOD": "10",
"DD_INTERNAL_PROFILING_LONG_LIVED_THRESHOLD": "1500",
},
github_workflow="libinjection",
scenario_groups=[ScenarioGroup.ONBOARDING],
)
simple_container_auto_injection_profiling = InstallerAutoInjectionScenario(
Expand All @@ -673,32 +690,37 @@ def all_endtoend_scenarios(test_object):
"DD_PROFILING_UPLOAD_PERIOD": "10",
"DD_INTERNAL_PROFILING_LONG_LIVED_THRESHOLD": "1500",
},
github_workflow="libinjection",
scenario_groups=[ScenarioGroup.ONBOARDING],
)

# Replaced by INSTALLER_AUTO_INJECTION
host_auto_injection = InstallerAutoInjectionScenario(
"HOST_AUTO_INJECTION",
doc="DEPRECATED: Installer auto injection scenario",
github_workflow="libinjection",
scenario_groups=[ScenarioGroup.ONBOARDING],
)
container_auto_injection = InstallerAutoInjectionScenario(
"CONTAINER_AUTO_INJECTION",
doc="DEPRECATED: Installer auto injection scenario",
github_workflow="libinjection",
scenario_groups=[ScenarioGroup.ONBOARDING],
)

# Replaced by INSTALLER_AUTO_INJECTION_BLOCK_LIST
host_auto_injection_block_list = InstallerAutoInjectionScenario(
"HOST_AUTO_INJECTION_BLOCK_LIST",
"Onboarding Single Step Instrumentation scenario: Test user defined blocking lists",
github_workflow="libinjection",
scenario_groups=[ScenarioGroup.ONBOARDING],
)

# Replaced by INSTALLER_NOT_SUPPORTED_AUTO_INJECTION
container_not_supported_auto_injection = InstallerAutoInjectionScenario(
"CONTAINER_NOT_SUPPORTED_AUTO_INJECTION",
"Onboarding host Single Step Instrumentation scenario for not supported languages",
github_workflow="libinjection",
scenario_groups=[ScenarioGroup.ONBOARDING],
)

Expand Down
35 changes: 33 additions & 2 deletions utils/_context/_scenarios/auto_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
AmazonLinux2023amd64,
AmazonLinux2DotNet6,
AmazonLinux2amd64,
AmazonLinux2arm64,
Centos7amd64,
OracleLinux92amd64,
OracleLinux92arm64,
Expand Down Expand Up @@ -44,6 +45,7 @@ def __init__(
include_ubuntu_24_arm64=False,
include_ubuntu_18_amd64=False,
include_amazon_linux_2_amd64=False,
include_amazon_linux_2_arm64=False,
include_amazon_linux_2_dotnet_6=False,
include_amazon_linux_2023_amd64=False,
include_amazon_linux_2023_arm64=False,
Expand Down Expand Up @@ -85,6 +87,8 @@ def __init__(
self.required_vms.append(Ubuntu18amd64())
if include_amazon_linux_2_amd64:
self.required_vms.append(AmazonLinux2amd64())
if include_amazon_linux_2_arm64:
self.required_vms.append(AmazonLinux2arm64())
if include_amazon_linux_2_dotnet_6:
self.required_vms.append(AmazonLinux2DotNet6())
if include_amazon_linux_2023_amd64:
Expand Down Expand Up @@ -125,6 +129,8 @@ def configure(self, config):
if config.option.vm_provider:
self.vm_provider_id = config.option.vm_provider
self._library = LibraryVersion(config.option.vm_library, "0.0")
self._datadog_apm_inject_version = "v0.00.00"
self._os_configurations = {}
self._env = config.option.vm_env
self._weblog = config.option.vm_weblog
self._check_test_environment()
Expand Down Expand Up @@ -196,6 +202,15 @@ def fill_context(self):
for vm in self.required_vms:
for key in vm.tested_components:
self._tested_components[key] = vm.tested_components[key].lstrip(" ")
if key.startswith("datadog-apm-inject") and self._tested_components[key]:
self._datadog_apm_inject_version = f"v{self._tested_components[key].lstrip(' ')}"
if key.startswith("datadog-apm-library-") and self._tested_components[key]:
self._library.version = self._tested_components[key].lstrip(" ")

# Extract vm name (os) and arch
# TODO fix os name
self._os_configurations[f"os_{vm.name}"] = vm.name.replace("_amd64", "").replace("_arm64", "")
self._os_configurations[f"arch_{vm.name}"] = vm.os_cpu

def close_targets(self):
if self.is_main_worker:
Expand All @@ -214,6 +229,14 @@ def weblog_variant(self):
def components(self):
return self._tested_components

@property
def dd_apm_inject_version(self):
return self._datadog_apm_inject_version

@property
def configuration(self):
return self._os_configurations

def customize_feature_parity_dashboard(self, result):
for test in result["tests"]:
last_index = test["path"].rfind("::") + 2
Expand All @@ -222,21 +245,29 @@ def customize_feature_parity_dashboard(self, result):

class InstallerAutoInjectionScenario(_VirtualMachineScenario):
def __init__(
self, name, doc, vm_provision="installer-auto-inject", agent_env=None, app_env=None, scenario_groups=None
self,
name,
doc,
vm_provision="installer-auto-inject",
agent_env=None,
app_env=None,
scenario_groups=None,
github_workflow=None,
) -> None:
super().__init__(
name,
vm_provision=vm_provision,
agent_env=agent_env,
app_env=app_env,
doc=doc,
github_workflow=None,
github_workflow=github_workflow,
include_ubuntu_22_amd64=True,
include_ubuntu_22_arm64=True,
include_ubuntu_24_amd64=True,
include_ubuntu_24_arm64=True,
include_ubuntu_18_amd64=True,
include_amazon_linux_2_amd64=True,
include_amazon_linux_2_arm64=True,
include_amazon_linux_2_dotnet_6=True,
include_amazon_linux_2023_amd64=True,
include_amazon_linux_2023_arm64=True,
Expand Down
4 changes: 4 additions & 0 deletions utils/_context/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def components(self):
def parametrized_tests_metadata(self):
return self.scenario.parametrized_tests_metadata

@property
def configuration(self):
return self._get_scenario_property("configuration", {})

def serialize(self):
result = {
"agent": str(self.agent_version),
Expand Down
18 changes: 17 additions & 1 deletion utils/_context/virtual_machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,28 @@ def __init__(self, **kwargs) -> None:
krunvm_config=None,
os_type="linux",
os_distro="rpm",
os_branch="amazon_linux2_amd64",
os_branch="amazon_linux2",
os_cpu="amd64",
**kwargs,
)


class AmazonLinux2arm64(_VirtualMachine):
def __init__(self, **kwargs) -> None:
super().__init__(
"Amazon_Linux_2_arm64",
aws_config=_AWSConfig(ami_id="ami-024e548e5cf8ed98b", ami_instance_type="t4g.small", user="ec2-user"),
vagrant_config=None,
krunvm_config=None,
os_type="linux",
os_distro="rpm",
os_branch="amazon_linux2",
os_cpu="arm64",
default_vm=False,
**kwargs,
)


class AmazonLinux2DotNet6(_VirtualMachine):
def __init__(self, **kwargs) -> None:
super().__init__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ weblog:
name: test-app-dotnet
#ubuntu 22 arm excluded due to "dotnet-runtime-6.0 : Depends: liblttng-ust1 (>= 2.13.0) but it is not installable"
#amazon_linux2_dotnet6 excluded due to https://datadoghq.atlassian.net/browse/AIT-10335
excluded_os_branches: [ubuntu22_amd64, ubuntu22_arm64, ubuntu18_amd64, amazon_linux2_amd64, amazon_linux2_dotnet6, centos_7_amd64, ubuntu24]
excluded_os_branches: [ubuntu22_amd64, ubuntu22_arm64, ubuntu18_amd64, amazon_linux2, amazon_linux2_dotnet6, centos_7_amd64, ubuntu24]
excluded_os_names: [OracleLinux_7_9_amd64]
install:
- os_type: linux
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ lang_variant:

weblog:
name: test-shell-script
excluded_os_branches: [ubuntu22_amd64, ubuntu22_arm64, ubuntu18_amd64, amazon_linux2_amd64, amazon_linux2023_amd64, centos_7_amd64]
excluded_os_branches: [ubuntu22_amd64, ubuntu22_arm64, ubuntu18_amd64, amazon_linux2, amazon_linux2023_amd64, centos_7_amd64]
install:
- os_type: linux
remote-command: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lang_variant:

weblog:
name: test-app-java-alpine-jdk15
excluded_os_branches: [amazon_linux2_dotnet6, amazon_linux2_amd64, ubuntu22_arm64, amazon_linux2023_arm64]
excluded_os_branches: [amazon_linux2_dotnet6, amazon_linux2, ubuntu22_arm64, amazon_linux2023_arm64]
#Alma Linux 8 ARM64 is not stable. It fails when we execute 'gradle build' in the Dockerfile
excluded_os_names: [AlmaLinux_8_arm64]
install:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ lang_variant:

weblog:
name: test-app-java-alpine-jdk21
excluded_os_branches: [amazon_linux2_dotnet6, amazon_linux2_amd64]
excluded_os_branches: [amazon_linux2_dotnet6, amazon_linux2]
#Alma Linux 8 ARM64 is not stable. It fails when we execute 'gradle build' in the Dockerfile
excluded_os_names: [AlmaLinux_8_arm64]
install:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lang_variant:

weblog:
name: test-app-java-alpine-libgcc
excluded_os_branches: [amazon_linux2_dotnet6, amazon_linux2_amd64]
excluded_os_branches: [amazon_linux2_dotnet6, amazon_linux2]
#Alma Linux 8 ARM64 is not stable. It fails when we execute 'gradle build' in the Dockerfile
excluded_os_names: [AlmaLinux_8_arm64]
install:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lang_variant:

weblog:
name: test-app-java-alpine
excluded_os_branches: [amazon_linux2_dotnet6, amazon_linux2_amd64]
excluded_os_branches: [amazon_linux2_dotnet6, amazon_linux2]
#Alma Linux 8 ARM64 is not stable. It fails when we execute 'gradle build' in the Dockerfile
excluded_os_names: [AlmaLinux_8_arm64]
install:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lang_variant:

weblog:
name: test-app-java-buildpack
excluded_os_branches: [amazon_linux2_dotnet6, amazon_linux2_amd64, ubuntu22_arm64, amazon_linux2023_arm64]
excluded_os_branches: [amazon_linux2_dotnet6, amazon_linux2, ubuntu22_arm64, amazon_linux2023_arm64]
#Alma Linux 8 ARM64 is not stable. It fails when we execute 'gradle build' in the Dockerfile
excluded_os_names: [AlmaLinux_8_arm64]
install:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lang_variant:

weblog:
name: test-app-java-container-jdk15
excluded_os_branches: [amazon_linux2_dotnet6, amazon_linux2_amd64]
excluded_os_branches: [amazon_linux2_dotnet6, amazon_linux2]
#Alma Linux 8 ARM64 is not stable. It fails when we execute 'gradle build' in the Dockerfile
excluded_os_names: [AlmaLinux_8_arm64]
install:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lang_variant:

weblog:
name: test-app-java-container
excluded_os_branches: [amazon_linux2_dotnet6, amazon_linux2_amd64]
excluded_os_branches: [amazon_linux2_dotnet6, amazon_linux2]
#Alma Linux 8 ARM64 is not stable. It fails when we execute 'gradle build' in the Dockerfile
excluded_os_names: [AlmaLinux_8_arm64]
install:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ lang_variant:

weblog:
name: test-app-nodejs
excluded_os_branches: [amazon_linux2_dotnet6, ubuntu18_amd64, amazon_linux2_amd64, centos_7_amd64]
#Excluded because we can not run node18 due to gclib version
excluded_os_branches: [amazon_linux2_dotnet6, ubuntu18_amd64, amazon_linux2, centos_7_amd64]
excluded_os_names: [OracleLinux_7_9_amd64]
install:
- os_type: linux
Expand Down
Loading
Loading