Command Palette

Search for a command to run...

Назад к скиллам
скилл № 17632

sippy-update-job-variant

Interactively update variants for a CI job

БесплатноБез исполняемых скриптов
openshiftот openshift★ 36 звёзд на GitHub

Установить sippy-update-job-variant в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Update Job Variant

This command provides an interactive workflow to update variant assignments for CI jobs by modifying the variant registry Go code.

Arguments (all optional)

  • [job-pattern]: Pattern (substring or full job name) that identifies the CI job(s) to update (e.g., -hypershift-, -metal-ipi-, or full job name like periodic-ci-openshift-hypershift-release-4.16-periodics-e2e-aws-ovn)
  • [category]: Variant category to update (e.g., Platform, Architecture, Topology)
  • [value]: New value to set for the variant category

If any arguments are not provided, you will prompt the user interactively.

Workflow

IMPORTANT: Argument Parsing Before starting the workflow, check if the user provided any arguments:

  1. Parse the command invocation to extract any provided arguments
  2. Normalize the job pattern, whether provided as an argument or entered interactively: trim surrounding whitespace, reject a blank result (an empty pattern matches every job), and lowercase it (setters compare against the lowercased job name, so uppercase patterns never match)
  3. If all three arguments (job-pattern, category, value) are provided:
    • Validate the category exists in the snapshot file
    • Skip the corresponding prompting steps
    • Use the provided values directly
  4. If some arguments are missing, prompt only for the missing ones
  5. If no arguments are provided, follow the full interactive workflow below

You will guide the user through the following steps (skipping steps where arguments were provided):

  1. Prompt for a Job Pattern: Ask the user to enter a pattern that identifies the CI job(s) they want to update. This can be either a full job name or a substring. This will be used to add pattern matching logic to the Go code.

    • Example full job name: periodic-ci-openshift-hypershift-release-4.16-periodics-e2e-aws-ovn
    • Example substrings: -hypershift-, -metal-ipi-, -fips-
    • Important: Both full job names and substrings are acceptable. Accept whatever the user provides without asking for clarification, then normalize it as described in Argument Parsing.
    • Advise the user that more specific patterns avoid unintended matches (e.g., -metal-ipi-ovn-ipv6- instead of just -metal-)
  2. Select Variant Category: Extract variant categories programmatically and present as a numbered list:

    • Run: grep -E "^ [A-Z]" pkg/variantregistry/snapshot.yaml | cut -d: -f1 | sed 's/^ //' | sort -u
    • This extracts all unique variant categories from the snapshot file
    • Present the list with numbers (1, 2, 3, etc.) and ask the user to select by number
  3. Select New Value: Based on the chosen category, extract possible values programmatically and present as a numbered list:

    • For most categories, extract values from the snapshot: grep "^ <CategoryName>:" pkg/variantregistry/snapshot.yaml | cut -d: -f2 | sed 's/^ //' | sed 's/"//g' | sort -u
    • Present the unique values as a numbered list and ask the user to select by number
    • For Release-related variants (Release, FromRelease, FromReleaseMajor, FromReleaseMinor, ReleaseMajor, ReleaseMinor), allow free-text input instead of showing a numbered list
  4. Modify the Go Code: Update pkg/variantregistry/ocp.go to add the pattern matching logic:

    • Find the appropriate setter function for the selected variant category (e.g., setPlatform, setArchitecture, setTopology, etc.)
    • Add an entry to the pattern matching logic in that function with the pattern and new value
    • Follow the existing code style and pattern structure (see examples in the file)
    • Pay special attention to pattern ordering! The functions use early return, so the first matching pattern wins.
      • More specific patterns come before more generic patterns
      • Example: In setPlatform, "-rosa" must come before "-aws" because ROSA jobs contain "aws"
      • Example: In setOwner, "-perfscale" must come before "-qe" because perfscale jobs may contain "qe"
    • Before adding the new pattern, analyze existing patterns in the function to determine the correct insertion point
    • Check if the new pattern might overlap with existing patterns and ensure correct precedence
  5. Preview Changes with Test: Run the variant snapshot test to see what will change:

    • Execute:

      status=0
      output="$(go test -v -run TestVariantsSnapshot ./pkg/variantregistry 2>&1)" || status=$?
      if printf '%s\n' "$output" | grep -q "Summary of changes:"; then
          printf '%s\n' "$output" | awk '/Summary of changes:/{show=1} show'
      else
          printf '%s\n' "$output"
      fi
      exit "$status"
      
    • Parse this output to extract the variant category changed, old/new values, affected jobs, and total count

    • Display the summary to the user

  6. Apply Changes: Execute make update-variants to regenerate pkg/variantregistry/snapshot.yaml

  7. Verify Unintended Changes (optional manual step):

    • Sugg
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл sippy-update-job-variant?

Interactively update variants for a CI job

Как установить скилл sippy-update-job-variant?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл sippy-update-job-variant запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить sippy-update-job-variant с