Skip to content

ci(integration-tests): Add workflow for core integration tests. - #2334

Open
quinntaylormitchell wants to merge 42 commits into
y-scope:mainfrom
quinntaylormitchell:integration-tests-gh-workflow
Open

ci(integration-tests): Add workflow for core integration tests.#2334
quinntaylormitchell wants to merge 42 commits into
y-scope:mainfrom
quinntaylormitchell:integration-tests-gh-workflow

Conversation

@quinntaylormitchell

@quinntaylormitchell quinntaylormitchell commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR adds the ubuntu-jammy-integration-tests-core workflow to clp-artifact-build. It downloads the binary tarball artifact, untars the binaries, installs dependencies, then runs smoke tests and core tests with uv run pytest -m 'smoke or core'. The integration test logs are uploaded as an artifact after the run.

The dev docs are updated w.r.t. the changes in clp-artifact-build.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

The ubuntu-jammy-integration-tests-core workflow passes.

Summary by CodeRabbit

  • Tests

    • Added automated core integration test coverage for Ubuntu Jammy builds, running smoke/core tests after successful binary packaging.
    • Integration test logs are uploaded as build artifacts even if tests fail.
  • Chores

    • Changes in the integration-tests area now trigger CLP-relevant build and packaging workflows.
    • Ubuntu Jammy clp bundle now includes additional executables/artifacts: indexer, log-converter, and reducer-server.

@quinntaylormitchell
quinntaylormitchell requested a review from a team as a code owner June 15, 2026 15:12
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The CLP workflow now recognizes integration-test changes, packages additional binaries, and runs Ubuntu Jammy core integration tests after a successful binary build, uploading test logs regardless of test outcome.

Changes

CLP Integration-Test Workflow

Layer / File(s) Summary
Build triggering and binary packaging
.github/workflows/clp-artifact-build.yaml
Integration-test changes now trigger the CLP path filter, and clp.tar includes indexer, log-converter, and reducer-server.
Ubuntu Jammy core integration tests
.github/workflows/clp-artifact-build.yaml
A dependent job downloads the binary artifact, installs required tooling and headers, runs smoke or core tests, and uploads logs on every run.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant CLPArtifact
  participant IntegrationTests
  participant TestLogs
  GitHubActions->>CLPArtifact: Download and untar Ubuntu Jammy binaries
  GitHubActions->>IntegrationTests: Install uv and MariaDB Connector/C headers
  IntegrationTests->>IntegrationTests: Run pytest -m 'smoke or core'
  GitHubActions->>TestLogs: Upload integration-test logs
Loading

Possibly related PRs

  • y-scope/clp#2357: Updates the same workflow’s change-detection logic affecting downstream CLP jobs and artifacts.

Suggested reviewers: kirkrodrigues

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a workflow for core integration tests in CI.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/clp-integration-tests.yaml:
- Line 6: The path-ignore pattern `.github/*` uses a single wildcard which only
matches immediate children of the `.github/` directory and will not match nested
subdirectories like `.github/workflows/`. To ensure consistency with the
recursive matching pattern (`**`) used in lines 7-8 and to properly ignore all
changes under the entire `.github/` directory, update the pattern from
`.github/*` to `.github/**`.
- Around line 29-31: The actions/checkout step in the workflow defaults to
persist-credentials: true, which stores the GitHub token in the git config and
could expose it if untrusted code is executed during the task tests:integration
command. Add persist-credentials: false to the with section of the
actions/checkout action to disable credential persistence, unless subsequent
workflow steps explicitly require authenticated git operations.
- Around line 23-43: The workflow currently lacks an explicit permissions block,
which means it inherits default GitHub Actions permissions that may be broader
than necessary. Add a top-level permissions block after the concurrency block
(if present) to define minimal explicit permissions required for the integration
tests workflow. Set all default permissions to false and only enable specific
permissions that the integration tests genuinely require (such as contents: read
for checking out code). If the integration tests need additional access like
pulling from GitHub Container Registry, add packages: read accordingly. This
follows the principle of least privilege and reduces security risk if the
workflow or its dependencies are compromised.
- Line 24: Add a descriptive `name` field to the `integration-tests` job
definition in the workflow file. After the job ID `integration-tests:`, add a
`name` property with a clear, human-readable description of what the job does.
This improves visibility and readability in the GitHub Actions UI when viewing
workflow runs.
- Around line 37-39: The uv installation action in the install-uv step specifies
the version as "0.8" in shorthand format, but the uv package manager requires
the complete semantic versioning format with the patch version included. Change
the version parameter value from "0.8" to "0.8.0" to match the canonical semver
format that uv uses for official releases.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c447b93e-4b15-4cc2-93bc-6464d321aa04

📥 Commits

Reviewing files that changed from the base of the PR and between 653d2be and 35c0813.

📒 Files selected for processing (1)
  • .github/workflows/clp-integration-tests.yaml

Comment thread .github/workflows/clp-integration-tests.yaml Outdated
Comment thread .github/workflows/clp-integration-tests.yaml Outdated
Comment thread .github/workflows/clp-integration-tests.yaml Outdated
Comment thread .github/workflows/clp-integration-tests.yaml Outdated
Comment thread .github/workflows/clp-integration-tests.yaml Outdated
@quinntaylormitchell
quinntaylormitchell marked this pull request as draft June 15, 2026 15:46
@quinntaylormitchell quinntaylormitchell changed the title ci(integration-tests): Add workflow for integration tests. ci(integration-tests): Add workflow for core integration tests. Jul 21, 2026
@quinntaylormitchell
quinntaylormitchell marked this pull request as ready for review July 21, 2026 16:21
@quinntaylormitchell
quinntaylormitchell requested review from kirkrodrigues and removed request for kirkrodrigues July 21, 2026 16:22

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/clp-artifact-build.yaml:
- Around line 692-694: Update the actions/checkout step in the artifact build
job to set persist-credentials to false alongside the existing recursive
submodules option, leaving the pinned checkout action and other settings
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c4eebba9-eb52-499f-9914-117063b1bdc0

📥 Commits

Reviewing files that changed from the base of the PR and between 35c0813 and 3481d92.

📒 Files selected for processing (1)
  • .github/workflows/clp-artifact-build.yaml

Comment thread .github/workflows/clp-artifact-build.yaml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/clp-artifact-build.yaml (2)

734-769: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not run pull-request-controlled integration tests on the shared self-hosted runner.

This y-scope workflow is triggered by pull_request and has no pull_request_target guard. ubuntu-jammy-integration-tests-core routes through *runner (self-hosted, x64, ubuntu-noble), checks out PR code, unpacks PR-produced binaries, and runs uv run pytest -m 'smoke or core'; a malicious PR can execute arbitrary code on that shared runner. Use an isolated hosted or ephemeral runner for PR runs, or run self-hosted jobs only for trusted pushes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/clp-artifact-build.yaml around lines 734 - 769, Update the
ubuntu-jammy-integration-tests-core job’s runs-on configuration to prevent
pull_request-triggered, PR-controlled integration tests from executing on the
shared self-hosted *runner. Use an isolated hosted or ephemeral runner for PR
runs, or gate the self-hosted path so it runs only for trusted push events;
preserve the existing test steps and environment.

734-734: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Run this integration-test job on the Ubuntu Jammy host it’s meant to validate.

*runner routes y-scope runs to ["self-hosted", "x64", "ubuntu-noble"] and other runs to ubuntu-24.04, so these core integration tests can exercise Jammy-built binaries on a later host OS. Use an explicit Jammy runner (or containerised Jammy host) for this job, or rename it if running Jammy artifacts on Noble/24.04 is intentional.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/clp-artifact-build.yaml at line 734, Update the
integration-test job’s runs-on setting from the shared runner alias to an
explicit Ubuntu Jammy runner or Jammy container host. Ensure this job validates
Jammy-built binaries on Jammy, and only rename or retain the existing
configuration if running them on Noble/24.04 is intentional.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/clp-artifact-build.yaml:
- Around line 734-769: Update the ubuntu-jammy-integration-tests-core job’s
runs-on configuration to prevent pull_request-triggered, PR-controlled
integration tests from executing on the shared self-hosted *runner. Use an
isolated hosted or ephemeral runner for PR runs, or gate the self-hosted path so
it runs only for trusted push events; preserve the existing test steps and
environment.
- Line 734: Update the integration-test job’s runs-on setting from the shared
runner alias to an explicit Ubuntu Jammy runner or Jammy container host. Ensure
this job validates Jammy-built binaries on Jammy, and only rename or retain the
existing configuration if running them on Noble/24.04 is intentional.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7a77e71c-fc0f-42c7-805a-31b75d432379

📥 Commits

Reviewing files that changed from the base of the PR and between 3481d92 and 523ca73.

📒 Files selected for processing (1)
  • .github/workflows/clp-artifact-build.yaml

- "components/core/src/**"
- "components/core/tests/**"
- "components/core/tools/scripts/utils/build-and-run-unit-tests.py"
- "integration-tests/**"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we separate this into its own filter? Otherwise, all core binary jobs will get triggered anytime the integration tests change. I guess you want ubuntu-jammy-binaries to be triggered when the integration-tests change, so perhaps change that job to also be triggered when the new integration-tests filter is set.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed

)}}

ubuntu-jammy-integration-tests-core:
name: "ubuntu-jammy-integration-tests-core"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need the name for anything?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I don't think so; I was following suit from ubuntu-jammy-lint. Should I keep it for consistency or remove it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you can remove it. I think the one for ubuntu-jammy-lint was so that we could make ubuntu-jammy-lint a required workflow (for the PR to be merged); but there were issues with doing that and I guess we never removed the name.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Gotcha, removed it

Comment on lines +731 to +732
# Run if the ancestor jobs were successful/skipped and building clp was successful.
if: "!cancelled() && !failure() && needs.ubuntu-jammy-binaries.result == 'success'"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
# Run if the ancestor jobs were successful/skipped and building clp was successful.
if: "!cancelled() && !failure() && needs.ubuntu-jammy-binaries.result == 'success'"

I don't think this is necessary since needs: "ubuntu-jammy-binaries" implies the same.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed

Comment on lines +741 to +742
submodules: "recursive"
persist-credentials: false

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
submodules: "recursive"
persist-credentials: false
persist-credentials: false
submodules: "recursive"

Nit: Alphbetize

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed

tar xf clp.tar
rm clp.tar

- name: "Install uv"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's use install-uv from yscope-dev-utils instead.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed

CLP_BUILD_DIR: "../${{env.BUILD_DIR}}"
CLP_CORE_BINS_DIR: >-
../${{env.BUILD_DIR}}/${{env.BINARIES_ARTIFACT_NAME_PREFIX}}${{env.OS_NAME}}
HOME: "/tmp"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we add a comment for why this is necessary?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry, I still don't understand why we need to set HOME?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Oops we don't, sorry. That's v old

CLP_CORE_BINS_DIR: >-
../${{env.BUILD_DIR}}/${{env.BINARIES_ARTIFACT_NAME_PREFIX}}${{env.OS_NAME}}
HOME: "/tmp"
run: "uv run pytest -m 'smoke or core'"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need to run the smoke tests for CLP-core?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I had it there to provide an indication that pytest was working correctly, and that any other test failures in that run were due to some problem with how I had set up other aspects of the workflow. But we don't need it though, cause the core tests don't import anything from the CLP code. Will remove.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Gotcha. Yeah, we can add them in the package integration tests PR.


- name: "Upload the core integration test logs"
if: "always()"
uses: "actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f" # v6.0.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use the version used elsewhere in the workflow

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This file uses version ending with 789f once in this workflow (not counting this new usage), and uses version ending with fa02 once as well. Which one should I use?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh whoops, let's keep this and fix the other one in another PR.


1. building (Linux) container images containing CLP-core's dependencies,
2. building CLP-core and running its unit tests, and
2. building CLP-core and running its unit & integration tests, and

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
2. building CLP-core and running its unit & integration tests, and
2. building CLP-core and running its unit & integration tests, and

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

agreed

* `ubuntu-jammy-binaries-image`: Builds an Ubuntu Jammy container image containing CLP-core's
binaries built in the `ubuntu-jammy-binaries` job.
* `ubuntu-jammy-integration-tests-core`: Runs CLP-core's integration tests using the binaries built
in the `ubuntu-jammy-binaries` job. The test logs are uploaded at the end of the test run.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
in the `ubuntu-jammy-binaries` job. The test logs are uploaded at the end of the test run.
in the `ubuntu-jammy-binaries` job, and then uploads the logs from the tests.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

agreed

tar xf clp.tar
rm clp.tar

- uses: "./tools/yscope-dev-utils/exports/github/actions/install-uv"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
- uses: "./tools/yscope-dev-utils/exports/github/actions/install-uv"
- uses: "./tools/yscope-dev-utils/exports/github/actions/install-uv"
with:
version: "0.8"

It seems like all other installations of uv use 0.8.

CLP_BUILD_DIR: "../${{env.BUILD_DIR}}"
CLP_CORE_BINS_DIR: >-
../${{env.BUILD_DIR}}/${{env.BINARIES_ARTIFACT_NAME_PREFIX}}${{env.OS_NAME}}
HOME: "/tmp"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry, I still don't understand why we need to set HOME?

CLP_CORE_BINS_DIR: >-
../${{env.BUILD_DIR}}/${{env.BINARIES_ARTIFACT_NAME_PREFIX}}${{env.OS_NAME}}
HOME: "/tmp"
run: "uv run pytest -m 'smoke or core'"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Gotcha. Yeah, we can add them in the package integration tests PR.

from job_orchestration.scheduler.constants import CompressionJobStatus


@pytest.mark.smoke

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can undo the changes in this file since it's no longer relevant to this PR, right?

core: mark tests that test the CLP core binaries
package: mark tests that use the CLP package
search: mark tests that test search
smoke: mark tests that are smoke tests

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ditto

- name: "Run the integration tests for CLP's core"
working-directory: "integration-tests"
env:
# Tell pytest where the CLP binaries are, and where it should store the test logs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
# Tell pytest where the CLP binaries are, and where it should store the test logs.

I think it's actually better to not have this comment and instead document these environment variables (if we haven't already) in another PR.

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