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

Repackaging of egeria distribution & dependency streamlining #4667

Open
13 tasks
planetf1 opened this issue Feb 4, 2021 · 7 comments
Open
13 tasks

Repackaging of egeria distribution & dependency streamlining #4667

planetf1 opened this issue Feb 4, 2021 · 7 comments
Assignees
Labels
build-improvement Build improvements - maven, gradle, GitHub actions consumability Makes the software easier to use or understand. Includes docs, error messages, logs, API definitions gradle Gradle build (new initiative) pinned Keep open (do not time out)

Comments

@planetf1
Copy link
Member

planetf1 commented Feb 4, 2021

We have made a number of changes to reduce unnecessary dependency chains & ensure Egeria can more easily be actually run in the flexible ways the architecture supports.

Very recent changes have included ensuring the connection factory loads connectors dynamically, rather than having hard dependencies (maven), as well as offering an optional profile for building the server chassis without all OMASs etc in place, rather depending on runtime scanning of classes. We also have a growing number of connectors being developed externally which need to be easy to build and deploy

Currently the main egeria distribution

  • uses our 'full' server chassis
  • packages many connectors wil all dependencies

This issue is opened to streamline this such that we:

  • use our 'thin' server chassis
  • package connectors in a thinner form (without egeria dependencies)

The end result should be that the assembly can be used as today.

We will also need to handle side effects from this change, such as how developers run and test code, the execution of FVTs, changes to container deployment, error handling, documentation, whilst also working within restrictions of various tools such as maven

Benefits include

  • More flexible deployments matched with architecture
  • Potential Lower security attack service
  • Quicker & smaller build

Current list of potential tasks:

  • Add all dependencies for servers & clients into distribution (harmless, enabler)

  • Repackage connectors without dependencies (harmless, enabler)

  • Reapackage clients/samples without dependencies - update readme/docs as needed

  • Use skinny version of server chassis which will also require

    • Ensure FVTs work
    • Check impact on developers
    • Ensure container deployment works
  • Cleanup - Review samples/utilities (In distribution only where useful)

  • Cleanup - Check dependency chains

  • Update docs on writing connectors

  • Full Run through usual pre-release tests (charts, samples etc)

  • Test a custom connector works ok

  • Ensure changes work through maven (likely 1tst) and gradle (to follow)

Open related issues:

#1607 Rethink ConnectorConfigurationFactory < much of this is now likely addressed
#4455 investigate use/recommendation of 'provided' scope for connectors - this is a technical aid in some areas where a compile time dependency is needed ie for a connector, but where we know the runtime is present
#4280 Distribution open connector archives appears in both samples & utilities < just a cleanup
#3370 Gradle Build prototype < will continue this work. Currently need to get FVTs working
#2671 Cassandra Dependency < not tightly dependent, but somewhat related

cc: @mandy-chessell @lpalashevski @bogdan-sava

@planetf1 planetf1 added this to the 2021.02 (2.7) milestone Feb 4, 2021
@planetf1 planetf1 self-assigned this Feb 4, 2021
@planetf1 planetf1 added build-improvement Build improvements - maven, gradle, GitHub actions consumability Makes the software easier to use or understand. Includes docs, error messages, logs, API definitions labels Feb 4, 2021
@planetf1
Copy link
Member Author

@lpalashevski Are you currently working on any aspects in this area? Or do you have any additional input or related issues to link to?

@lpalashevski
Copy link
Contributor

lpalashevski commented Feb 11, 2021

Not at the momenet. I remember Bogdan was still testing some aspects with maven depencenes and the slim build for server chassis I believe its related to 4455. Lets align on the call today and plan how we continue/devide work on specific areas.

@planetf1
Copy link
Member Author

@bogdan-sava assigning this to you as I believe you were running with this.

@planetf1 planetf1 added the gradle Gradle build (new initiative) label Jun 2, 2021
@planetf1 planetf1 removed this from the 2021.05 (2.10) milestone Jun 30, 2021
@planetf1 planetf1 self-assigned this Aug 3, 2021
@github-actions
Copy link

github-actions bot commented Oct 9, 2021

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 github-actions bot added the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Oct 9, 2021
@planetf1 planetf1 added pinned Keep open (do not time out) and removed no-issue-activity Issues automatically marked as stale because they have not had recent activity. labels Oct 11, 2021
@bogdan-sava
Copy link
Contributor

The list of egeria connectors:

    • audit-log-console-connector
    • audit-log-event-topic-connector
    • audit-log-file-connector
    • audit-log-slf4j-connector
    • avro-file-connector
    • basic-file-connector
    • cassandra-metadata-extractor-connector
    • cohort-registry-file-store-connector
    • configuration-encrypted-file-store-connector
    • configuration-file-store-connector
    • csv-file-connector
    • data-engine-proxy-connector
    • data-folder-connector
    • elasticsearch-integration-connector
    • graph-repository-connector
    • inmemory-open-metadata-topic-connector
    • inmemory-repository-connector
    • janus-connector
    • kafka-integration-connector
    • kafka-open-metadata-topic-connector
    • omrs-rest-repository-connector
    • open-lineage-janus-connector
    • open-metadata-archive-file-connector
    • openapi-integration-connector
    • readonly-repository-connector
    • security-manager-tag-connector
    • security-officer-tag-connector
    • spring-rest-client-connector

As a first step I'll remove dependency for elasticsearch-integration-connector and graph-repository-connector, and add jar-with-dependencies for them.
And place the jars with dependencies in ./lib of distribution

@planetf1
Copy link
Member Author

Agree on making small incremental steps. I would suggest we don't add anything into 3.3 at this point, but target 3.4 after we branch next week. It will give time to ensure adequate review and informal testing.

The graph repo connector pretty much has non-egeria dependencies - though given the way the assembly works we will be duplicating them all into lib. This also needs doing in the gradle assembly. Should be Harmless except in size . I don't see it would cause issues with demos etc, but the docker image/helm charts should be tested as part of the change to ensure (specifically on the graph repo)

In the case of the elasticsearch connectoir we'll pull some libraries in too, which would benefit from the 'what is the chassis' / provided aspect of what is described above as this would remove the duplicated libraries

We also need to agree whether we'll go with copying into 'lib' of the distro or jar-with-dependencies in general. either should work when running the distribution but there are other pros/cons - we don't need to decide this right now and can go with the latter for now.

@planetf1
Copy link
Member Author

planetf1 commented Oct 21, 2021

A simplification - we don't need to over-analyze what the server chassis consists of for now, instead:

first, Connectors .. (and other modules that run on the server chassis) can be built as jar-with-dependencies (as in the example you gave of the janus connector) - and I would probably do this across all connectors

At this point our build will grow substantially, and there can be some confusion debuggin, - though should be functional. Probably a good idea for beginning of release cycle.

Then we can incrementally

  • remove connectors from the server chassis itself (ensuring they are in the assembly) [ impact only on intellij etc]
  • modify each connector to add server-chassis-spring=provided (maven+gradle), and remove unnecessary dependencies (this should shrink the lists a lot)

As we do this the build will shrink again.

Since we are always using 'server-chassis' as provided, that transitive dependency chain is always a true reflection of what is really provided for that release, so if something is removed that another module depends on, we'll automatically get a build error (symbol not found etc) & so be able to correct. ie it's adaptable.

If in future we can apply the same technique to OMASs, indeed for any modules that are not in the server chassis itself, but depend on that runtime and can assume it is there.

(We may need to add server-chassis-spring to the exclusion list for the dependency checker, or remote provided scope)

@lpalashevski lpalashevski pinned this issue Oct 21, 2021
@planetf1 planetf1 unpinned this issue Oct 29, 2021
@planetf1 planetf1 moved this to Currency in Egeria V4.0 Planning Oct 17, 2022
@planetf1 planetf1 moved this from Currency to Usability in Egeria V4.0 Planning Dec 5, 2022
@planetf1 planetf1 moved this from Done to In Progress in Egeria V4.0 Planning Dec 5, 2022
@planetf1 planetf1 removed their assignment May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-improvement Build improvements - maven, gradle, GitHub actions consumability Makes the software easier to use or understand. Includes docs, error messages, logs, API definitions gradle Gradle build (new initiative) pinned Keep open (do not time out)
Projects
None yet
Development

No branches or pull requests

3 participants