Skip to content

Conversation

@lloeki
Copy link
Member

@lloeki lloeki commented Dec 5, 2025

Motivation

This is a mitigation for crossing the 1h timeout.

These versions should be extracted to single container cases, while multicontainer should test an actually interesting multicontainer.

Changes

We keep the min and max, but comment out bits and keep dead Dockerfiles for them to be moved sooner rather than later. EDIT: Removed those as well as commenting out is not an option because JSON.

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 Dec 5, 2025

CODEOWNERS have been resolved as:

utils/build/virtual_machine/weblogs/ruby/provision_test-app-ruby-multialpine.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/provision_test-app-ruby-multicontainer.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/docker-compose.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/nginx.conf  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/docker-compose.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/nginx.conf  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_2_7-alpine  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_0-alpine  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_1-alpine  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_2-alpine  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_3-alpine  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_2_7  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_3_0  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_3_1  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_3_2  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_3_3  @DataDog/system-tests-core

@lloeki lloeki force-pushed the lloeki/scale-down-ruby-multi-container branch from 9ea4ee7 to b7ba1a6 Compare December 8, 2025 15:03
@lloeki
Copy link
Member Author

lloeki commented Dec 8, 2025

Failed with:

_______________ TestSimpleInstallerAutoInjectManual.test_install _______________
self = <tests.auto_inject.test_auto_inject_install.TestSimpleInstallerAutoInjectManual object at 0x795cf5f88710>
    @irrelevant(context.library < "[email protected]", reason="Avoid blocking 2.21 release pipeline")
    @irrelevant(
        context.library > "[email protected]" and context.installed_language_runtime < "3.9.0",
        reason="python 3.8 is not supported on ddtrace >= 3.x",
    )
    def test_install(self):
        virtual_machine = context.virtual_machine
        logger.info(
>           f"Launching test_install for : [{virtual_machine.name}] [{virtual_machine.get_deployed_weblog().runtime_version}]..."
        )
tests/auto_inject/test_auto_inject_install.py:238: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
utils/virtual_machine/virtual_machines.py:114: in get_deployed_weblog
    self._deployed_weblog = self._vm_provision.get_deployed_weblog()
utils/virtual_machine/virtual_machine_provisioner.py:293: in get_deployed_weblog
    apps_json = nginx_parser(self.weblog_installation.nginx_config)
utils/virtual_machine/utils.py:49: in nginx_parser
    json_object = json.loads(return_args[1].replace("'", '"'))
/usr/local/lib/python3.12/json/__init__.py:346: in loads
    return _default_decoder.decode(s)
/usr/local/lib/python3.12/json/decoder.py:338: in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <json.decoder.JSONDecoder object at 0x795d4b6f2000>
s = '{\n                "app_type":"multicontainer",\n                "apps":[{\n                    "runtime":"3.4",\n   ...      "type":"container",\n                    "url":"/ruby_2_6/"\n                }\n\n                ]\n          }'
idx = 0
    def raw_decode(self, s, idx=0):
        """Decode a JSON document from ``s`` (a ``str`` beginning with
        a JSON document) and return a 2-tuple of the Python
        representation and the index in ``s`` where the document ended.
    
        This can be used to decode a JSON document from a string that may
        have extraneous data at the end.
    
        """
        try:
>           obj, end = self.scan_once(s, idx)
E           json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 8 column 13 (char 221)
/usr/local/lib/python3.12/json/decoder.py:354: JSONDecodeError

This is absurdly unclear, but that is apparently caused by the nginx reply contents that I commented out, but one can't comment in there.

Note, when attempting to reproduce "locally" (i.e drive the VM creation locally), it stops earlier and I get this instead:

 +  pulumi:pulumi:Stack system-tests-vms-system-tests_onboarding **creating failed (152s)** 2 errors; 2 warnings
Diagnostics:
  pulumi:pulumi:Stack (system-tests-vms-system-tests_onboarding):
    warning: using pulumi-resource-aws from $PATH at /etc/profiles/per-user/loic.nageleisen/bin/pulumi-resource-aws
    warning: using pulumi-resource-aws from $PATH at /etc/profiles/per-user/loic.nageleisen/bin/pulumi-resource-aws
    error: python inline source runtime error: maximum recursion depth exceeded

@lloeki lloeki force-pushed the lloeki/scale-down-ruby-multi-container branch from b7ba1a6 to 1764b84 Compare December 8, 2025 15:07
healthcheck:
test: "curl -f http://localhost:8080"

ruby_3_4:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is where the problem lies. In the nginx configuration, we are maintaining version 3.4.

Copy link
Member Author

Choose a reason for hiding this comment

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

Damn, I swear I looked at that diff a dozen times over before pushing.

Copy link
Member Author

Choose a reason for hiding this comment

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

There was another one, missing a } in nginx.conf:

        location /ruby_3_4/ {
            proxy_pass         http://ruby_3_4_app/;
            proxy_redirect     off;

        location /ruby_2_6/ {
            proxy_pass         http://ruby_2_6_app/;
            proxy_redirect     off;
        }

@lloeki lloeki force-pushed the lloeki/scale-down-ruby-multi-container branch 2 times, most recently from 1efe899 to fb8730f Compare December 9, 2025 12:27
This is a mitigation for crossing the 1h timeout.

These versions should be extracted to single container cases, while
multicontainer should test an actually interesting multicontainer.

Meanwhile, we keep the min and max.
@lloeki lloeki force-pushed the lloeki/scale-down-ruby-multi-container branch from fb8730f to 79df244 Compare December 9, 2025 12:34
@lloeki lloeki marked this pull request as ready for review December 9, 2025 14:30
@lloeki lloeki requested a review from a team as a code owner December 9, 2025 14:30
@lloeki lloeki merged commit 18cd2ba into main Dec 9, 2025
673 checks passed
@lloeki lloeki deleted the lloeki/scale-down-ruby-multi-container branch December 9, 2025 14:32
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