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

Add Generated TMC TIM Topic #100

Merged
merged 16 commits into from
Nov 6, 2024
Merged

Add Generated TMC TIM Topic #100

merged 16 commits into from
Nov 6, 2024

Conversation

mwodahl
Copy link

@mwodahl mwodahl commented Sep 17, 2024

PR Details

Description

This PR adds a new Kafka topic that contains TIMs generated by the TMC. This includes TIMs deposited via the TimDepositController, offloaded files, and those deposited through the TimReceiver.

Motivation and Context

This update allows users to access a Kafka topic that only contains TMC-generated TIMs.

How Has This Been Tested?

This has been tested locally with docker-compose and Postman. TIMs were verified to be deposited to the new topic in the event they were generated by the TMC using kcat.

Types of changes

  • [ X ] Defect fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that cause existing functionality to change)

Checklist:

  • [ X ] I have added any new packages to the sonar-scanner.properties file
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [ X ] I have read the CONTRIBUTING document.
    ODE Contributing Guide
  • [ X ] I have added tests to cover my changes.
  • [ X ] All new and existing tests passed.

Copy link
Member

@dmccoystephenson dmccoystephenson left a comment

Choose a reason for hiding this comment

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

Looks good & the unit tests pass!

Copy link

@Michael7371 Michael7371 left a comment

Choose a reason for hiding this comment

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

Looks good. This extra topic will be nice to have!

Copy link

@payneBrandon payneBrandon left a comment

Choose a reason for hiding this comment

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

Discussed offline, but we'll want to tweak this to push the same TIM data as the topic.OdeTimJson, but with the additional asn1 field filled out. Since this is the encoded path, getting the combo is more challenging. One option we talked about is adding a key to the metadata (which is maintained through encoding) and using KTable on top of the ode tim topic to find the corresponding json and combine.

@mwodahl
Copy link
Author

mwodahl commented Oct 23, 2024

Updated this to include an additional topic, KeyedOdeTimJson, that has a unique identifier attached to the TIM JSON that allows for later querying in the Asn1EncodedDataRouter. I added a new topic instead of reusing the OdeTimJson topic as it prevents unnecessary information from being included in the OdeTimJson topic and allows for pushing a null record with the generated TIM UUID to erase the TIM record from TimJson-Store after it's been retrieved. I've also updated the diagrams to reflect these changes.

Copy link
Member

@dmccoystephenson dmccoystephenson left a comment

Choose a reason for hiding this comment

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

Looks good & the unit tests pass, I just had one question/suggestion

@payneBrandon
Copy link

@mwodahl looks like we have a merge conflict from Matt's properties changes

Copy link

@Michael7371 Michael7371 left a comment

Choose a reason for hiding this comment

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

From my local testing, it looks like the topic.OdeTimJson still is missing the asn1 field. Is this the expected behavior?

@mwodahl
Copy link
Author

mwodahl commented Oct 30, 2024

From my local testing, it looks like the topic.OdeTimJson still is missing the asn1 field. Is this the expected behavior?

Yep, that's expected. The asn1 field will only be present in the topic.OdeTimJsonTMCFiltered topic.

Copy link

@payneBrandon payneBrandon 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

@dmccoystephenson dmccoystephenson left a comment

Choose a reason for hiding this comment

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

Just the one comment

Copy link

@Michael7371 Michael7371 left a comment

Choose a reason for hiding this comment

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

LGTM!

@drewjj drewjj merged commit 1465b19 into dev Nov 6, 2024
3 of 4 checks passed
@drewjj drewjj deleted the generated-tmc-topic branch November 6, 2024 22:45
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.

5 participants