Skip to content

bug(update): the SLM husk clear lacks the slm-backend tag, so a manual --tags slm-backend run reaches pip without it #19986

Closed

Description

@mrveiss

Problem

PR #19959 adds a husk-clear include before the SLM pip task in autobot-slm-backend/ansible/playbooks/update-all-nodes.yml. The two tasks do not carry the same tags:

Task Tags at PR #19959 head 6fcd83bcf7
[PLAY 1] SLM | Clear venv husks before pip (tags and apply: tags) slm, deps
[PLAY 1] SLM | Install Python dependencies slm, slm-backend, deps

A manual --tags slm-backend run therefore selects pip and skips the husk clear. On a husked venv with changed dependencies, pip stops with the same uninstall failure #19973 fixes. The playbook's header lists slm-backend as a supported selector.

The backend pair matches (backend, deps on both).

Impact

Manual runs only. The builtin updater never selects slm-backend: its execute_playbook calls in autobot-slm-backend/api/code_sync.py pass either no tags or !restart.

Why the test misses it

repo_tests/updater_clears_venv_husks_19973_test.py checks only that the include comes before the first pip install. It does not compare when or tags.

Acceptance criteria

  • The SLM husk-clear include carries every tag of the SLM pip task, on both tags and apply: tags.
  • repo_tests/updater_clears_venv_husks_19973_test.py fails when a pip task's tags are not all on its husk-clear include, for both the SLM and backend venvs.
  • The same test fails when the include's when differs from its pip task's when.
  • A contrast case in the test proves the tag comparison catches the current mismatch.

Refs #19973, PR #19959

Activity

  1. mrveiss commented on Nov 2, 2026

    @mrveiss
    OwnerAuthor

    Landed in the merge train (PR #20594, 655489c4e6) via #20548.

    AC Evidence
    The SLM husk-clear include carries every tag of the SLM pip task, on both tags and apply: tags autobot-slm-backend/ansible/playbooks/update-all-nodes.yml, task "[PLAY 1] SLM | Clear venv husks before pip (#17339)": apply: tags: [slm, slm-backend, deps] and tags: [slm, slm-backend, deps]; the pip task "[PLAY 1] SLM | Install Python dependencies" carries [slm, slm-backend, deps].
    repo_tests/updater_clears_venv_husks_19973_test.py fails when a pip task's tags are not all on its husk-clear include, for both venvs _mismatches compares tags and apply tags (wanted <= ...); test_a_tagged_run_cannot_reach_pip_without_the_repair loops over _MARKER_CAPABLE = ("autobot-slm-backend", "autobot-backend").
    The same test fails when the include's when differs from its pip task's when _mismatches appends "when" if husk.get("when") != pip.get("when"); both SLM tasks use hostvars['localhost']['python_deps_changed'] | bool.
    A contrast case proves the tag comparison catches the current mismatch test_contrast_each_mismatch_is_caught asserts ["tags"] for ["slm", "deps"] (the shape this issue found), ["apply tags"] and ["when"].

    4 of 4 met. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions