Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
minVersion: "0.27.2"
changelogPolicy: auto
artifactProvider:
name: none
statusProvider:
name: github
config:
contexts:
- 'Publish'
Copy link

Choose a reason for hiding this comment

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

Bug: The .craft.yml configures craft to wait for a 'Publish' GitHub status check that no workflow sets, blocking releases.
Severity: CRITICAL | Confidence: 1.00

🔍 Detailed Analysis

The .craft.yml file configures statusProvider to wait for a GitHub status check named 'Publish'. However, no existing workflow in the repository sets this 'Publish' status. This will cause the craft CLI tool, invoked by action-prepare-release in release.yml, to indefinitely wait for a non-existent status, blocking the release pipeline from completing successfully.

💡 Suggested Fix

Either remove the statusProvider configuration from .craft.yml, ensure a workflow sets the 'Publish' status, or change the context name to an existing status.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .craft.yml#L8-L9

Potential issue: The `.craft.yml` file configures `statusProvider` to wait for a GitHub
status check named 'Publish'. However, no existing workflow in the repository sets this
'Publish' status. This will cause the `craft` CLI tool, invoked by
`action-prepare-release` in `release.yml`, to indefinitely wait for a non-existent
status, blocking the release pipeline from completing successfully.

Did we get this right? 👍 / 👎 to inform future reviews.

Reference_id: 2703558

preReleaseCommand: ""
targets:
- id: release
name: docker
source: ghcr.io/getsentry/objectstore
target: getsentry/objectstore
- id: latest
name: docker
source: ghcr.io/getsentry/objectstore
target: getsentry/objectstore
targetFormat: '{{{target}}}:latest'
- name: github
28 changes: 28 additions & 0 deletions .github/workflows/release-ghcr-version-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release GHCR Versioned Image

on:
release:
types: [prereleased, released]

jobs:
release-ghcr-version-tag:
runs-on: ubuntu-latest
steps:
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
Copy link
Contributor

Choose a reason for hiding this comment

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

as you have pinned all the other actions to the SHA in a different PR, might as well do that here as well :-)

with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Tag release version
run: |
docker buildx imagetools create --tag \
ghcr.io/getsentry/objectstore:${{ github.ref_name }} \
ghcr.io/getsentry/objectstore:${{ github.sha }}

- name: Tag latest version
run: |
docker buildx imagetools create --tag \
ghcr.io/getsentry/objectstore:latest \
ghcr.io/getsentry/objectstore:${{ github.sha }}
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: self-hosted release

on:
workflow_dispatch:
inputs:
version:
description: Version to release (optional)
required: false
force:
description: Force a release even when there are release-blockers (optional)
required: false

schedule:
# We want the release to be at 9-10am Pacific Time
# We also want it to be 1 hour before the on-prem release
- cron: "0 17 15 * *"

jobs:
release:
runs-on: ubuntu-latest
name: "Release a new objectstore version"
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.token.outputs.token }}
fetch-depth: 0
- name: Prepare release
uses: getsentry/action-prepare-release@v1
env:
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
version: ${{ github.event.inputs.version }}
force: ${{ github.event.inputs.force }}
calver: true
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# CHANGELOG