Skip to content

feat(dir): add referrer CIDs#1027

Merged
csirmazbendeguz merged 1 commit intomainfrom
feat/referrer-cids
Mar 17, 2026
Merged

feat(dir): add referrer CIDs#1027
csirmazbendeguz merged 1 commit intomainfrom
feat/referrer-cids

Conversation

@csirmazbendeguz
Copy link
Copy Markdown
Contributor

@csirmazbendeguz csirmazbendeguz commented Mar 9, 2026

similar to records, referrer should also have a CID

this PR adds referrer CIDs - when a referrer is pushed, a CID is generated similar to how it's generated for records. the generated CID is returned in the push response

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 9, 2026

The latest Buf updates on your PR. Results from workflow Buf CI / verify-proto (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped⏩ skipped✅ passedMar 16, 2026, 6:32 PM

@github-actions github-actions bot added the size/M Denotes a PR that changes 200-999 lines label Mar 9, 2026
@csirmazbendeguz csirmazbendeguz force-pushed the feat/referrer-cids branch 4 times, most recently from c70ecf2 to bd1f036 Compare March 10, 2026 09:36
@github-actions github-actions bot added size/S Denotes a PR that changes 50-199 lines and removed size/M Denotes a PR that changes 200-999 lines labels Mar 10, 2026
@csirmazbendeguz csirmazbendeguz marked this pull request as ready for review March 10, 2026 09:42
@csirmazbendeguz csirmazbendeguz requested a review from a team as a code owner March 10, 2026 09:42
@csirmazbendeguz csirmazbendeguz force-pushed the feat/referrer-cids branch 9 times, most recently from 542ab0d to a122fb4 Compare March 10, 2026 19:46
@github-actions github-actions bot added size/M Denotes a PR that changes 200-999 lines and removed size/S Denotes a PR that changes 50-199 lines labels Mar 10, 2026
@csirmazbendeguz csirmazbendeguz force-pushed the feat/referrer-cids branch 8 times, most recently from 4c932ae to d17f5c7 Compare March 11, 2026 15:18
@csirmazbendeguz csirmazbendeguz force-pushed the feat/referrer-cids branch 6 times, most recently from 1387da8 to d2b23fe Compare March 16, 2026 15:00
@csirmazbendeguz csirmazbendeguz linked an issue Mar 16, 2026 that may be closed by this pull request
2 tasks
Copy link
Copy Markdown
Member

@paralta paralta left a comment

Choose a reason for hiding this comment

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

Small comment, looking good overall 👍

type ReferrerStoreAPI interface {
// PushReferrer pushes a referrer to content store
PushReferrer(context.Context, string, *corev1.RecordReferrer) error
PushReferrer(context.Context, string, *corev1.RecordReferrer) (string, error)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
PushReferrer(context.Context, string, *corev1.RecordReferrer) (string, error)
PushReferrer(context.Context, string, *corev1.RecordReferrer) (*corev1.ReferrerRef, error)

we should return the new type here

Copy link
Copy Markdown
Contributor Author

@csirmazbendeguz csirmazbendeguz Mar 16, 2026

Choose a reason for hiding this comment

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

Actually, I don't like this pattern of passing around protobuf objects like this

I know that this is already a pattern in the project so I will change it for consistency for now...

But it's an anti-pattern IMO. The only protobuf-aware code should be the controllers:

  • The controller layer parses, validates & assembles the protobuf objects
  • The storage layer doesn't know how data is serialized (separation of concerns)

I didn't mention it as there are bigger issues, but now that you brought it up, maybe I should create an issue for this?

Signed-off-by: Bendegúz Csirmaz <csirmazbendeguz@gmail.com>
Copy link
Copy Markdown
Member

@paralta paralta left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@csirmazbendeguz csirmazbendeguz merged commit 20dcf79 into main Mar 17, 2026
33 checks passed
@csirmazbendeguz csirmazbendeguz deleted the feat/referrer-cids branch March 17, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 200-999 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add referrer CIDs

2 participants