Skip to content

fix: allow publish workflow to continue if codegen already published - #147

Merged
DevonMorris merged 1 commit into
mainfrom
fix/publish-workflow
Feb 3, 2026
Merged

DevonMorris merged 1 commit into
mainfrom
fix/publish-workflow

Conversation

@DevonMorris

Copy link
Copy Markdown
Owner

Summary

Allow the publish workflow to continue even if clifford-codegen is already published. This handles the case where a previous publish attempt published clifford-codegen but failed on clifford.

Test plan

  • Retag and release after merge

🤖 Generated with Claude Code

@DevonMorris

Copy link
Copy Markdown
Owner Author

@greptileai review

@greptile-apps

greptile-apps Bot commented Feb 3, 2026

Copy link
Copy Markdown

Greptile Overview

Greptile Summary

Added error handling to the publish workflow by allowing the clifford-codegen publish step to continue on failure. This addresses the case where a previous publish attempt successfully published clifford-codegen but failed on clifford, preventing retries from being blocked.

  • Changed the clifford-codegen publish command to use || echo pattern to suppress errors and continue workflow execution
  • The change enables recovery from partial publish failures without manual intervention

The implementation solves the immediate problem but could be more robust by specifically checking for "already published" errors vs other failure types.

Confidence Score: 4/5

  • Safe to merge with minor consideration for error handling improvement
  • The change solves a real problem with the publish workflow and is a practical fix. Minor deduction because the error handling is broad and could mask genuine failures, though this is acceptable for the use case.
  • No files require special attention - the workflow change is straightforward

Important Files Changed

Filename Overview
.github/workflows/publish.yml Added error handling to allow workflow to continue if clifford-codegen is already published, addressing partial publish failure recovery

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile


- name: Publish clifford-codegen to crates.io
run: cargo publish -p clifford-codegen
run: cargo publish -p clifford-codegen || echo "clifford-codegen may already be published, continuing..."

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider checking the actual exit code to distinguish between "already published" vs other errors. The current implementation continues on ANY error, including network failures or authentication issues.

Suggested change
run: cargo publish -p clifford-codegen || echo "clifford-codegen may already be published, continuing..."
run: |
if ! cargo publish -p clifford-codegen 2>&1 | tee publish.log; then
if grep -q "already uploaded" publish.log; then
echo "clifford-codegen already published, continuing..."
else
echo "Unexpected error publishing clifford-codegen"
cat publish.log
exit 1
fi
fi
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/publish.yml
Line: 46:46

Comment:
Consider checking the actual exit code to distinguish between "already published" vs other errors. The current implementation continues on ANY error, including network failures or authentication issues.

```suggestion
        run: |
          if ! cargo publish -p clifford-codegen 2>&1 | tee publish.log; then
            if grep -q "already uploaded" publish.log; then
              echo "clifford-codegen already published, continuing..."
            else
              echo "Unexpected error publishing clifford-codegen"
              cat publish.log
              exit 1
            fi
          fi
```

How can I resolve this? If you propose a fix, please make it concise.

@DevonMorris
DevonMorris merged commit 7ae7d1e into main Feb 3, 2026
10 checks passed
@DevonMorris
DevonMorris deleted the fix/publish-workflow branch February 3, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant