-
Notifications
You must be signed in to change notification settings - Fork 140
fix: update enterprise/pyproject.toml before poetry lock in version bump workflow #1834
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
Changes from all commits
11474a1
22f7de4
79cb478
e268754
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -162,21 +162,28 @@ jobs: | |||||
| fi | ||||||
| echo "📦 SDK commit hash: $SDK_COMMIT_HASH" | ||||||
|
|
||||||
| # 1. Update versions in pyproject.toml using poetry | ||||||
| echo "📝 Updating pyproject.toml..." | ||||||
| # 1. Update versions in pyproject.toml using poetry (root) | ||||||
| echo "📝 Updating root pyproject.toml..." | ||||||
| poetry add "openhands-sdk==$VERSION" "openhands-tools==$VERSION" "openhands-agent-server==$VERSION" | ||||||
|
Comment on lines
+165
to
167
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: The numbered comments (# 1., # 2., etc.) are maintenance burden. Every time a step is added or removed, all subsequent numbers need updating. The echo statements already provide clear context. Consider removing the numbers: # Update versions in pyproject.toml using poetry (root)
echo "📝 Updating root pyproject.toml..." |
||||||
|
|
||||||
| # 2. Generate poetry.lock in root | ||||||
| # 2. Update versions in enterprise/pyproject.toml using poetry | ||||||
| # Must be done BEFORE running poetry lock in root to avoid conflicting constraints | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: This comment is verbose. The commit message and the fix itself make this clear. Consider a more concise version: # Update enterprise pyproject.toml (must be done before root poetry lock) |
||||||
| echo "📝 Updating enterprise/pyproject.toml..." | ||||||
| cd enterprise | ||||||
| poetry add "openhands-sdk==$VERSION" "openhands-tools==$VERSION" "openhands-agent-server==$VERSION" | ||||||
| cd .. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 Important: The Problems:
Better approach: (cd enterprise && poetry add "openhands-sdk==$VERSION" "openhands-tools==$VERSION" "openhands-agent-server==$VERSION") || exit 1The subshell |
||||||
|
|
||||||
| # 3. Generate poetry.lock in root | ||||||
| echo "🔒 Running poetry lock in root..." | ||||||
| poetry lock | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 Important: Add error checking here too:
Suggested change
If poetry lock fails, we should stop immediately rather than continue with an inconsistent state. |
||||||
|
|
||||||
| # 3. Generate poetry.lock in enterprise directory | ||||||
| # 4. Generate poetry.lock in enterprise directory | ||||||
| echo "🔒 Running poetry lock in enterprise/..." | ||||||
| cd enterprise | ||||||
| poetry lock | ||||||
| cd .. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 Important: Same fragile
Suggested change
|
||||||
|
|
||||||
| # 4. Update the hash in sandbox_spec_service.py | ||||||
| # 5. Update the hash in sandbox_spec_service.py | ||||||
| echo "🔧 Updating AGENT_SERVER_IMAGE hash..." | ||||||
| SANDBOX_SPEC_FILE="openhands/app_server/sandbox/sandbox_spec_service.py" | ||||||
| if [ -f "$SANDBOX_SPEC_FILE" ]; then | ||||||
|
|
@@ -201,6 +208,7 @@ jobs: | |||||
| -m "" \ | ||||||
| -m "Changes:" \ | ||||||
| -m "- Updated SDK packages to v$VERSION in pyproject.toml" \ | ||||||
| -m "- Updated SDK packages to v$VERSION in enterprise/pyproject.toml" \ | ||||||
| -m "- Regenerated poetry.lock" \ | ||||||
| -m "- Regenerated enterprise/poetry.lock" \ | ||||||
| -m "- Updated AGENT_SERVER_IMAGE hash to ${SDK_COMMIT_HASH}" \ | ||||||
|
|
@@ -221,6 +229,7 @@ jobs: | |||||
|
|
||||||
| ### Changes | ||||||
| - Updated SDK packages in \`pyproject.toml\` | ||||||
| - Updated SDK packages in \`enterprise/pyproject.toml\` | ||||||
| - Regenerated \`poetry.lock\` | ||||||
| - Regenerated \`enterprise/poetry.lock\` | ||||||
| - Updated \`AGENT_SERVER_IMAGE\` hash to \`${SDK_COMMIT_HASH}\` in \`sandbox_spec_service.py\` | ||||||
|
|
||||||
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.
🟠 Important: No error checking. If
poetry addfails, the workflow continues and will fail later with a confusing error.Add error checking: