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

Issue 205 ddo handling #239

Merged
merged 47 commits into from
Feb 8, 2024
Merged

Issue 205 ddo handling #239

merged 47 commits into from
Feb 8, 2024

Conversation

jamiehewitt15
Copy link
Member

@jamiehewitt15 jamiehewitt15 commented Jan 24, 2024

Fixes #205

Changes proposed in this PR:

  • Ensuring that the right collection is used at all times, based on the version number in the ddo.
  • Searching all schemas when retrieving, updating or deleting DDOs.
  • Ensuring that we don't have the DDO in multiple collections at the same time.
  • Creating new schema for short DDOs which are used for deprecated assets.

@jamiehewitt15 jamiehewitt15 self-assigned this Jan 24, 2024
@jamiehewitt15 jamiehewitt15 marked this pull request as ready for review January 31, 2024 15:39
Copy link
Contributor

@paulo-ocean paulo-ocean left a comment

Choose a reason for hiding this comment

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

lgtm

@alexcos20 alexcos20 linked an issue Feb 5, 2024 that may be closed by this pull request
Copy link
Member

@mariacarmina mariacarmina left a comment

Choose a reason for hiding this comment

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

I have a question, looking at the code, I could not find the validation result when saving the DDO for metadata events (in the processor.ts). I think this issue should also include this part as well, not only at the database level, but correct me if I am wrong.

@jamiehewitt15
Copy link
Member Author

I have a question, looking at the code, I could not find the validation result when saving the DDO for metadata events (in the processor.ts). I think this issue should also include this part as well, not only at the database level, but correct me if I am wrong.

The focus of this issue is making sure that we're using the right schema and collection when entering or retrieving data from the database. When the metadata is saved into a collection from src/components/Indexer/processor.ts it uses the update method on the ddoDatabase class. The update method has been adjusted within this PR to ensure that the right collection is used, based on the version number in the schema.

@jamiehewitt15
Copy link
Member Author

Currently blocked by this issue as the short DDO can't pass the validation: #256

Could potentially implement a quick fix to bypass that issue:

  1. Avoid doing any validation on the short DDO until the validation function has been updated
  2. Add the extra missing fields back into the short DDO

@jamiehewitt15
Copy link
Member Author

Tests are passing now as I implemented a workaround: avoiding doing any validation on the short DDO until the validation function has been updated

Copy link
Member

@mariacarmina mariacarmina left a comment

Choose a reason for hiding this comment

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

lgtm

@jamiehewitt15 jamiehewitt15 merged commit 4930c93 into develop Feb 8, 2024
6 checks passed
@jamiehewitt15 jamiehewitt15 deleted the issue-205-DDO-handling branch February 8, 2024 07:12
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.

DDO Schema handling
5 participants