Skip to content

DTEST-3 Extract build mode from relocatable packages for proper timeout configuration#705

Merged
fruch merged 1 commit intomasterfrom
copilot/add-build-mode-support
Jan 18, 2026
Merged

DTEST-3 Extract build mode from relocatable packages for proper timeout configuration#705
fruch merged 1 commit intomasterfrom
copilot/add-build-mode-support

Conversation

Copy link
Contributor

Copilot AI commented Dec 24, 2025

Plan to add build mode support for relocatable packages

  • Investigate current code and understand the issue
  • Modify ScyllaCluster.init to extract build_mode from relocatable packages
  • Modify ScyllaCluster to set timeouts after mode is extracted
  • Add tests to verify build mode extraction for relocatable packages
  • Run tests to ensure changes work correctly
  • Address code review feedback - use tmp_path fixture
  • Address code review feedback - use parametrize for test cases
  • Request code review

Summary of Changes

Problem: Relocatable packages had scylla_mode hardcoded to None, which prevented proper support for different build types (debug/dev/release).

Solution:

  1. Modified ScyllaCluster.__init__ (ccmlib/scylla_cluster.py):

    • When both install_dir and cassandra_version are provided (e.g., when loading a cluster from disk), the build mode is now extracted from the install directory using scylla_extract_install_dir_and_mode()
    • The existing mode extraction logic was already present in load_from_repository(), but wasn't being used when loading from disk
  2. Fixed timeout calculation:

    • Moved __set_default_timeouts() call to after Cluster.__init__() to ensure scylla_mode is properly set before calculating timeouts
    • Debug builds now correctly get longer timeouts (600s/900s) instead of shorter ones (120s/420s)
  3. Added comprehensive tests (tests/test_build_mode_extraction.py):

    • Verify build mode extraction for debug, dev, and release modes
    • Verify correct timeout values for each build mode
    • All existing tests still pass
    • Updated to use tmp_path pytest fixture per code review
    • Updated to use @pytest.mark.parametrize for better test isolation

Impact: Relocatable packages now properly support different build modes (debug/dev/release), with appropriate timeout values for each mode.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add support for different build modes when using relocatable packages</issue_title>
<issue_description>Relocatable package has build_mode='reloc' hardcoded, we should fix it to support the real types (dev/debug/release), once we'll have those types of packages</issue_description>

<agent_instructions>Check if this is still the case, and suggest a fix and wait</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add support for different build modes in relocatable packages Extract build mode from relocatable packages for proper timeout configuration Dec 24, 2025
Copilot AI requested a review from fruch December 24, 2025 20:53
Copilot AI requested a review from fruch December 25, 2025 15:54
@fruch fruch force-pushed the copilot/add-build-mode-support branch from 3d35f1b to 55ee2d9 Compare December 29, 2025 19:03
@fruch fruch marked this pull request as ready for review December 29, 2025 19:03
@fruch fruch force-pushed the copilot/add-build-mode-support branch from 55ee2d9 to c265b1d Compare December 29, 2025 19:06
@dani-tweig dani-tweig changed the title Extract build mode from relocatable packages for proper timeout configuration DTEST-3 Extract build mode from relocatable packages for proper timeout configuration Jan 18, 2026
- Modified ScyllaCluster.__init__ to extract build mode from install_dir when both install_dir and cassandra_version are provided
- Moved __set_default_timeouts() call after parent init to ensure scylla_mode is properly set
- Added comprehensive tests for build mode extraction with different modes (debug, dev, release)
- All existing tests pass

Co-authored-by: fruch <340979+fruch@users.noreply.github.com>
@fruch fruch force-pushed the copilot/add-build-mode-support branch from c265b1d to ba252ab Compare January 18, 2026 09:08
Copy link
Contributor

@fruch fruch left a comment

Choose a reason for hiding this comment

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

LGTM

@fruch fruch merged commit d283ed4 into master Jan 18, 2026
9 checks passed
@fruch fruch deleted the copilot/add-build-mode-support branch February 12, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for different build modes when using relocatable packages

2 participants