Skip to content

feat(view metadata): implement the View spec - #600

Merged
zeroshade merged 4 commits into
apache:mainfrom
alessandro-nori:fix-view-metadata
Oct 22, 2025
Merged

zeroshade merged 4 commits into
apache:mainfrom
alessandro-nori:fix-view-metadata

Conversation

@alessandro-nori

@alessandro-nori alessandro-nori commented Oct 13, 2025 •

Copy link
Copy Markdown
Contributor

Implement the View Spec:

  • created a new package for view
  • moved existing related methods to new package
  • added a test to parse a view metadata file

@alessandro-nori alessandro-nori changed the title fix view metadata struct fields fix(view metadata): define schemas and versions as slices Oct 13, 2025
Comment thread catalog/internal/utils.go Outdated
"1": viewVersion,
},
"properties": props,
"versions": []interface{}{viewVersion},

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.

at this rate we might as well properly create the version type with the appropriate required/optional values etc.

@alessandro-nori alessandro-nori Oct 21, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I ended up creating the View definitions in a dedicate package. Let me know what you think

@alessandro-nori alessandro-nori changed the title fix(view metadata): define schemas and versions as slices feat(view metadata): implement the View spec Oct 21, 2025

@zeroshade zeroshade left a comment

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.

Looks good in general, just a few comments

Comment thread view/metadata.go Resolved
Comment thread view/metadata.go Resolved
Comment thread view/metadata.go
Comment on lines +82 to +84
metadataLocation = loc + "/metadata/view-" + uuid.New().String() + ".metadata.json"

viewUUID := uuid.New().String()

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.

Should these uuid's match?

@alessandro-nori alessandro-nori Oct 22, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, the second one identifies the view and won't change.
The first one will create a unique file name and it will be a new one for each new version of the view.

@zeroshade zeroshade left a comment

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.

looks good! Thanks!

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.

2 participants