From d0177402a04ee86ee29541978b6e389e5787fabb Mon Sep 17 00:00:00 2001 From: Jonah Hopkin Date: Fri, 30 Jan 2026 00:04:12 +1100 Subject: [PATCH 1/6] Fix TypeError raised by displaying data rate --- yakut/VERSION | 2 +- yakut/cmd/monitor/_view.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yakut/VERSION b/yakut/VERSION index 930e300..e867cc2 100644 --- a/yakut/VERSION +++ b/yakut/VERSION @@ -1 +1 @@ -0.14.1 +0.14.2 diff --git a/yakut/cmd/monitor/_view.py b/yakut/cmd/monitor/_view.py index a33b1fc..786b12d 100644 --- a/yakut/cmd/monitor/_view.py +++ b/yakut/cmd/monitor/_view.py @@ -314,9 +314,9 @@ def slice_req_rsp(m: _T) -> tuple[_T, _T]: byte_rates_by_node = byte_rates.sum(axis=1) for ii, node_id in enumerate(online_states): x = node_id if node_id is not None else N_NODES - sty = get_matrix_cell_style(None, None, int(xfer_delta_by_node[x]) > 0) - tbl[row_total + 1, ii + 1] = render_xfer_rate(float(xfer_rates_by_node[x])), sty - tbl[row_total + 2, ii + 1] = render_xfer_rate(float(byte_rates_by_node[x])), sty + sty = get_matrix_cell_style(None, None, int(xfer_delta_by_node[x, 0]) > 0) + tbl[row_total + 1, ii + 1] = render_xfer_rate(float(xfer_rates_by_node[x, 0])), sty + tbl[row_total + 2, ii + 1] = render_xfer_rate(float(byte_rates_by_node[x, 0])), sty # Sum the DS-wise vectors because they are usually faster due to being smaller. sty = get_matrix_cell_style(None, None, int(xfer_delta_by_ds.sum()) > 0) From eada87809bd1da19921bb8022c3047f629b5268d Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Wed, 11 Feb 2026 16:57:05 +0200 Subject: [PATCH 2/6] Fix bare --expect parsing in execute-command --- yakut/main.py | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/yakut/main.py b/yakut/main.py index b32fcbe..1e656e3 100644 --- a/yakut/main.py +++ b/yakut/main.py @@ -226,7 +226,11 @@ def main() -> None: # https://click.palletsprojects.com/en/8.1.x/exceptions/ status: Any = 1 # noinspection PyBroadException try: - status = _click_main.main(prog_name="yakut", standalone_mode=False) + status = _click_main.main( + args=_normalize_click_args(sys.argv[1:]), + prog_name="yakut", + standalone_mode=False, + ) except SystemExit as ex: status = ex.code @@ -256,6 +260,33 @@ def main() -> None: # https://click.palletsprojects.com/en/8.1.x/exceptions/ sys.exit(status) +def _normalize_click_args(args: list[str]) -> list[str]: + """ + Click 8.3 stopped accepting bare options with flag_value when a typed value is configured. + Preserve the documented behavior of ``yakut cmd --expect`` by rewriting it into an explicit empty value. + """ + if "--" in args: + effective_len = args.index("--") + else: + effective_len = len(args) + + cmd_index = next( + (idx for idx, tok in enumerate(args[:effective_len]) if tok in {"cmd", "execute-command"}), + None, + ) + if cmd_index is None: + return args + + out = list(args) + for idx in range(cmd_index + 1, effective_len): + if out[idx] not in {"--expect", "-e"}: + continue + next_arg = out[idx + 1] if idx + 1 < effective_len else None + if next_arg is None or next_arg.startswith("-"): + out[idx] = "--expect=" + return out + + subcommand: Callable[..., Callable[..., Any]] = _click_main.command # type: ignore From 9b2fcca19fb4196e12bef7553be04c66fe515e0d Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Wed, 11 Feb 2026 17:26:48 +0200 Subject: [PATCH 3/6] Harden Windows CI against stale workspace files --- .github/workflows/test-and-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 92996f8..5ec028d 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -22,6 +22,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: true + clean: ${{ runner.os != 'Windows' }} - uses: actions/setup-python@v5 with: @@ -50,7 +51,7 @@ jobs: name: ${{github.job}}-#${{strategy.job-index}}-${{job.status}}-${{join(matrix.*, ',')}} path: "**/*.log" retention-days: 90 - include-hidden-files: true + include-hidden-files: ${{ runner.os != 'Windows' }} release: name: Release From 25e2f02a536e956eb181ba3b83f1c9135fabd17d Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Wed, 11 Feb 2026 17:30:10 +0200 Subject: [PATCH 4/6] Isolate CI checkout in a dedicated subdirectory --- .github/workflows/test-and-release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 5ec028d..dc355d0 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -16,11 +16,15 @@ jobs: include: - { os: win-pcap, py: '3.12' } runs-on: ${{ matrix.os }} + defaults: + run: + working-directory: repo env: FORCE_COLOR: 1 steps: - uses: actions/checkout@v4 with: + path: repo submodules: true clean: ${{ runner.os != 'Windows' }} @@ -49,7 +53,7 @@ jobs: # The matrix is shown for convenience but this is fragile because the values may not be string-convertible. # Shall it break one day, feel free to remove the matrix from here. name: ${{github.job}}-#${{strategy.job-index}}-${{job.status}}-${{join(matrix.*, ',')}} - path: "**/*.log" + path: "repo/**/*.log" retention-days: 90 include-hidden-files: ${{ runner.os != 'Windows' }} From 8b80800a6e5a44087387084b7fe92d7e7c1adadb Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Wed, 11 Feb 2026 17:40:16 +0200 Subject: [PATCH 5/6] Skip win-pcap matrix on pull-request workflows --- .github/workflows/test-and-release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index dc355d0..5488f37 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -5,7 +5,9 @@ jobs: test: name: Test # https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=edited#pull_request - if: (github.event_name == 'push') || github.event.pull_request.head.repo.fork + if: > + ((github.event_name == 'push') || github.event.pull_request.head.repo.fork) && + ((matrix.os != 'win-pcap') || (github.event_name == 'push')) strategy: fail-fast: false matrix: From 48a2cfb6858e2ad8af25558a18b3a06c6359bfbd Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Wed, 11 Feb 2026 17:43:40 +0200 Subject: [PATCH 6/6] Split flaky win-pcap CI into push-only job --- .github/workflows/test-and-release.yml | 43 +++++++++++++++++++++----- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 5488f37..5ad3c27 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -5,18 +5,12 @@ jobs: test: name: Test # https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=edited#pull_request - if: > - ((github.event_name == 'push') || github.event.pull_request.head.repo.fork) && - ((matrix.os != 'win-pcap') || (github.event_name == 'push')) + if: (github.event_name == 'push') || github.event.pull_request.head.repo.fork strategy: fail-fast: false matrix: os: [ ubuntu-latest ] py: [ '3.10', '3.11', '3.12', '3.13' ] - # On Windows, we select the configurations we test manually because we only have a few runners, - # and because the infrastructure is hard to maintain using limited resources. - include: - - { os: win-pcap, py: '3.12' } runs-on: ${{ matrix.os }} defaults: run: @@ -59,13 +53,46 @@ jobs: retention-days: 90 include-hidden-files: ${{ runner.os != 'Windows' }} + test_windows: + name: Test (win-pcap, 3.12) + if: github.event_name == 'push' + runs-on: win-pcap + defaults: + run: + working-directory: repo + env: + FORCE_COLOR: 1 + steps: + - uses: actions/checkout@v4 + with: + path: repo + submodules: true + clean: false + + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + # Only one statement per step to ensure the error codes are not ignored by PowerShell. + - run: python -m pip install --upgrade attrs pip setuptools nox + - run: nox --non-interactive --session test --python 3.12 + - run: nox --non-interactive --session lint + + - uses: actions/upload-artifact@v4 + if: (success() || failure()) + with: + name: ${{github.job}}-${{job.status}}-win-pcap,3.12 + path: "repo/**/*.log" + retention-days: 90 + include-hidden-files: false + release: name: Release runs-on: ubuntu-latest if: > (github.event_name == 'push') && (contains(github.event.head_commit.message, '#release') || contains(github.ref, '/main')) - needs: test + needs: [test, test_windows] steps: - name: Check out uses: actions/checkout@v4