Skip to content

fix: address errors when running make verify for container lifecycle#2058

Open
Jdubrick wants to merge 1 commit into
lightspeed-core:mainfrom
Jdubrick:fix-linter-errors
Open

fix: address errors when running make verify for container lifecycle#2058
Jdubrick wants to merge 1 commit into
lightspeed-core:mainfrom
Jdubrick:fix-linter-errors

Conversation

@Jdubrick

@Jdubrick Jdubrick commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Description

When running make verify there are linter errors for the container lifecycle. This fixes the issue.

tests/integration/container_lifecycle/test_container_lifecycle.py:29: error: Function is missing a return type annotation  [no-untyped-def]
tests/integration/container_lifecycle/test_container_lifecycle.py:55: error: Function is missing a type annotation  [no-untyped-def]
tests/integration/container_lifecycle/test_container_lifecycle.py:103: error: Function is missing atype annotation  [no-untyped-def]
tests/integration/container_lifecycle/test_container_lifecycle.py:124: error: Function is missing atype annotation  [no-untyped-def]
tests/integration/container_lifecycle/test_container_lifecycle.py:155: error: Function is missing atype annotation  [no-untyped-def]
tests/integration/container_lifecycle/test_container_lifecycle.py:190: error: Function is missing atype annotation  [no-untyped-def]
tests/integration/container_lifecycle/test_container_lifecycle.py:215: error: Function is missing atype annotation  [no-untyped-def]
tests/integration/container_lifecycle/test_container_lifecycle.py:244: error: Function is missing areturn type annotation  [no-untyped-def]
tests/integration/container_lifecycle/test_container_lifecycle.py:244: note: Use "-> None" if function does not return a value
tests/integration/container_lifecycle/test_container_lifecycle.py:270: error: Function is missing atype annotation  [no-untyped-def]
tests/integration/container_lifecycle/test_container_lifecycle.py:298: error: Function is missing atype annotation  [no-untyped-def]
tests/integration/container_lifecycle/test_container_lifecycle.py:322: error: Function is missing atype annotation  [no-untyped-def]
tests/integration/container_lifecycle/test_container_lifecycle.py:366: error: Function is missing atype annotation  [no-untyped-def]
tests/integration/container_lifecycle/test_container_lifecycle.py:427: error: Function is missing atype annotation  [no-untyped-def]
tests/integration/container_lifecycle/test_container_lifecycle.py:482: error: Function is missing atype annotation  [no-untyped-def]
tests/integration/container_lifecycle/test_container_lifecycle.py:553: error: Function is missing atype annotation  [no-untyped-def]
tests/unit/conftest.py:30: error: Function is missing a return type annotation  [no-untyped-def]
Found 16 errors in 2 files (checked 237 source files)
make[1]: *** [check-types-tests] Error 1
make: *** [verify] Error 2

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: (e.g., Claude, CodeRabbit, Ollama, etc., N/A if not used)
  • Generated by: (e.g., tool name and version; N/A if not used)

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Summary by CodeRabbit

  • Chores
    • Improved type annotations and signature clarity across integration and unit test fixtures and test methods.
    • Updated test helper and fixture return/argument types for better consistency and readability.
    • No changes to application behavior, test coverage, or runtime logic.

Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 95f255c6-fbcf-4f0c-b54c-6407c7caf6d2

📥 Commits

Reviewing files that changed from the base of the PR and between d4a978d and 8ffe503.

📒 Files selected for processing (2)
  • tests/integration/container_lifecycle/test_container_lifecycle.py
  • tests/unit/conftest.py
📜 Recent review details
⏰ Context from checks skipped due to timeout. (15)
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: integration_tests (3.12)
  • GitHub Check: Pylinter
  • GitHub Check: unit_tests (3.13)
  • GitHub Check: build-pr
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-6-on-pull-request
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E: server mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
⚠️ CI failures not shown inline (4)

GitHub Actions: PR Title Checker / 0_check.txt: fix: address errors when running make verify for container lifecycle

Conclusion: failure

View job details

##[group]Run thehanimo/pr-title-checker@v1.4.3
 with:
   GITHUB_***REDACTED***
   pass_on_octokit_error: false
   configuration_path: .github/pr-title-checker-config.json
 ##[endgroup]
 (node:2188) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
 Using config file .github/pr-title-checker-config.json from repo lightspeed-core/lightspeed-stack [ref: d4a978da65bd8f3ce2740d9854cbcc48e428417e]
 (Use `node --trace-deprecation ...` to show where the warning was created)
 (node:2188) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
 Creating label (title needs formatting)...
 Label (title needs formatting) already created.
 Adding label (title needs formatting) to PR...
 HttpError: Resource not accessible by integration
 ##[error]Failed to add label (title needs formatting) to PR

GitHub Actions: PR Title Checker / check: fix: address errors when running make verify for container lifecycle

Conclusion: failure

View job details

##[group]Run thehanimo/pr-title-checker@v1.4.3
 with:
   GITHUB_***REDACTED***
   pass_on_octokit_error: false
   configuration_path: .github/pr-title-checker-config.json
 ##[endgroup]
 (node:2188) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
 Using config file .github/pr-title-checker-config.json from repo lightspeed-core/lightspeed-stack [ref: d4a978da65bd8f3ce2740d9854cbcc48e428417e]
 (Use `node --trace-deprecation ...` to show where the warning was created)
 (node:2188) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
 Creating label (title needs formatting)...
 Label (title needs formatting) already created.
 Adding label (title needs formatting) to PR...
 HttpError: Resource not accessible by integration
 ##[error]Failed to add label (title needs formatting) to PR

GitHub Actions: OpenAPI (Spectral) / spectral: fix: address errors when running make verify for container lifecycle

Conclusion: failure

View job details

##[group]Run set -euo pipefail
 �[36;1mset -euo pipefail�[0m
 �[36;1muv run python scripts/generate_openapi_schema.py /tmp/openapi-generated.json�[0m
 �[36;1mif ! diff -u docs/openapi.json /tmp/openapi-generated.json; then�[0m
 �[36;1m  echo "::error::docs/openapi.json is out of date. Regenerate with: uv run scripts/generate_openapi_schema.py docs/openapi.json"�[0m

GitHub Actions: OpenAPI (Spectral) / 0_spectral.txt: fix: address errors when running make verify for container lifecycle

Conclusion: failure

View job details

##[group]Run set -euo pipefail
 �[36;1mset -euo pipefail�[0m
 �[36;1muv run python scripts/generate_openapi_schema.py /tmp/openapi-generated.json�[0m
 �[36;1mif ! diff -u docs/openapi.json /tmp/openapi-generated.json; then�[0m
 �[36;1m  echo "::error::docs/openapi.json is out of date. Regenerate with: uv run scripts/generate_openapi_schema.py docs/openapi.json"�[0m
🧰 Additional context used
📓 Path-based instructions (2)
tests/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

tests/**/*.py: Use pytest for all unit and integration tests; do not use unittest
Use pytest.mark.asyncio marker for async tests

Files:

  • tests/unit/conftest.py
  • tests/integration/container_lifecycle/test_container_lifecycle.py
tests/**/conftest.py

📄 CodeRabbit inference engine (AGENTS.md)

Use conftest.py for shared pytest fixtures and pytest-mock for AsyncMock objects

Files:

  • tests/unit/conftest.py
🧠 Learnings (1)
📚 Learning: 2026-06-24T13:45:37.249Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 1971
File: src/utils/markdown_repair.py:31-36
Timestamp: 2026-06-24T13:45:37.249Z
Learning: In the lightspeed-stack repository, docstrings must use the section header name "Parameters:" (not "Args:") for function arguments, even if the project references Google Python docstring conventions. Ensure docstrings follow the project’s established "Parameters:" header format for any documented function parameters.

Applied to files:

  • tests/unit/conftest.py
  • tests/integration/container_lifecycle/test_container_lifecycle.py
🔇 Additional comments (2)
tests/integration/container_lifecycle/test_container_lifecycle.py (1)

11-11: LGTM!

Also applies to: 30-30, 56-56, 104-106, 127-127, 158-158, 193-195, 220-222, 251-251, 277-279, 308-309, 331-331, 375-375, 436-436, 491-491, 562-562

tests/unit/conftest.py (1)

30-30: LGTM!


Walkthrough

Python type annotations were added to fixture and test method signatures in the container lifecycle integration test module (importing Generator, typing container_runtime, managed_container, _get_image_id, and test methods) and to the reset_logging_state fixture in the unit conftest module. No logic changes.

Changes

Test type annotation updates

Layer / File(s) Summary
Fixture and helper annotations
tests/integration/container_lifecycle/test_container_lifecycle.py
Adds Generator import and typed signatures for container_runtime, managed_container, and _get_image_id.
Test method annotations
tests/integration/container_lifecycle/test_container_lifecycle.py
Adds typed parameters and -> None return types across container lifecycle test methods.
Conftest fixture annotation
tests/unit/conftest.py
Adds -> Generator[None, None, None] return type to reset_logging_state fixture.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Suggested reviewers: tisnik, asimurka

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main fix: resolving make verify errors in the container lifecycle tests.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

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.

@Jdubrick

Jdubrick commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

@tisnik when running the linters for unrelated changes this issue kept popping up. I don't have a dedicated issue for it since it's so small, if you want one open just lmk.

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