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

Move Docker SSI tests to Gitlab #3445

Open
wants to merge 45 commits into
base: main
Choose a base branch
from

Conversation

randomanderson
Copy link
Contributor

@randomanderson randomanderson commented Nov 12, 2024

Motivation

These tests need to run in Gitlab in order to access non-released versions of the tracer. Those PRs will come later

Changes

With this PR, the docker ssi tests are a child Gitlab pipeline that generated on every commit. If the pipeline was triggered from a schedule, the tests run automatically. Otherwise the tests run manually.

  • Removes the Github workflows and generation logic
  • Updates docker_ssi_matrix_builder.py to generate a Gitlab pipeline
  • Updates the Docker SSI container specs to accept host and port instead of defaulting to localhost
  • Uses a random port (get_free_port()) rather than a hardcoded port for the agent. In Gitlab, there is already an agent running
  • Uses docker commands to determine the correct IPs for containers in Gitlab
  • Updates the Jetty app to not throw exceptions on startup (classpath issues)

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes (if something not related to your task is failing, you can ignore it)
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner. We're working on refining the codeowners file quickly.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed, 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
  • CI is green, or failing jobs are not related to this change (and you are 100% sure about this statement)
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added (or removed)?

@randomanderson randomanderson changed the title Docker ssi gitlab Move Docker SSI tests to Gitlab Nov 18, 2024
@randomanderson randomanderson marked this pull request as ready for review November 18, 2024 21:56
@randomanderson randomanderson requested a review from a team as a code owner November 18, 2024 21:56
Copy link
Collaborator

@robertomonteromiguel robertomonteromiguel left a comment

Choose a reason for hiding this comment

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

Awesome work Laplie!
In the code review only remove the "--ssi-force-build" parameter (and run again to check if the GHCR registry connectivity works)

Running the job I see flakyness on Java. I think there are problems lauching the sdk man to install Java

2024-11-19 10.19.37:* Downloading...
2024-11-19 10.19.37:�[91m
2024-11-19 10.19.37:curl: (22) The requested URL returned er�[0m
2024-11-19 10.19.37:�[91mror: 503 Service Temporarily Unavailabl�[0m
2024-11-19 10.19.37:�[91me
2024-11-19 10.19.37:�[0m
2024-11-19 10.19.37:'curl --fail --location --progress-bar "${SDKMAN_SERVICE}/broker/download/native/install/${SDKMAN_NATIVE_VERSION}/${SDKMAN_PLATFORM}" > "$sdkman_zip_file"': command failed with exit code 22.```

"script": [
"./build.sh -i runner",
"source venv/bin/activate",
'timeout 2700s ./run.sh DOCKER_SSI --ssi-weblog "$weblog" --ssi-library "$TEST_LIBRARY" --ssi-base-image "$base_image" --ssi-arch "$arch" --ssi-installable-runtime "$installable_runtime" --ssi-force-build',
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should remove the --ssi-force-build parameter


def get_free_port():
last_allowed_port = 65535
port = random.randint(1100, 65100)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I very very strongly suggest to not go higher than 32000 : those port can be allocated as ephemeral ports for client connection, and you'll end with port conflict, even if the port is free when you tested it.

It was the main cause of instability of parametric tests.

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