Skip to content

[LFXV2-1460] feat: use fga-sync shared types and constants for GenericFGAMessage#29

Merged
andrest50 merged 3 commits into
mainfrom
andrest50/LFXV2-1460-generic-fga-message-pkg-voting
Apr 14, 2026
Merged

[LFXV2-1460] feat: use fga-sync shared types and constants for GenericFGAMessage#29
andrest50 merged 3 commits into
mainfrom
andrest50/LFXV2-1460-generic-fga-message-pkg-voting

Conversation

@andrest50
Copy link
Copy Markdown
Contributor

@andrest50 andrest50 commented Apr 13, 2026

Summary

  • Remove locally-duplicated GenericFGAMessage struct and FGA subject constants from voting service
  • Replace with canonical types from lfx-v2-fga-sync/pkg/types (GenericFGAMessage, GenericAccessData, GenericDeleteData)
  • Replace hardcoded subject strings with exported constants from lfx-v2-fga-sync/pkg/constants (GenericUpdateAccessSubject, GenericDeleteAccessSubject)
  • Bump lfx-v2-fga-sync dependency to pick up the new exported constants

Ticket

LFXV2-1460

🤖 Generated with Claude Code

…cFGAMessage

Replace locally-defined GenericFGAMessage struct and hardcoded FGA NATS
subject strings with canonical types and constants from
lfx-v2-fga-sync/pkg/types and lfx-v2-fga-sync/pkg/constants.

- Remove local GenericFGAMessage struct
- Use fgatypes.GenericFGAMessage, GenericAccessData, GenericDeleteData
- Use fgaconstants.GenericUpdateAccessSubject and GenericDeleteAccessSubject
  instead of local UpdateAccessSubject/DeleteAccessSubject constants

🤖 Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
@andrest50 andrest50 requested a review from a team as a code owner April 13, 2026 22:34
Copilot AI review requested due to automatic review settings April 13, 2026 22:34
Comment thread go.mod
Comment thread go.mod
Comment thread go.mod Fixed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the voting service’s NATS publisher to use the canonical FGA-sync message types and subject constants, removing locally duplicated FGA message definitions and hardcoded subject strings.

Changes:

  • Replace the local GenericFGAMessage usage with lfx-v2-fga-sync/pkg/types (GenericFGAMessage, GenericAccessData, GenericDeleteData) in the NATS publisher.
  • Replace hardcoded FGA subject strings with lfx-v2-fga-sync/pkg/constants exported subjects.
  • Bump module dependencies to pull in the updated lfx-v2-fga-sync version and its transitive requirements.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
internal/infrastructure/eventing/nats_publisher.go Switches FGA message construction and publish subjects to shared lfx-v2-fga-sync types/constants.
go.mod Updates dependency graph to include the newer lfx-v2-fga-sync version and additional transitive deps.
go.sum Records updated module sums resulting from the dependency bump.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go.mod Outdated
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/jwx/v2 v2.1.6 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/linuxfoundation/lfx-v2-fga-sync v0.2.17-0.20260413222802-7f3a6be4424e // indirect
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

github.com/linuxfoundation/lfx-v2-fga-sync is now imported by this module (see internal/infrastructure/eventing/nats_publisher.go), so it shouldn't be marked // indirect in go.mod. Please run go mod tidy (or move it into the main require block) so the direct dependency is recorded correctly and the module files stay stable across builds.

Copilot uses AI. Check for mistakes.
Fix import ordering to satisfy golangci-lint gofmt check.

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
@andrest50 andrest50 force-pushed the andrest50/LFXV2-1460-generic-fga-message-pkg-voting branch from f722168 to b347473 Compare April 13, 2026 23:02
Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
Comment thread go.mod
@andrest50 andrest50 merged commit 69489cc into main Apr 14, 2026
9 checks passed
@andrest50 andrest50 deleted the andrest50/LFXV2-1460-generic-fga-message-pkg-voting branch April 14, 2026 17:32
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