odpi / egeria

Egeria core
https://egeria-project.org
Apache License 2.0
806 stars 260 forks source link

Egeria Dojo/Developer Day Activities dependencies cannot be resolved #6722

Closed GinaIsaia closed 1 year ago

GinaIsaia commented 2 years ago

Is there an existing issue for this?

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.

Screenshot 2022-07-21 at 09 48 19

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.

Screenshot 2022-07-21 at 10 14 43

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

mandy-chessell commented 2 years ago

Thanks for raising these errors. I am in the mddle of another fix, but once that is done I will look at this

planetf1 commented 2 years ago

@ginalsaia I took a look and noticed a few errors

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

lpalashevski commented 2 years ago

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?

mandy-chessell commented 2 years ago

Agreed - what is the breaking change?

lpalashevski commented 2 years ago

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..

lpalashevski commented 2 years ago

sorry by breaking I mean it breaks the sample code not regression in egeria functionality :)

mandy-chessell commented 2 years ago

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.

github-actions[bot] commented 2 years ago

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.

planetf1 commented 2 years ago

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

mandy-chessell commented 2 years ago

There have been a number of changes recently that should help:

The next step is to:

I will do this when I change the dojo to use Gradle.

github-actions[bot] commented 1 year ago

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.

github-actions[bot] commented 1 year ago

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.

github-actions[bot] commented 1 year ago

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.