-
-
Notifications
You must be signed in to change notification settings - Fork 266
chore: update version to v1.5.1 in API docs and internal info file #2602
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
Conversation
WalkthroughThis PR updates the API version from v1.5.0 to v1.5.1 across documentation, configuration, and source files, and enhances error logging in the validation command to include contextual query strings and formatted error messages. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes The bulk of this PR consists of homogeneous version updates (4 files with repetitive version string replacements), which is straightforward. The logging enhancements in
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
internal/info.go (1)
26-26: Bumped Version constant to v1.5.1 — approved.
No layout impact on the banner. Consider centralizing version to a single source (e.g., ldflags from git tag) to eliminate manual edits.Option A: Inject at build time
- go build -ldflags "-X github.com/Permify/permify/internal.Version=v1.5.1"
Option B: Generate docs from proto and read version from there during release.
docs/api-reference/openapiv2/apidocs.swagger.json (1)
6-6: OpenAPI (v2) info.version set to v1.5.1 — approved.
Suggest adding a CI guard to fail if versions differ across proto/info/docs.Add a job running:
#!/bin/bash set -euo pipefail errs=0 rg -n --hidden -S '\bv1\.5\.0\b' -g '!**/vendor/**' -g '!**/node_modules/**' && errs=1 || true # ensure all declared versions equal want=$(rg -nP 'Version\s*=\s*"([^"]+)"' -o -r '$1' internal/info.go) rg -nP '"version":\s*"([^"]+)"' docs/api-reference/**/apidocs.swagger.json | awk -F'"' -v want="$want" '$4!=want{print; exit 1}' || true exit $errs
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pkg/pb/base/v1/openapi.pb.gois excluded by!**/*.pb.go
📒 Files selected for processing (5)
docs/api-reference/apidocs.swagger.json(1 hunks)docs/api-reference/openapiv2/apidocs.swagger.json(1 hunks)internal/info.go(1 hunks)pkg/cmd/validate.go(10 hunks)proto/base/v1/openapi.proto(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
pkg/cmd/validate.go (1)
pkg/tuple/tuple.go (3)
EAR(185-212)SubjectToString(73-84)EntityToString(68-70)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Scan Container for Vulnerabilities
- GitHub Check: Analyze (go)
- GitHub Check: Test with Coverage
- GitHub Check: Test with Coverage
🔇 Additional comments (7)
proto/base/v1/openapi.proto (1)
12-12: Version bump confirmed; generated artifacts are tracked—verify regeneration step.The sweep for leftover v1.5.0 strings is clean (only legitimate Go dependency versions found). Generated proto bindings and OpenAPI/Swagger specs are properly committed to the repo (pkg/pb/base/v1/openapi.pb.go, docs/api-reference/openapi.json, docs/api-reference/apidocs.swagger.json) with buf.gen.yaml configured to regenerate them.
Confirm that you ran
buf generateafter updating the proto version to v1.5.1 to ensure all downstream artifacts reflect the change.docs/api-reference/apidocs.swagger.json (1)
6-6: Version consistency verified — but file is currently hand-edited.All three sources match v1.5.1:
proto/base/v1/openapi.protoline 11:version: "v1.5.1"internal/info.goline 26:Version = "v1.5.1"docs/api-reference/apidocs.swagger.jsonline 6:"version": "v1.5.1"However, git history shows the swagger JSON file is manually maintained (commits reference "update API docs"), not auto-generated. No build scripts or CI/CD automation for swagger generation were found. Ensure this manual maintenance approach is intentional and establish a sustainable process (e.g., auto-generation during build) to prevent future version divergence.
pkg/cmd/validate.go (5)
245-245: LGTM: Consistent error formatting applied.The application of
validationError()to conversion error messages improves consistency across the validation output.Also applies to: 253-253, 267-267
279-311: LGTM: Enhanced error context for permission checks.Constructing the query string early and including it in both error and success messages significantly improves debugging context. The query is safely built after all components are validated, and the enhanced error messages for depth and check failures will make troubleshooting easier.
336-336: LGTM: Entity filter logging enhanced with query context.The same pattern applied to entity filters improves consistency and debugging capability. The early query construction and inclusion of depth validation with contextual error messages aligns well with the checks section.
Also applies to: 352-352, 358-392
415-415: LGTM: Subject filter logging enhanced with query context.The subject filter section now mirrors the improvements in checks and entity filters, completing the consistent enhancement of error logging across all validation scenarios.
Also applies to: 424-424, 430-464
279-464: Consider PR scope: Are these logging enhancements related to the version update?The PR title indicates this is a version update to v1.5.1, but this file only contains error logging enhancements. While these improvements are valuable and well-implemented, they appear unrelated to a version bump. Consider whether:
- These enhancements should be in a separate PR focused on improving validation error reporting
- The PR description should mention these logging improvements as additional changes
- This is intentional bundling of minor improvements with the version update
This doesn't block the changes, but clarity on the PR scope would be helpful for reviewers and future reference.
Summary by CodeRabbit
Bug Fixes
Chores