This repository was archived by the owner on Apr 15, 2024. It is now read-only.
FAB-5955 bypass jackson serialization and use local catalog instead#20
Open
mcriscolo-cs wants to merge 2 commits intomainfrom
Open
FAB-5955 bypass jackson serialization and use local catalog instead#20mcriscolo-cs wants to merge 2 commits intomainfrom
mcriscolo-cs wants to merge 2 commits intomainfrom
Conversation
laguirre-cs
previously approved these changes
Jul 28, 2023
Collaborator
laguirre-cs
left a comment
There was a problem hiding this comment.
Looks fine to me, just one minor comment.
Comment on lines
+219
to
+221
| LocalCatalog localCatalog; | ||
| try { | ||
| localCatalog = new LocalCatalog(specPath); |
Collaborator
There was a problem hiding this comment.
Is it not the same thing if you use the Catalog implementation from the CortexSession ? Catalog localCatalog = cortexSession.catalog()? If it is, then it might be preferable since the entrypoint for the user/developer is still the CortexSession
Contributor
Author
There was a problem hiding this comment.
So this is actually a separate instance of the LocalCatalog, the instance will act as a source. The example is all about updating/maintaining the resource entities before doing some work on them. The catalog in the CortexSession is a singleton and is our target catalog (may be pointing at a local or remote catalog)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Due to this issue: https://youtrack.jetbrains.com/issue/KT-41373 kotlinx serialization's generated serializer is not behaving well with Jackson JSON. This killed the catalog management example. Reimagined the example to use an instance of LocalCatalog and a spec directory with resources defined. These resources are deserialized and then loaded into the CortexSession catalog (local or remote) as it did in the original example