Skip to content

Conversation

@ggreer
Copy link
Contributor

@ggreer ggreer commented May 7, 2025

Summary by CodeRabbit

  • New Features
    • Expanded sync run output to display additional information, including "Type" and "Parent ID" columns.
  • Enhancements
    • Improved sync run details by including sync type and parent sync ID in the output.
  • Dependencies
    • Updated a core dependency to a newer version for improved compatibility.

@coderabbitai
Copy link

coderabbitai bot commented May 7, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • .github/workflows/ci.yaml is excluded by none and included by none
  • .github/workflows/main.yaml is excluded by none and included by none

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes update the github.com/conductorone/baton-sdk dependency to version v0.3.0, add two new fields (sync_type and parent_sync_id) to the SyncOutput protobuf message, and modify the console output to display these new fields in the sync runs table.

Changes

File(s) Change Summary
go.mod Updated github.com/conductorone/baton-sdk dependency from v0.2.94 to v0.3.0.
proto/baton/v1/outputs.proto Added sync_type and parent_sync_id fields to the SyncOutput message.
pkg/output/console.go Modified sync runs table output to include "Type" and "Parent ID" columns using the new fields.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ConsoleManager
    participant SyncOutput

    User->>ConsoleManager: Request sync runs output
    ConsoleManager->>SyncOutput: Retrieve sync run data (including sync_type, parent_sync_id)
    ConsoleManager->>User: Display table with ID, Type, Parent ID, Started At, Ended At, Token
Loading

Possibly related PRs

Poem

In fields of sync, two columns bloom,
"Type" and "Parent ID" now chase the gloom.
With protobufs grown and SDKs anew,
Console tables shine with extra view.
A bunny hops, delighted and spry—
More info for all, as updates hop by!
🐇✨


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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 (1)
pkg/output/console.go (1)

56-56: Table header updated with new columns

The header now includes the new "Type" and "Parent ID" columns to display the sync type and parent sync ID.

Consider explicitly declaring the type for the table data slice to address the static analysis warning:

- syncsTable := pterm.TableData{
+ syncsTable := pterm.TableData{

Note: This is a minor stylistic suggestion that doesn't affect functionality.

🧰 Tools
🪛 golangci-lint (1.64.8)

56-56: missing type in composite literal

(typecheck)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4233783 and 940c6a8.

⛔ Files ignored due to path filters (38)
  • buf.gen.yaml is excluded by none and included by none
  • cmd/baton/syncs.go is excluded by none and included by none
  • go.sum is excluded by !**/*.sum and included by none
  • pb/baton/v1/outputs.pb.go is excluded by !**/*.pb.go, !pb/** and included by none
  • pb/baton/v1/outputs.pb.validate.go is excluded by !pb/** and included by none
  • pb/c1/connector/v2/entitlement.pb.go is excluded by !**/*.pb.go, !pb/** and included by none
  • pb/c1/connector/v2/entitlement.pb.validate.go is excluded by !pb/** and included by none
  • pb/c1/connector/v2/entitlement_grpc.pb.go is excluded by !**/*.pb.go, !pb/** and included by none
  • pb/c1/connector/v2/grant.pb.go is excluded by !**/*.pb.go, !pb/** and included by none
  • pb/c1/connector/v2/grant.pb.validate.go is excluded by !pb/** and included by none
  • pb/c1/connector/v2/grant_grpc.pb.go is excluded by !**/*.pb.go, !pb/** and included by none
  • pb/c1/connector/v2/resource.pb.go is excluded by !**/*.pb.go, !pb/** and included by none
  • pb/c1/connector/v2/resource.pb.validate.go is excluded by !pb/** and included by none
  • pb/c1/connector/v2/resource_grpc.pb.go is excluded by !**/*.pb.go, !pb/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go is excluded by !**/*.pb.go, !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go is excluded by !**/*.pb.go, !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go is excluded by !**/*.pb.go, !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource_grpc.pb.go is excluded by !**/*.pb.go, !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.go is excluded by !**/*.pb.go, !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.validate.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/connectorstore/connectorstore.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/assets.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/c1file.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/pagination/generic_bag.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/pagination/pagination.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/uhttp/pagination.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/uhttp/transport.go is excluded by !vendor/** and included by none
  • vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go is excluded by !vendor/** and included by none
  • vendor/modules.txt is excluded by !vendor/** and included by none
📒 Files selected for processing (3)
  • go.mod (1 hunks)
  • pkg/output/console.go (1 hunks)
  • proto/baton/v1/outputs.proto (1 hunks)
🧰 Additional context used
🪛 golangci-lint (1.64.8)
pkg/output/console.go

56-56: missing type in composite literal

(typecheck)

🔇 Additional comments (3)
go.mod (1)

6-6: Dependency update looks good

The update of baton-sdk from a previous version to v0.3.0 aligns with the new fields added to the SyncOutput protobuf message.

proto/baton/v1/outputs.proto (1)

99-100: Fields added correctly to the SyncOutput message

The new sync_type and parent_sync_id fields are properly added with sequential field numbers (5 and 6) and follow protobuf naming conventions.

pkg/output/console.go (1)

64-66: Added new sync fields to table output

The table output now correctly includes the SyncType and ParentSyncId fields, which completes the implementation of displaying the new sync data.

@ggreer ggreer force-pushed the ggreer/partial-sync branch from cfea61a to 56ea1c0 Compare May 7, 2025 19:02
@ggreer ggreer enabled auto-merge (squash) May 7, 2025 19:22
@ggreer ggreer merged commit d412484 into main May 7, 2025
4 checks passed
@ggreer ggreer deleted the ggreer/partial-sync branch May 7, 2025 19:44
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.

3 participants