Skip to content

test(server): validate GREMLIN Docker runtime and full stack - #200

Merged
YaoYinYing merged 4 commits into
mainfrom
codex/gremlin-python36-docker-test
Jul 31, 2026
Merged

test(server): validate GREMLIN Docker runtime and full stack#200
YaoYinYing merged 4 commits into
mainfrom
codex/gremlin-python36-docker-test

Conversation

@YaoYinYing

@YaoYinYing YaoYinYing commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • make the GREMLIN label helper compatible with the runner's Python 3.6 runtime
  • add a Docker compatibility test that compiles and imports runner scripts inside the real image
  • add a bounded full-stack test that rebuilds miniUC databases, launches from an isolated environment, reads the generated admin credential, exercises authenticated APIs and web pages, and submits a real GREMLIN job
  • guarantee teardown of containers, network, Redis volume, images, and temporary state
  • add dedicated GitHub Actions jobs, with the full-stack job capped at 10 minutes

Root cause

The GREMLIN runner uses Python 3.6, while gremlin_labels.py used Python 3.7-only features: from __future__ import annotations and str.isascii(). Existing server CI ran only the Python 3.12 non-Docker suite, so runner-runtime regressions were not exercised.

Validation

  • make -C server test — 282 passed
  • make -C server test-docker-compat — passed in the Python 3.6 runner image
  • make -C server test-docker-full-stack — passed, including miniUC validation, API/page checks, GREMLIN task completion, result archive verification, and teardown
  • shell syntax, Python compilation, workflow YAML parsing, and git diff --check passed

Summary by CodeRabbit

  • Bug Fixes

    • Improved validation of numeric label suffixes to accept only standard ASCII digits.
  • Tests

    • Added Docker compatibility testing for runner images and legacy Python environments.
    • Added full-stack smoke testing covering authentication, protected pages, task execution, and result downloads.
    • Expanded validation coverage for non-ASCII numeric characters.
  • Chores

    • Added dedicated commands and automated workflows for Docker compatibility and full-stack test suites.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@YaoYinYing, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 32 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a8a7cf16-72bc-4851-9cef-75b502e4f52d

📥 Commits

Reviewing files that changed from the base of the PR and between 64bac69 and a1b1657.

📒 Files selected for processing (6)
  • .github/workflows/server-test.yml
  • CHANGELOG.md
  • server/tests/full_stack_smoke.py
  • server/tests/run_full_stack_test.sh
  • server/tests/test_full_stack_smoke.py
  • server/tests/test_runner_docker_compat.py
📝 Walkthrough

Walkthrough

The pull request adds Docker compatibility and full-stack test paths. It updates label validation for ASCII digits, adds end-to-end smoke checks, builds isolated Docker test environments, and wires both tests into the Makefile and GitHub Actions.

Changes

Docker testing

Layer / File(s) Summary
Label validation and runner compatibility
server/scripts/gremlin_labels.py, server/tests/test_gremlin_labels.py, server/tests/test_runner_docker_compat.py
Position labels now require ASCII digits. Docker tests compile runner scripts, execute Python 3.6, and verify label handling.
Full-stack smoke checks
server/tests/full_stack_smoke.py
The smoke test checks readiness, authenticates an administrator, submits a FASTA task, waits for completion, and validates result files.
Docker stack orchestration
server/tests/run_full_stack_test.sh
The script creates isolated state, prepares databases and outputs, builds images, starts the stack, validates credentials, runs smoke checks, and cleans up resources.
Test targets and CI jobs
server/Makefile, .github/workflows/server-test.yml
The Makefile adds Docker test targets. GitHub Actions runs compatibility and full-stack tests in separate jobs.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Developer
  participant GitHubActions
  participant DockerStack
  participant FullStackSmoke
  Developer->>GitHubActions: Run Docker compatibility or full-stack job
  GitHubActions->>DockerStack: Verify Docker and build test resources
  DockerStack-->>GitHubActions: Start server stack
  GitHubActions->>FullStackSmoke: Run authenticated smoke checks
  FullStackSmoke->>DockerStack: Submit FASTA task and poll status
  DockerStack-->>FullStackSmoke: Return task results and archive
  FullStackSmoke-->>GitHubActions: Report validation result
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: GREMLIN Docker runtime validation and full-stack testing.
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.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/gremlin-python36-docker-test

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.

@deepsource-io

deepsource-io Bot commented Jul 31, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 96354c3...a1b1657 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Python Jul 31, 2026 10:39a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@YaoYinYing
YaoYinYing marked this pull request as ready for review July 31, 2026 10:11
@codacy-production

codacy-production Bot commented Jul 31, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 medium

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
Complexity 1 medium

View in Codacy

🟢 Metrics 27 complexity · 0 duplication

Metric Results
Complexity 27
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 64bac69ae4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server/tests/run_full_stack_test.sh Outdated
Comment thread .github/workflows/server-test.yml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 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/server-test.yml:
- Around line 84-85: Update the actions/checkout steps in both
DockerRunnerCompatibility and DockerFullStack to set persist-credentials to
false, while preserving their existing repository checkout configuration.
- Around line 75-99: Add an explicit least-privilege permissions block with
contents read access to both DockerRunnerCompatibility and DockerFullStack, at
the workflow or individual job level, without granting write access.

In `@server/tests/full_stack_smoke.py`:
- Around line 44-65: Update _wait_for_task to check response.status_code before
parsing the body, raising an AssertionError immediately for any non-200 response
with clear status and response details. Only parse JSON after confirming a 200
response, then preserve the existing finished and failed task handling while
continuing to poll valid in-progress payloads.

In `@server/tests/test_runner_docker_compat.py`:
- Around line 32-51: Add explicit timeouts to the Docker subprocess calls in the
test, including the build, image removal, and container run operations. Catch
and handle subprocess.TimeoutExpired for the docker build and run paths, while
ensuring the cleanup image-removal call remains bounded even when earlier
operations stall.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3b5147f2-907f-49a8-ad04-8634fbf31d7f

📥 Commits

Reviewing files that changed from the base of the PR and between 96354c3 and 64bac69.

📒 Files selected for processing (7)
  • .github/workflows/server-test.yml
  • server/Makefile
  • server/scripts/gremlin_labels.py
  • server/tests/full_stack_smoke.py
  • server/tests/run_full_stack_test.sh
  • server/tests/test_gremlin_labels.py
  • server/tests/test_runner_docker_compat.py

Comment thread .github/workflows/server-test.yml
Comment thread .github/workflows/server-test.yml
Comment thread server/tests/full_stack_smoke.py
Comment thread server/tests/test_runner_docker_compat.py Outdated
@YaoYinYing
YaoYinYing merged commit c615884 into main Jul 31, 2026
8 of 9 checks passed
@YaoYinYing
YaoYinYing deleted the codex/gremlin-python36-docker-test branch July 31, 2026 10:46
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.

1 participant