-
Notifications
You must be signed in to change notification settings - Fork 66
ci: autorelease python client #2951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: autorelease python client #2951
Conversation
e1a0794 to
bb78f7c
Compare
cce6b7b to
3594f0c
Compare
8a45238 to
4ac49e0
Compare
4ac49e0 to
6827b10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
13 files reviewed, 5 comments
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
6827b10 to
dc1446a
Compare
Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changesNo lines with coverage information in this diff. |
yaugenst-flex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @daquinteroflex this looks great but I also don't really understand what's going on, so hard to give a proper review. Could we have someone from infra also have a look?
9cd030b to
e90187a
Compare
|
Sorry I couldn't push further polishing yesterday after github went down so I've actually addressed several of your points already |
|
Sure maybe @bryance-flexcompute can give some thoughts |
|
@greptile reassess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at this PR, I can see it implements automated release workflows for the Tidy3D Python client. Let me reassess the changes:
Updated Assessment
This PR introduces a comprehensive automated release system with well-structured, modular workflows. However, there are still some critical issues that need attention:
✅ Strengths
- Excellent Modular Design: The workflow architecture is well-designed with clear separation of concerns
- Comprehensive Documentation: The README.md and version.rst files provide excellent documentation
- Robust Error Handling: Good validation and error handling throughout
- Flexible Control: The workflow_control parameter allows resuming from different stages
- Security Improvements: Uses secure token authentication in most places
❌ Critical Issues Identified
-
Release Type Parameter Mismatch in
tidy3d-python-client-create-tag.yml:# Line 56: This condition will NEVER be true for production releases if: ( env.RELEASE_TYPE == 'pypi' ) || ( env.RELEASE_TYPE == "testpypi" )
The main workflow passes
release_type: finalbut the validation checks forpypi/testpypi. This means version validation will never run for production releases. -
Commented Out Critical Steps in
tidy3d-python-client-deploy.yml:# Line 193: PyPI deployment is commented out echo " View at: https://pypi.org/project/tidy3d/"
-
Insecure Authentication: Using token-based auth instead of OIDC trusted publishing for PyPI
-
Missing GitHub Release Creation: The release creation step is commented out in the main workflow
🔧 Required Fixes
-
Fix Parameter Mismatch:
# In tidy3d-python-client-create-tag.yml, change line 56: if: ( env.RELEASE_TYPE == 'final' )
-
Enable PyPI Deployment: Uncomment and fix the PyPI deployment steps
-
Enable GitHub Release: Uncomment the GitHub release creation step
-
Consider OIDC: Migrate to trusted publishing for better security
Confidence Score: 3.5/5
The workflow architecture is solid and well-documented, but the parameter mismatch and commented-out deployment steps are blocking issues that prevent the workflow from functioning correctly for production releases. These need to be fixed before this can go to production.
The PR shows excellent engineering practices in terms of modularity, documentation, and error handling, but has implementation gaps that need addressing.
d15a2d5 to
bcb7fc8
Compare
|
@greptile check the updates in the code and reassess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at this comprehensive PR that implements an automated release workflow, I can see significant improvements and additions. Let me analyze the key changes:
Major Improvements ✅
1. Comprehensive Workflow Architecture
- Well-designed modular approach with separate workflows for tagging, testing, and deployment
- Clear separation of concerns between components
- Good use of workflow_call for reusability
2. Enhanced Testing Integration
- Integrated CLI tests, submodule tests, and version consistency checks
- Centralized validation through
workflow-validationjob - Proper test gating for deployments
3. Better Documentation
- Excellent README in
.github/workflows/explaining the entire system - Clear parameter descriptions and usage examples
- Good troubleshooting guidance
Critical Issues Identified 🚨
1. Release Type Parameter Mismatch
In tidy3d-python-client-create-tag.yml:
# workflow_dispatch uses:
options: [draft, testpypi, pypi]
# But workflow_call expects:
# release_type: final # This will never match 'pypi'And the validation logic checks:
if [[ "$RELEASE_TYPE" == 'pypi' || "$RELEASE_TYPE" == 'testpypi' ]]; thenBut the create-tag workflow will never receive 'final' when called from the release workflow, so version validation may not work properly for production releases.
2. Commented Out Critical Deployment Steps
In tidy3d-python-client-deploy.yml, line 192:
# PyPI deployment is commented out
echo "Successfully published to PyPI"
echo " View at: https://pypi.org/project/tidy3d/" # This line is broken3. Security Concerns
- Using token-based auth instead of OIDC trusted publishing for PyPI
secrets: inheritusage in multiple places (though zizmor exceptions are noted)
4. Missing Functionality
In tidy3d-python-client-release.yml:
- GitHub release creation step references are commented out
- Branch sync logic appears incomplete
Recommendations for Production Readiness 🔧
- Fix Parameter Alignment: Standardize release_type values between workflows
- Uncomment PyPI Deployment: Enable actual PyPI publishing
- Fix Syntax Error: Line 192 in deploy workflow has incorrect indentation
- Implement Trusted Publishing: Replace token auth with OIDC for better security
- Test End-to-End: Run complete flow in a test environment before production use
Assessment Update 📊
The PR shows significant architectural improvements and comprehensive planning, but still has critical blocking issues for production use. The workflow design is sound, but the implementation has gaps that would prevent successful releases.
Updated Confidence Score: 3.5/5 (improved from 3/5)
- Architecture and documentation are excellent (+0.5)
- But deployment and parameter issues remain critical blockers
- The foundation is solid and close to production-ready with fixes
The PR demonstrates good engineering practices and thorough planning, but needs the critical issues resolved before it can reliably handle production releases.
bcb7fc8 to
8cd7c5f
Compare
|
@greptile look at code changes again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the code changes in this PR, I can see this implements a comprehensive automated release workflow system for the Tidy3D Python client. Here's what I observe:
Key Changes Summary
New Release Workflow Files:
tidy3d-python-client-release.yml- Main orchestration workflowtidy3d-python-client-create-tag.yml- Tag creation with version validationtidy3d-python-client-deploy.yml- Package deployment to PyPI/TestPyPI- Workflow documentation - Comprehensive README and version guide
Major Issues I Notice:
1. Critical Parameter Mismatch
In tidy3d-python-client-create-tag.yml, line 57:
if: env.RELEASE_TYPE == 'pypi' || env.RELEASE_TYPE == 'testpypi'But the main release workflow uses different values:
options:
- draft
- testpypi # This matches
- pypi # But main workflow uses 'final' not 'pypi'This means version validation will never run for production releases since the release workflow passes final but the tag workflow expects pypi.
2. Deployment Issues
In tidy3d-python-client-deploy.yml:
- PyPI deployment step is commented out (lines would be around deployment section)
- Using insecure token authentication instead of OIDC trusted publishing
- Critical deployment functionality is incomplete
3. Incomplete Implementation
In tidy3d-python-client-release.yml:
- GitHub release creation step is commented out
- Sync logic has gaps in implementation
- Some workflow stages may not execute as intended
Positive Aspects:
- Well-structured modular design
- Comprehensive test integration
- Good separation of concerns between workflows
- Detailed documentation and examples
Recommendation: The parameter mismatch between final and pypi needs to be resolved, and the commented-out deployment steps should be completed before this can work in production.
|
So this PR does a few things that are coupled together:
I think greptile is confused since literally there is no reference to the issues it raises now |
8cd7c5f to
61a1824
Compare
|
Full action works as intended for the 2.9.3 testpypi release https://github.com/flexcompute/tidy3d/actions/runs/19499962664 If it sounds ok think that's probably good enough for it to be merged since it captures a lot of the current release logic required that we do anyway manually |
I'd love to review it but realistically I'm gonna go on vacation tomorrow until Dec 1 and probably don't have time today to review a 2000 line PR 😄 Looks like great work though! |
61a1824 to
5a6bd3f
Compare
5a6bd3f to
494f133
Compare

Works per:
Also see https://github.com/flexcompute/compute/pull/2814
Greptile Summary
Confidence Score: 3/5
tidy3d-python-client-release.yml(release_type mismatch),tidy3d-python-client-deploy.yml(commented deployment steps), and verify the parameter passing between workflow filesImportant Files Changed
Sequence Diagram
sequenceDiagram participant User participant Release as "Release Workflow" participant CreateTag as "Create Tag" participant Tests as "Test Workflow" participant Deploy as "Deploy Workflow" participant DocsSync as "Docs Sync" participant PyPI as "PyPI/TestPyPI" User->>Release: "Trigger workflow_dispatch with release_tag" Release->>Release: "Validate tag format" Release->>Release: "Determine workflow scope (stages, test suites, deployment targets)" alt run_tag == true Release->>CreateTag: "Call create-tag workflow" CreateTag->>CreateTag: "Validate version match (if release_type==final)" CreateTag->>CreateTag: "Delete existing tag if present" CreateTag->>CreateTag: "Create and push tag" CreateTag-->>Release: "Tag created" end alt run_tests == true Release->>Tests: "Call python-client-tests with release_tag" Tests->>Tests: "Checkout code at release_tag" Tests->>Tests: "Run local tests, remote tests, CLI tests" alt submodule_tests enabled Tests->>Tests: "Run submodule integration tests" end Tests->>Tests: "Validate all test results in workflow-validation job" Tests-->>Release: "Tests passed" Release->>Release: "Compile test results and set proceed_deploy flag" end alt run_deploy == true && tests passed Release->>DocsSync: "Call docs-sync workflow with source_ref=release_tag" DocsSync->>DocsSync: "Push to ReadTheDocs mirror repo" DocsSync-->>Release: "Docs synced" alt deploy_pypi == true || deploy_testpypi == true Release->>Deploy: "Call deploy workflow" Deploy->>Deploy: "Build package from release_tag" alt deploy_testpypi == true Deploy->>PyPI: "Publish to TestPyPI" end alt deploy_pypi == true Note over Deploy: "PyPI deployment currently commented out" end Deploy-->>Release: "Deployment complete" end end