Skip to content
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

fix: Incorporate schema root into docID #2701

Merged
merged 4 commits into from
Jun 10, 2024

Conversation

AndrewSisley
Copy link
Contributor

Relevant issue(s)

Resolves #2688

Description

Incorporates schema root into docID.

The production changes are all done in the first two commits, I broke out the test changes to a separate commit to avoid confusion. There are no significant test changes - is just really really painful updating this as besides the docIDs and cids, the order in which results were returned changed.

@AndrewSisley AndrewSisley added bug Something isn't working area/db-system Related to the core system related components of the DB labels Jun 7, 2024
@AndrewSisley AndrewSisley added this to the DefraDB v0.12 milestone Jun 7, 2024
@AndrewSisley AndrewSisley requested a review from a team June 7, 2024 21:59
@AndrewSisley AndrewSisley self-assigned this Jun 7, 2024
Request: fmt.Sprintf(`mutation {
delete_Book(docID: "%s") {
Request: `mutation {
delete_Book(docID: "bae-b5c56d8f-b2f5-57f9-b371-4e9e04903e91") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: Is it necessary to hardcode the docID here? You're doing the effort to switch to NewDocIndex in a lot of places. It seems like these would also be good candidates for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do not have support for DocIndex within the body of requests yet. This PR makes use of DocIndex where it (in it's current state) made the update easier, but the goal of this PR is not to propagate the usage of DocIndex, or to improve it.

This PR makes a needed production change to the DocID generation, and then updated the tests in the easiest way available.

Copy link

codecov bot commented Jun 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.01%. Comparing base (067e378) to head (ed1893c).
Report is 1 commits behind head on develop.

Current head ed1893c differs from pull request most recent head bb230fe

Please upload reports for the commit bb230fe to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2701      +/-   ##
===========================================
+ Coverage    77.93%   78.01%   +0.08%     
===========================================
  Files          308      308              
  Lines        23134    23135       +1     
===========================================
+ Hits         18028    18048      +20     
+ Misses        3721     3708      -13     
+ Partials      1385     1379       -6     
Flag Coverage Δ
all-tests 78.01% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
client/document.go 71.80% <100.00%> (+0.50%) ⬆️

... and 12 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update efef0c9...bb230fe. Read the comment docs.

@AndrewSisley AndrewSisley requested a review from fredcarle June 10, 2024 15:21
Copy link
Collaborator

@fredcarle fredcarle left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

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

LGTM must have been a pain to update all these, cheers!

Glanced over / skipped reviewing the ID diffs but rest looks good.

@AndrewSisley AndrewSisley merged commit ea68087 into sourcenetwork:develop Jun 10, 2024
34 of 36 checks passed
@AndrewSisley AndrewSisley deleted the 2688-schema-doc-id branch June 10, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/db-system Related to the core system related components of the DB bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SchemaRoot is not incorporated into the docID
3 participants