Skip to content
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

Version check step #524

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Version check step #524

wants to merge 7 commits into from

Conversation

wirthual
Copy link
Collaborator

Related Issue

closes #521

Checklist

  • I have read the CONTRIBUTING guidelines.
  • I have added tests to cover my changes.
  • I have updated the documentation (docs folder) accordingly.

Additional Notes

Added step to release pipeline to error out if the versions do not match.

@wirthual wirthual requested a review from michaelfeil January 31, 2025 02:57
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Added a version check step to the PyPI release workflow to ensure version consistency between packages before deployment.

  • Added version comparison step in .github/workflows/pypi_release.yaml that extracts and validates matching versions from both infinity_client and infinity_emb pyproject.toml files
  • Fails the workflow early if versions don't match to prevent inconsistent package releases
  • Provides clear error messaging showing the mismatched versions for debugging

💡 (4/5) You can add custom instructions or style guidelines for the bot here!

1 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines 35 to 36
version1=$(grep 'version = ' "$file1" | sed 's/version = //' | tr -d '\"')
version2=$(grep 'version = ' "$file2" | sed 's/version = //' | tr -d '\"')
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: The grep pattern is fragile and may fail if there are comments containing 'version = ' or if the version field spans multiple lines. Consider using a TOML parser instead.

Comment on lines 41 to 44
if [ "$version1" != "$version2" ]; then
echo "Version mismatch: $version1 != $version2"
exit 1
else
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Version comparison should handle cases where version strings are empty or malformed. Add validation before comparison.

Suggested change
if [ "$version1" != "$version2" ]; then
echo "Version mismatch: $version1 != $version2"
exit 1
else
if [ -z "$version1" ] || [ -z "$version2" ]; then
echo "Error: Empty version string detected"
exit 1
elif [ "$version1" != "$version2" ]; then
echo "Version mismatch: $version1 != $version2"
exit 1
else

Comment on lines 30 to 31
working-directory: ${{ github.workspace }}
run: |
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Setting working-directory to github.workspace is redundant since the paths are already absolute. This can be removed.

@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.86%. Comparing base (9735ed5) to head (95ac5fb).
Report is 1 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #524   +/-   ##
=======================================
  Coverage   79.86%   79.86%           
=======================================
  Files          43       43           
  Lines        3486     3486           
=======================================
  Hits         2784     2784           
  Misses        702      702           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michaelfeil
Copy link
Owner

Makes sense, but was internationally not bumping infinity_client.

Perhaps a ci that would auto generate the client would be better.

@wirthual
Copy link
Collaborator Author

wirthual commented Feb 1, 2025

That makes sense. And the package version of the generated client should match what the openapi description reports in the version field?

@wirthual
Copy link
Collaborator Author

wirthual commented Feb 1, 2025

I created a initial version of it, the idea is with changes to main the client will be regenerated and if there are changes a PR will be opened.

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.

Deployment: infifnity_client version does not match with infinity_emb version
3 participants