Skip to content

Track metadata in result maps #1002

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

Merged
merged 13 commits into from
Apr 23, 2025
Merged

Track metadata in result maps #1002

merged 13 commits into from
Apr 23, 2025

Conversation

zonotope
Copy link
Contributor

This patch begins to unify fuel, policy, and file metadata tracking under a track- api (more to come on that in subsequent prs). It also cleans up some of the commit! process by removing the apply-stage! function which was made redundant by the new tracking apis. Now commits will contain any fuel, policy, or file metadata directly within the returned commit result if the tracking was turned on.

@zonotope zonotope requested a review from a team April 22, 2025 14:39
@@ -16,7 +16,7 @@
[fluree.db.nameservice :as nameservice]
[fluree.db.serde.json :refer [json-serde]]
[fluree.db.storage :as storage]
[fluree.db.track :as track]
[fluree.db.track :as track :refer [track?]]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we avoid using :refer? I heavily depend on project search to find usages when making changes, and while I can handle non-namespace-qualified function calls it slows me down a lot because I have to deal with many false positives.

I also think it's nice to have a visual call-out when I've got a dependency on another namespace.

I'm ok with referring macros, though, that's a small enough group that it's not hard to keep track of and because of widespread use the space efficiency of no namespace is more bang for the buck.

:result result
:time (util/response-time-formatted start-time)
:fuel (fuel/tally fuel-tracker)}
:db staged-db
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like a breaking change, I don't know if nexus depends on this return value or not but we should give them a heads up - I do know they are heavy users of the :meta opt.

Copy link
Contributor

@dpetran dpetran left a comment

Choose a reason for hiding this comment

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

🚜

Do you want me to hold off on merging my fuel tracking PR and rebase on this? #1000

@zonotope zonotope merged commit bdddcca into main Apr 23, 2025
8 checks passed
@zonotope zonotope deleted the feature/fuel-metadata branch April 23, 2025 01:16
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