1
0
mirror of https://github.com/quay/quay.git synced 2026-10-23 09:49:06 +03:00

8 Commits

Author SHA1 Message Date
Chai-bot
63d378c39f NO-ISSUE: fix(ci): accept mirror-registry backport titles (#7596)
* NO-ISSUE: fix(ci): accept mirror-registry backport titles

Allow mirror-registry release branches to use the same CI title format as redhat backports.

* NO-ISSUE: fix(ci): support mirror-registry backport labels

Document the Mirror Registry title prefix and apply backport labels to its release branches.

* NO-ISSUE: fix(ci): provision mirror-registry labels

Create missing Mirror Registry backport labels before applying them to pull requests.

* NO-ISSUE: fix(ci): recover concurrent label creation

Read Octokit response diagnostics before recovering a concurrent label creation race.
2026-10-08 16:47:27 +00:00
jbpratt
621c482a2c NO-ISSUE: docs(agents): add backport process checklist (#7371)
* NO-ISSUE: docs(agents): add backport process checklist

Checklist for carrying merged master changes to redhat-* branches,
written from the #7196 backport chain and its five predecessors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* NO-ISSUE: docs(workflow): correct the Target Version and backport command rules

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* NO-ISSUE: docs(agents): fire ticketed backport hops with /jira backport

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* NO-ISSUE: docs(agents): address review on the backport checklist

Fix the merge-commit path scan in the predecessor survey, clarify that
a .0 fixVersion means master (not a backport target) in both docs, and
note the /jira refresh step after opening a hand-port PR.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* NO-ISSUE: docs(agents): mark redhat-3.15 and redhat-3.16 as maintenance support

Red Hat product life cycle API (2026-09-25) puts redhat-3.17/3.18 in
Full Support and redhat-3.15/3.16 in Maintenance Support, which takes
only Critical/Important security fixes and urgent or selected
high-priority bugs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 12:57:59 +00:00
jbpratt
95c36c7127 NO-ISSUE: docs(workflow): correct the master-synced/release branches (#7267)
* NO-ISSUE: docs(workflow): correct the master-synced and maintained release branches

redhat-3.19 is now the master-synced branch (0/0 rev-list diff), not
redhat-3.18 as previously documented — redhat-3.18 is a normal release
branch and takes cherry-picks. The maintained set has also shifted:
redhat-3.15 through redhat-3.18 take regular backports, with
redhat-3.9/3.10/3.12/3.13/3.14 on critical-fixes-only and redhat-3.11
dormant. The section now records the verification commands (branch
sync check, recent-activity check) so it can be re-checked as the
release cadence moves forward instead of drifting stale again.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* NO-ISSUE: docs(workflow): reconcile the Target Version rule with the master-synced branch exception

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 08:12:31 +00:00
fullsend-ai-coder[bot]
0ad754208d NO-ISSUE: docs(agents): document coderabbit master-only review scope (#6908)
This is the third time the retro/triage pipeline has surfaced a
proposal to add base_branches (master, redhat-*) to .coderabbit.yaml
so CodeRabbit reviews backport PRs on release branches: first via
issue #6597 (from PR #6596, silently closed), then via issue #6893
(from PR #6861) -> PR #6894, closed by maintainer @jbpratt with the
explicit rationale that backport branches carry code already
reviewed on master, so re-reviewing them there is unnecessary noise.

That rationale previously lived only in a closed-PR comment, so
future retro/triage agents reasoning from PR history (e.g. a backport
PR merging with zero CodeRabbit comments) have no documented signal
to avoid re-filing the same proposal. This adds the rationale to the
two locations triage identified as missing it:

- AGENTS.md's CodeRabbit subsection, which previously covered only
  resolving inline comments, now also states the master-only scope
  and links back to #6597, #6893, and PR #6894.
- agent_docs/workflow.md's Release Branch Model section, next to the
  existing backport/cherry-pick documentation.

No code behavior changes; this is a documentation-only change to
agent-facing docs, so no unit tests, lint target, or Playwright
coverage apply per AGENTS.md's testing conventions.

Both edited files (AGENTS.md, agent_docs/workflow.md) are on the
org-member-restricted file list, so this PR requires a human
maintainer to review and approve, per the triage comment on #6907.

Closes #6907

Co-authored-by: fullsend-code <278716306+fullsend-ai-coder[bot]@users.noreply.github.com>
2026-08-25 09:19:05 -05:00
quay-devel
aa8252f22d NO-ISSUE: chore(web): remove Cypress and all associated infrastructure (#6085)
* web: remove Cypress and all associated infrastructure

The Cypress-to-Playwright migration is complete — all .cy.ts test files
were already removed. This cleans up the remaining Cypress infrastructure:

- Delete web/cypress/ directory (fixtures, support files, config)
- Delete web/cypress.config.ts
- Delete .github/workflows/web-ci-results.yaml (Cypress result publisher)
- Remove cypress and cypress-ctrf-json-reporter from package.json
- Remove CYPRESS_INSTALL_BINARY=0 from both Dockerfiles
- Remove Cypress CI job steps from web-ci.yaml, rename job to Integration Tests
- Remove no-new-cypress-tests pre-commit hook
- Remove Cypress entries from .gitignore, .dockerignore, tsconfig types,
  vitest exclude, artifacts.lock.yaml, and pre-commit exclude patterns
- Relocate CI seed data from web/cypress/test/ to web/test-data/
- Update all documentation references (AGENTS.md, README.md,
  CONTRIBUTING.md, agent_docs/testing.md, agent_docs/workflow.md)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* web: add pretty-bytes as direct dependency

pretty-bytes was used in 3 source files but only available as a transitive
dependency through cypress. Now that cypress is removed, add it explicitly
to prevent build failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* web: remove integration job, seed data, and seed scripts per review

Drop the entire integration job from web-ci.yaml (Python integration
tests were bundled with the old Cypress job and not run elsewhere),
remove web/test-data/ and the quay:dump/seed scripts that populated it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* web: fix trailing whitespace in README.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* konflux: refresh rpm lockfiles (NO-ISSUE)

Update rpms.lock.yaml to pick up current UBI 9 package versions.
The previous lock file referenced systemd-libs 252-55.el9_7.8 which
is no longer available in the UBI repos, causing Konflux hermetic
build failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* konflux: revert rpm lockfile changes (NO-ISSUE)

Drop the rpms.lock.yaml regeneration — the Konflux hermetic build
failure is a pre-existing infrastructure issue (base image version
mismatch) not caused by this PR.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-02 09:54:35 -05:00
quay-devel
6ff74733b3 PROJQUAY-11475: chore(web): migrate frontend package manager from npm to pnpm (#5906)
* web: migrate frontend package manager from npm to pnpm (PROJQUAY-11475)

Switch the web/ React frontend from npm to pnpm for faster installs,
stricter dependency resolution, and better disk efficiency.

Key changes:
- Add pnpm-lock.yaml and packageManager field to web/package.json
- Update Dockerfile build-ui stage to use pnpm
- Update all GitHub Actions workflows to use pnpm/action-setup
- Update setup-quay composite action for pnpm
- Configure node-linker=hoisted in .npmrc for webpack compatibility
- Exclude pnpm-lock.yaml from ESLint in pre-commit config
- Keep package-lock.json and npm in Dockerfile.downstream for Cachi2
  hermetic build compatibility (Cachi2 does not support pnpm)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* web: add CI lockfile sync check for npm/pnpm drift (PROJQUAY-11475)

Ensures package-lock.json stays consistent with package.json by
running npm install --package-lock-only in CI and failing on diff.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* web: add explicit Cypress binary install step in CI (PROJQUAY-11475)

pnpm install with node-linker=hoisted does not always trigger
Cypress's postinstall binary download. Add an explicit npx cypress
install step before running the Cypress tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* web: restore legacy-peer-deps in .npmrc for npm compatibility (PROJQUAY-11475)

The build-tools/Dockerfile used by the Konflux quayio-frontend
pipeline runs npm ci, which needs legacy-peer-deps=true to avoid
peer dependency conflicts. Both npm and pnpm read .npmrc and
silently ignore settings they don't recognize, so all three
settings coexist safely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* web: remove packageManager field for npm compatibility (PROJQUAY-11475)

The packageManager field causes corepack to block npm ci in build
environments where corepack is enabled (e.g. UBI9 Node.js 22 images).
Since pnpm version is specified explicitly via pnpm/action-setup in
CI workflows, this field is not needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* web: use npm ci dry-run for lockfile validation (PROJQUAY-11475)

npm install --package-lock-only resolves different versions across
npm releases, causing false CI failures. Switch to npm ci --dry-run
which validates the lockfile is consistent with package.json without
changing resolved versions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* web: exclude package-lock.json from ESLint pre-commit (PROJQUAY-11475)

ESLint should not lint lockfiles. Add package-lock.json to the
exclude pattern alongside pnpm-lock.yaml.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* web: add pre-commit hook to sync npm lockfile (PROJQUAY-11475)

When pnpm-lock.yaml or package.json is staged, the hook
auto-regenerates package-lock.json via npm install
--package-lock-only and stages it alongside the pnpm changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-08 14:53:13 -05:00
quay-devel
780f6a104f NO-ISSUE: chore(claude): consolidate settings and add workflow hooks (#5836)
* claude: consolidate settings, add workflow hooks for discoverability

Consolidates all hooks from claude-settings-recommended.json into
settings.json (single source of truth) and adds new hooks to improve
workflow discoverability and session resilience:

- SessionStart: auto-bootstrap + restore previous session state
- UserPromptSubmit: detect JIRA ticket references, suggest /jira or /start
- PreToolUse: commit message hint, pre-commit guard, PR title validation
- PostToolUse: suggest /poll after PR creation, Target Version warning
- PreCompact: save session state to survive context compaction
- Stop: suggest next workflow step based on git/PR state

All JSON output uses jq for proper escaping. JIRA REST fallback
uses Basic auth. Deletes claude-settings-recommended.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* claude: fix .gitignore conflict with upstream

Rebase .gitignore on upstream master version and add session-state entry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* claude: address CodeRabbit review feedback

- check-target-version.sh: use separate if instead of elif so REST
  fallback runs when acli is installed but returns empty
- detect-jira-ticket.sh: match slash commands without trailing
  whitespace by using (\s|$) instead of \s
- workflow-next-step.sh: handle branches without upstream tracking
  instead of silently swallowing git log errors
- settings.json: PR title validation now handles --title=VALUE syntax
  in addition to --title 'VALUE' and --title "VALUE"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* claude: fix state restore on re-entry, atomic state writes

- session-setup.sh: move marker check after state restore so
  session-state/current.json is always restored on re-entry,
  not just on first bootstrap
- save-session-state.sh: write to tmp file then mv for atomicity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: quay-devel <bot@ambient-code.local>
2026-04-30 08:39:34 -04:00
quay-devel
e5c2f5eade NO-ISSUE: feat: add Ambient development workflow for Quay team (#5738)
* NO-ISSUE: feat: add Ambient development workflow for Quay team

Adds a custom Ambient Code workflow that codifies the Quay development
lifecycle from JIRA ticket to merged PR. Includes:

- Slash commands: /start, /code, /pr, /poll, /ci, /backport, /jira
- PR polling script for CodeRabbit reviews and GitHub Actions results
- JIRA operations script (assign, transition, fixVersion management)
- Format/lint script (Black, isort, Flake8, ESLint, gitleaks)
- PR title validation matching CI-enforced regex
- PR description template with test plan and backport tracking
- Quality rubric for self-evaluation
- Recommended Claude Code hooks for pre-commit and PR title validation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* NO-ISSUE: refactor: use pre-commit instead of custom format/lint script

Replace the custom format-and-lint.sh that manually ran Black, isort,
Flake8, etc. with a thin wrapper around pre-commit. The project already
has .pre-commit-config.yaml with all hooks configured -- no need to
duplicate that logic.

- format-and-lint.sh now wraps `pre-commit run` with --all-files and
  --hook options
- Updated CLAUDE.md to reference pre-commit throughout
- Updated hooks config to ensure pre-commit is installed before commit
  rather than running Black directly

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* NO-ISSUE: fix: use Target Version custom field instead of fixVersions

The Quay JIRA project uses a custom field called "Target Version"
(not the built-in fixVersions) to track which versions a change
needs to be backported to.

- jira-ops.sh now discovers the custom field ID dynamically via
  the JIRA field API and caches it for 60 minutes
- Supports override via TARGET_VERSION_FIELD_ID env var
- Updated all references in CLAUDE.md, rubric.md, and PR template

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* NO-ISSUE: fix: hardcode Target Version field ID (customfield_10855)

Replace dynamic field discovery with hardcoded customfield_10855 for
the "Target Version" multi-version picker. Also fix null description
handling in the view command that CodeRabbit flagged, and properly
escape VERSION input in set-version via jq.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* NO-ISSUE: fix: address CodeRabbit review feedback

- Fix NO-ISSUE vs mandatory JIRA contradiction in systemPrompt: JIRA
  assignment is now gated to ticketed work (PROJQUAY-/QUAYIO-), while
  NO-ISSUE prefix is explicitly allowed for unticketed chores
- Fix JSON injection vulnerability in ASSIGNEE variable by using
  jq -n for safe JSON construction
- Normalize VERSION escaping to use jq -n consistently

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: address remaining CodeRabbit review feedback

- Add -sS -f flags to curl in jira_rest() so HTTP 4xx/5xx errors
  cause non-zero exit codes instead of silently succeeding
- Wrap hooks JSON example in CLAUDE.md with top-level "hooks" key
  per Claude Code settings.json schema

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: update JIRA URLs from issues.redhat.com to redhat.atlassian.net

The JIRA instance has moved to Atlassian Cloud. Updates:
- REST API base URL to redhat.atlassian.net/rest/api/3/
- Assignee field from "name" to "accountId" (Cloud API)
- Description parsing for ADF (Atlassian Document Format)
- PR template browse link

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: fix ADF description parsing in jira-ops.sh

The Atlassian Cloud API v3 returns descriptions in Atlassian Document
Format (JSON) instead of plain text. Fix the jq expression to properly
extract text nodes from ADF using [.. | .text? // empty].

Tested against PROJQUAY-11079 on redhat.atlassian.net - view and
check-version commands confirmed working.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: add session setup instructions for Claude hooks

Added a "Session Setup" section to CLAUDE.md with explicit instructions
to copy claude-settings-recommended.json into .claude/settings.json.
Also added a first-time setup note to the startup prompt in ambient.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: fix JIRA transition names and add credential docs

PROJQUAY uses different statuses than assumed: New, ASSIGNED, POST,
ON_QA, Verified, Release Pending, Closed, MODIFIED. Updated all
references from "In Progress" to "ASSIGNED" and "Code Review" to
"POST". Added note about JIRA_USER/JIRA_API_TOKEN requirements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: slim CLAUDE.md via progressive disclosure

Removed duplicated content that already exists in AGENTS.md, agent_docs/,
.pre-commit-config.yaml, and CONTRIBUTING.md. The workflow CLAUDE.md now
focuses on orchestration (JIRA lifecycle, PR process, CI triage, bot
interactions) and references upstream docs for implementation details.

512 lines → 245 lines with no loss of unique information.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: default JIRA_USER to quay-devel@redhat.com

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: address CodeRabbit round 2 feedback

- Use jq --arg for safe STATUS interpolation in transition lookup
- Return exit 1 when transition is unavailable
- Fix misleading error text: "username" -> "accountId" for Cloud API
- Add language identifier to regex code block in CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: address CodeRabbit round 3 feedback

- Validate API token explicitly before curl (not just empty creds check)
- Add exit 1 to acli transition failure path for consistency
- Fix auth guidance in CLAUDE.md to reflect actual credential requirements

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: add slash command files for staging

These 7 .claude/commands/*.md files make the workflow's slash commands
(/start, /code, /pr, /poll, /ci, /backport, /jira) executable.
Staged here temporarily — move to workflow/.claude/commands/ to activate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: move slash command files to .claude/commands

* workflow: convert slash commands from commands to skills format

Replaces flat .claude/commands/*.md files with the newer .claude/skills/
directory structure (each skill is a directory with SKILL.md). Skills add:
- disable-model-invocation to prevent auto-triggering
- $ARGUMENTS[N] indexed args (used by /backport and /jira)
- Granular allowed-tools scoped to workflow scripts
- Discovery from nested directories and --add-dir

Staged in commands-staging/ — move to .claude/skills/ to activate:
  mv workflow/commands-staging/* .claude/skills/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: stage .ambient, templates, and settings for relocation

Copies .ambient/ambient.json, .ambient/rubric.md, templates/pr-description.md,
and claude-settings-recommended.json into commands-staging/ so the full
workflow package can be moved together.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: convert CLAUDE.md into agent doc for process reference

Converts the workflow orchestration doc into an agent_docs-style reference
covering JIRA lifecycle, PR conventions, bot ecosystem, CI fixes, and
backport process. Skills handle the "how"; this doc covers the "when/why".

Place at agent_docs/workflow.md and reference from AGENTS.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: move skills, agent doc, and clean up staging

- Move 7 skill directories to .claude/skills/ for discovery
- Move workflow process doc to agent_docs/workflow.md
- Add workflow doc reference to AGENTS.md table
- Remove commands-staging/ (duplicates already in their final locations)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: dissolve workflow/ dir into .claude/ and .ambient/

- .ambient/ → repo root (ambient.json, rubric.md)
- scripts/ → .claude/scripts/
- templates/ → .claude/templates/
- claude-settings-recommended.json → .claude/
- workflow/CLAUDE.md removed (replaced by agent_docs/workflow.md)
- All path references updated in skills and agent doc

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: add manual backport fallback and restore AGENTS.md sections

- Add manual cherry-pick instructions to /backport skill for when the
  bot fails due to merge conflicts or missing labels
- Restore Playwright row and Contributing section in AGENTS.md that
  were accidentally dropped when adding the workflow doc row

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: auto-install acli in jira-ops.sh if not found

Downloads acli from acli.atlassian.com/linux/latest to ~/.local/bin
on first use. Set ACLI_AUTO_INSTALL=0 to disable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: add session bootstrap, release branch model, and acli auth

Address feedback from field testing:
- jira-ops.sh: acli auto-install now also auto-authenticates using
  JIRA_API_TOKEN and JIRA_USER env vars
- session-setup.sh: new bootstrap script handles acli install+auth,
  recommended hooks, pre-commit, and gh auth check (runs once)
- /start skill: calls session-setup.sh as Step 0
- /backport skill: warns that redhat-3.18 is synced with master
- agent_docs/workflow.md: adds release branch model (which branches
  are active, which get critical-only fixes, skip redhat-3.18) and
  gh CLI token scope fallback note

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: address CodeRabbit review feedback

Fix scripts: pre-commit --hook positional arg, poll-pr.sh --wait loop
termination, check-ci.sh non-zero exit on pending, jira-ops.sh curl
error handling. Fix skills: quote $ARGUMENTS in shell examples, add
npm to poll allowed-tools, update jira argument-hint for QUAYIO, use
Quay commit message convention. Fix workflow.md: branch naming with
type prefix, clarify cherrypick bot name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* workflow: guard --hook arg in format-and-lint.sh

Validate that a hook ID is provided when --hook is passed,
preventing unbound $2 dereference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: quay-devel <bot@ambient-code.local>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Brady Pratt <bpratt@redhat.com>
2026-04-16 13:13:58 -05:00