Skip to content

refactor(integration-tests): Describe package operating mode in modes.py and mode.py.#2183

Open
quinntaylormitchell wants to merge 4 commits intoy-scope:mainfrom
quinntaylormitchell:testing-redesign-4
Open

refactor(integration-tests): Describe package operating mode in modes.py and mode.py.#2183
quinntaylormitchell wants to merge 4 commits intoy-scope:mainfrom
quinntaylormitchell:testing-redesign-4

Conversation

@quinntaylormitchell
Copy link
Copy Markdown
Collaborator

@quinntaylormitchell quinntaylormitchell commented Apr 7, 2026

Description

This PR describes package operating modes in <mode_name>/utils/mode.py. The descriptions are given in terms of ClpPackageModeConfig, and use component lists from package_tests/utils/modes.py. The purposes for this PR are mainly organizational, though it also stands as the first step in using the new ClpPackageModeConfig data class.

NOTE: The modes described in tests/package_tests/clp_json/test_clp_json.py and tests/package_tests/clp_text/test_clp_text.py are not removed in this PR, as doing so would require changing fixt_package_test_config to take ClpPackageModeConfig instead of PackageModeConfig. This change will be made in a future PR once #2181, #2182, and this PR are all merged.

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

Tested on development branch; all tests pass.

Summary by CodeRabbit

  • Chores
    • Reorganized integration-test utilities to add standardized operating-mode definitions for CLP variants and explicit component/service orderings to simplify test orchestration.
    • Added service-name mapping utilities for Docker Compose compatibility.
    • Introduced package-level documentation for new utility namespaces and a deprecation note directing to the new utilities for future consolidation.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3c7b4a6b-2fb6-4066-b32d-d586f347a11c

📥 Commits

Reviewing files that changed from the base of the PR and between abecfb2 and 6262988.

📒 Files selected for processing (1)
  • integration-tests/tests/package_tests/utils/modes.py

Walkthrough

Adds CLP mode utility modules and package initializers for clp-json and clp-text in integration tests, introduces shared mode/component name mappings in a new modes module, and adds a deprecation TODO in an older CLP mode utility.

Changes

Cohort / File(s) Summary
CLP-JSON mode utilities
integration-tests/tests/package_tests/clp_json/utils/__init__.py, integration-tests/tests/package_tests/clp_json/utils/mode.py
New package initializer and mode.py adding CLP_JSON_MODE with mode_name="clp-json", StorageEngine.CLP_S, QueryEngine.CLP_S, and an explicit ordered component_list assembled from shared component constants.
CLP-Text mode utilities
integration-tests/tests/package_tests/clp_text/utils/__init__.py, integration-tests/tests/package_tests/clp_text/utils/mode.py
New package initializer and mode.py adding CLP_TEXT_MODE with mode_name="clp-text", StorageEngine.CLP, QueryEngine.CLP, api_server=None, log_ingestor=None, and an ordered component_list assembled from shared component constants.
Shared mode/component mappings
integration-tests/tests/package_tests/utils/__init__.py, integration-tests/tests/package_tests/utils/modes.py
New package initializer and modes.py introducing _to_docker_compose_service_name and exported service-name constants: CLP_BASE_COMPONENTS, CLP_REDUCER_COMPONENT, CLP_QUERY_COMPONENTS, CLP_GARBAGE_COLLECTOR_COMPONENT, CLP_API_SERVER_COMPONENT, CLP_LOG_INGESTOR_COMPONENT.
Deprecation notice
integration-tests/tests/utils/clp_mode_utils.py
Added a file-level TODO noting this module will be phased out in favour of tests/package_tests/utils/modes.py.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: refactoring integration tests to organize package operating mode descriptions into modes.py and mode.py files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Ruff (0.15.9)
integration-tests/tests/package_tests/utils/modes.py

�[1;31mruff failed�[0m
�[1mCause:�[0m Failed to load extended configuration /tools/yscope-dev-utils/exports/lint-configs/python/ruff.toml (/integration-tests/pyproject.toml extends /tools/yscope-dev-utils/exports/lint-configs/python/ruff.toml)
�[1mCause:�[0m Failed to read /tools/yscope-dev-utils/exports/lint-configs/python/ruff.toml
�[1mCause:�[0m No such file or directory (os error 2)


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 and usage tips.

@quinntaylormitchell quinntaylormitchell changed the title refactor(integration-tests): Describe operating mode in modes.py and mode.py. refactor(integration-tests): Describe package operating mode in modes.py and mode.py. Apr 7, 2026
@Bill-hbrhbr Bill-hbrhbr self-requested a review April 7, 2026 17:56
@quinntaylormitchell quinntaylormitchell marked this pull request as ready for review April 7, 2026 18:15
@quinntaylormitchell quinntaylormitchell requested a review from a team as a code owner April 7, 2026 18:15
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@integration-tests/tests/package_tests/utils/modes.py`:
- Around line 54-57: CLP_PRESTO_COMPONENTS currently mixes a transformed
constant and the string literal "presto-worker"; add a short inline comment or
replace the literal with a named constant (e.g., PRESTO_WORKER_SERVICE_NAME)
next to the tuple to document why this service name is hardcoded and not run
through _to_docker_compose_service_name, referencing CLP_PRESTO_COMPONENTS,
_to_docker_compose_service_name and PRESTO_COORDINATOR_COMPONENT_NAME so future
readers know the rationale and avoid accidental drift.
🪄 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: a8a368a5-2f3f-4f03-bea2-9a4ca779aa43

📥 Commits

Reviewing files that changed from the base of the PR and between 2f48844 and f767a12.

📒 Files selected for processing (7)
  • integration-tests/tests/package_tests/clp_json/utils/__init__.py
  • integration-tests/tests/package_tests/clp_json/utils/mode.py
  • integration-tests/tests/package_tests/clp_text/utils/__init__.py
  • integration-tests/tests/package_tests/clp_text/utils/mode.py
  • integration-tests/tests/package_tests/utils/__init__.py
  • integration-tests/tests/package_tests/utils/modes.py
  • integration-tests/tests/utils/clp_mode_utils.py

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@integration-tests/tests/package_tests/utils/modes.py`:
- Around line 24-32: Docstring for _to_docker_compose_service_name is missing a
description for the :param name: entry; update the docstring of function
_to_docker_compose_service_name to include a short description like "component
name to convert" (or equivalent) on the :param name: line so the parameter is
documented, keeping the rest of the docstring (return description) intact.
- Around line 21-22: The module defines an unused logger variable (logger =
logging.getLogger(__name__)) in
integration-tests/tests/package_tests/utils/modes.py; either delete that unused
definition to remove dead code or keep it but add a clarifying comment (e.g.,
"kept for future debugging") next to the logger so its presence is
intentional—update the symbol "logger" in this module accordingly.
🪄 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: 77b1a558-6881-4bf5-aa63-d34aa01f7f14

📥 Commits

Reviewing files that changed from the base of the PR and between f767a12 and abecfb2.

📒 Files selected for processing (1)
  • integration-tests/tests/package_tests/utils/modes.py

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