egeria
egeria copied to clipboard
Egeria Dojo/Developer Day Activities dependencies cannot be resolved
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
At the moment I'm following the Developer Day Dojo Activities, and am at the "Writing a integration connector" part (project egeria-dojo4). It is asking me to create main/java directory and paste several skeleton codes into different java classes. After that I have to "Resolve the Egeria dependencies in all 4 of the java classes for your connector." Some of them seem to be solved by changing "class" to "enum" (in TopicCataloguingAuditCode and TopicCataloguingErrorCode).
But not all dependencies can be resolved as shown in the screenshot.
I've had some problems resolving dependencies with an earlier part of the dojo too (egeria-dojo1 when making the AssetListen class), and decided to skip past it back then and move on.
Expected Behavior
I expected all java classes to be be resolved as asked, after adding the pom.xml file and going back to the classes to fix them. But it seems some part is missing to resolve the dependency of KafkaTopicsCaptureIntegrationProvider in egeria-dojo4 (and AssetConsumerEvent in egeria-dojo1).
Steps To Reproduce
Just following the Developer Day Dojo Activities will result in this problem occurring.
Environment
Egeria: 3.8 / 3.11
Java: 11.0.15 (adoptopenjdk hotspot)
Working in IntelliJ IDEA 2022 Build #IC-221.5921.22 with Apache Maven 3.8.6
_Changing the metadata versions (3.8 tot 3.11 and with or without -SNAPSHOT) does not change anything._
Any Further Information?
No response
Thanks for raising these errors. I am in the mddle of another fix, but once that is done I will look at this
@ginalsaia I took a look and noticed a few errors
- Agree - you need those enum changes & also update the Egeria project version to 3.11 (you could also change the version tag for the project you are creating, though this isn't important)
- At line 256 for the code to paste into TopicCataloguingConnector you'll see an extra 'n' on a single line - syntax error
- tip: For searching for classes I go to search.maven.org and type 'c:myclassname' (or fc:fully.qualified.classname) to search for packages containing a class. IntelliJ also has some built in search, but I've not found it as good
- In TopicCataloguingConnector change KafkaTopicsCaptureIntegrationProvider to TopicCataloguingProvider
With this I got a clean build (though have not continued on the exercise). May help until @mandy-chessell checks & confirms the above is appropriate
Based on my quick check, we have (breaking?) change introduced in asset-consumer-api version 3.7. This from release perspective seems okay since this is not yet released component. The problem however sows for the tutorials where we are using asset-consumer-api code in the dojo1 exercise with AssetListen and our sample pom references 3.8-SNAPSHOT. At the time tutorial was created this snapshot version was probably fine but then 3.7 included the change.
To verify I reverted to previous stable version 3.6 and the sample code complies fine.
Question is
a) do we fix this by setting the version to stable 3.6 in all dojo sample pom files (fixing the sample code at the time of the stable release) b) do we update the samples to include the latest change and keep it up to date (but also fix it to stable version i.e. 3.10)
I think we should go with option b).
any other thoughts?
Agreed - what is the breaking change?
Agreed - what is the breaking change?
Some of the event beans (AssetEvent, NewAssetEvent, UpdateAssetEvent...) are now removed with the event handling improvement change. Now there is I think single bean class for all so the sample needs update to use this new model..
sorry by breaking I mean it breaks the sample code not regression in egeria functionality :)
Ah - I understand :) I normally run these samples each release - and the ones in egeria-dev-projects and egeria-samples and update the poms so they are running on the latest release - however, I did not do this recently because I have been doing the refactor of the generic handlers. I will get to this as soon as I can.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.
We've just branched for 3.12, so will need to test/update for that release.
I wonder if we need to update the release process docs at https://egeria-project.org/guides/contributor/release-process/?h=release+proces & the template at https://github.com/odpi/egeria/blob/master/.github/ISSUE_TEMPLATE/release.yml so that we ensure these samples will work at the point of release. This may include figuring out how we can ensure the code in the docs is functional in a semi-automated way
There have been a number of changes recently that should help:
- the dojo-built artifacts are now at 1.0-SNAPSHOT. This means that only the open metadata release level in the pom/build.gradle needs to be updated to change the release it is working with.
- the Egeria OMASs now use the ElementClassification and ElementHeader from the Open Connector Framework rather than having their own implementations. This means there should be no choice needed when resolving dependencies.
The next step is to:
- document how to set the release correctly in the dojo itself.
- document the imports that should be resolved so that the participant can add them explicitly if IntelliJ is not finding them.
I will do this when I change the dojo to use Gradle.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.