moudemans
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- type: article title: "Egeria: Quality and Evolution" date: 2022-03-21T15:31:00+01:00 draft: false # set to false if your team gives consent to publish this post publicly --- # Egeria: Quality and Evolution ## Introduction Egeria is an open-source project that provides open metadata governance, allowing to easily share metadata across systems. In our previous essays, we have discussed Egeria's product vision and the software architecture. In this essay, we discuss the implemented key quality attributes, look at the code and process quality, code change hotspots, and technical debt. ## Implemented key quality attributes The system's key quality attributes, which you can find in the architectural design principles[^video], consist of the following: autonomic, integratable, adaptable, extensible, fair ecosystem, trustworthy, inclusive, and educational. The figure below shows that most of the developer platform and the deployment resources are released (green). These two categories implement the quality attributes: autonomic, adaptable, and extensible. The Egeria developers still need to work on the Kubernetes operators for adaptability as it is not yet ready to be released (orange). Also, integration capabilities are still under development as each vendor can have a very different workflow, however, there is already a solid foundation to extend on. Even though there has been a lot of work done on the governance solutions, which are important for the trustworthiness of the system, it needs more work before they can be fully released. Last but not least, the Egeria team is working to increase the educational value of the system. The Dojo[^dojo] is the first step, but as can be seen, they want to add more components to increase the educational value of the system. The Dojo[^dojo]: is already a good first step, but as can be seen, they want to add a lot more there. <!-- A good foundation exists for integration, but the team is still expanding these capabilities. This expansion is necessary as each vendor can have a drastically different workflow compared to vendors integrated before. --> {{<image file="roadmap_coloured.png" caption="Figure 1 - Overview of the status of the functions in Egeria today (Source: https://egeria-project.org/release-notes/roadmap/#current-status)">}} ## Quality process Egeria has multiple quality principles in place. This includes automated testing, which we will discuss later in this essay, contributor roles and code change processes. Below we will summarize Egeria's guidelines when it comes to code contributions. Egeria differentiates between its members [^projectorg]. Contributors are the active community members and maintainers who have much experience with Egeria. Currently, there are 13 recognized maintainers [^maintainerlist] and 14 contributors [^contributorlist] who take responsibility for the quality of the project. The code change process is very similar to the common issue lifecycle in many Github projects. It starts with writing the code. Egeria provides detailed coding guidelines containing rules the contributors should follow, emphasizing responsibility for wide applicability and longevity [^codeguidelines]. More specifically, the guidelines instruct the contributors to follow a similar and consistent writing style [^formatting], write documentation [^documentationguideline] and create tests. Additionally, they emphasized build warnings and extra dependencies, both of which should be avoided. Before code is written, however, an issue lifecycle[^wayofworking] is started. An issue can be created by any Github user. The issue will then be handled by a maintainer who can evaluate the issue and assign different labels like milestones, relevant tags, owner, and more. The owner of the issue can then start working on the solution, creating a Pull Request (PR) and keep it updated. If the issue is not being worked on, it will be labelled as stale and eventually be closed. When an issue is being worked on, it is recommended to do this on a fork. Only when code has been finished, tested and reviewed it should be merged into the master branch. There are a few guidelines[^reviewguideline] provided by Egeria to review a PR. This mostly includes code quality review, obvious errors check, no logging to console and documentation updates. Besides reviews by contributors and maintainers, there are also automated checks, these will be elaborated on later in the essay. If a change is large or when multiple changes have to be applied at once, an experienced contributor can open a feature branch, allowing the code to be first merged in there and afterwards in the master. ## Quality culture In the previous section, we discussed the intended way of working Egeria. We sampled merged PRs from the past six months to assess to what extent this quality process is adhered to. When creating a PR or opening an issue there are different templates the user can choose from. Each of these templates consists of a form with multiple questions that should be answered. When suggesting an enhancement for example you are also asked to provide possible alternative solutions. By using templates it forces people to provide the necessary information [^template1] [^template2] and think about the problem in more detail, leading to a higher quality of code and a more fruitful discussion. A significant number of the sampled PRs do not discuss GitHub before being merged [^pr1] [^pr3] [^pr4]. Moreover, some of the PRs have no related issue assigned [^pr2] [^pr3]. It could be that the developers use a different communication channel to discuss open issues and PRs, as they actively promote their slack and weekly developer meetings. However, from our investigation, it seems like there is little documented evaluation and the prescribed work process is not always followed. When a PR is created, code analysis is run by SonarCloud[^sonarcloud] and DependaBot[^dependabot]. These analysis tools check for code quality and added dependencies. This analysis helps the developers minimize code warnings and extra dependencies. ## Testing Egeria's open-source and extensible nature drives the design of its testing framework. It is not good enough to test Egeria software on its own. Instead, all software connected to these large integrated networks needs to conform to the standards that consumers expect of Egeria. Egeria's testing framework[^test_mod] consists of three main categories: unit tests, functional verification tests (FVTs), and an open metadata conformance test suit. The unit testing allows the testing of single components. The FVTs test multiple components to ensure they function correctly together. They typically load test data into the in-memory repository and use the APIs to run the tests. These tests verify whether those components support all functionality that consumers expect. The open metadata conformance suite[^conformance] provides a testing framework to help the developers integrate a specific technology into the open metadata ecosystem. This framework currently has two implemented workbenches: The platform workbench and the repository workbench. The platform workbench tests the rest API of the OMAG server platform and the repository workbench checks the REST and event-based API of an open metadata repository. Future workbenches will focus on testing other API and performance-based tests. Each workbench has a set of profiles with mandatory and optional requirements specific to a system. The mandatory requirements ensure that the software cannot harm other systems it shares metadata with Software that can show that it passes at least the mandatory tests is allowed to put an Egeria conformance mark on their software. Egeria gives extra credit when the technology meets the optional requirements. This mark helps build trust between consumers and third-party integrations. It enables consumers to run these tests to verify the correctness of the mark. As can be seen in the coverage report[^sonarcube_sum] provided by Egeria the code coverage is low with only ~12% on the main branch. This coverage is calculated only using the unit tests as the FVT's cannot be run without the correct environments. This is problematic and is known at Egeria [^coverage_issue] as it is now extremely difficult to get a good overview of what has been tested and to what extent. To assist the developers of Egeria in quickly finding errors, they make use of Continuous Integration[^cont_int]. Egeria implements this using the GitHub Actions framework[^github_actions]. <!-- GitHub Actions allows developers to create multiple workflows to automate the build, test and deployment pipeline. These workflows trigger when an event occurs in the repository. Events range from pushing code, creating a Pull Request to creating an issue, and can also be triggered manually. The key workflows of this framework are as follows: - Manually run on release to build the entire project and publish container images. - Publish JavaDoc on merge into master. - Build the project with Maven and Gradle after PR or Push to master, feature branches and release branches. - CodeQL[^codeQL] analysis on PR to master, feature branches and release branches. --> ## Code hotspots To better assess Egeria's code quality we investigated code hotspots in Egeria (e.g. components in the system that are under heavy development and frequently changed). We made use of CodeScene[^CodeScene] to analyze Egeria’s codebase and find these hotspot components. This analysis, which looked at Egeria during the past year, can be seen in figure 2. {{<image file="CodeSceneBubble.png" caption="Figure 2 - Overview of hotspots in Egeria, generated using CodeScene">}} There is one class that immediately stands out, having both low code health and being a hotspot, namely the “OpenMetadataAPIGenericHandler”. This class has 47 commits the past year, is over 9000 lines of code, and has been increasing in size over the past year [^CodeScene]. Many of these functions have a large number of arguments (10+). Even more interesting is that the analysis of “OpenMetadataAPIGenericHandler” shows a total of 227 code smells, 3 potential bugs, and 0.0% unit test coverage [^sonarcloud_handler]. It seems concerning that these issues are present despite all the code guidelines and the fact Egeria is using SonarCloud. <!-- The OpenMetadataAPIGenericHandler is a handler that acts as an intermediate between the OMAS requests, which provide domain-specific services for tools to integrate with, and the OMRS, which provides access to metadata repositories. --> The OpenMetadataAPIGenericHandler is a handler that acts as an intermediate between the metadata access service and the repository service. The fact that it is an intermediate component explains the frequent changes being made. Additionally, it is stated in the readme that this part of Egeria is still under active development [^github_generichandlers], thus it is to be expected to be a hotspot for the foreseeable future. There are a couple of other interesting hotspots most being part of OMAS, dealing with the integration of services and open metadata[^CodeScene]. For all of these, it is also stated they are still under active development. While not optimal their code health is much better than the OpenMetaDatAPIGenericHandler, in addition to all of these classes being of a much more manageable size [^CodeScene]. With the side note that they still contain code-smells and lack coverage [^sonarcloud] ## Technical Debt To inspect the technical dept of the project, we have used SonarQube[^sonarqubeabout]. The tool has been widely accepted and used across the IT community [^sonarqube1][^sonarqube2][^sonarqube3] and is also integrated with Egeria [^egeriasonar]. SonarQube gives the Egeria project a technical depth score of A, meaning it is maintainable. By maintainable, SonarQube means the technical Depth is less than 5%. More accurately, the debt ratio is 1.5% and the total debt is 665 days where a day corresponds to 8 hours of work. How does SonarQube calculate the technical debt? It is the estimated time required to fix all Maintainability issues or code smells [^TechnicalDebt]. These include vulnerability and reliability issues as having hard to change code. The technical debt ratio is calculated by dividing the technical debt by the development cost. The development cost is calculated by the cost to develop 1 line of code (0.06 days) times the number of lines of code [^TechnicalDebtRatio]. In the figure below you can see the debt per code parts plotted per line of code. The outlier in this figure on the top right is the 'OpenMetadataTypesArchive1_2.java' class. This is used for educational purposes like open metadata demos, hands-on labs and samples[^codeEducation]. {{<image file="SonarQube_TechnicalDebt.png" caption="Figure 3 - Technical Debt overview Egeria, generated with SonarQube">}} Maybe the more interesting parts of the code are the parts that are rated worst. Egeria does not have an E rating (50%-100%) but does have some D ratings (21%-50%), seen in the figure below. These classes are parts of FVTs. Even though there are classes with a very low rating, it has minimal impact as these classes contain only a few lines. {{<image file="SonarQube_TechnicalDebt2.png" caption="Figure 4 - Technical Debt D and E rating Egeria, generated with SonarQube">}} ## Conclusion Egeria has firm standards in place with regards to creating issues, contributing to the project and reviewing merge requests. Additionally, analysis tools and Continous Integration is used to increase code quality. However, after empirically investigating the PRs created on GitHub, investigating the code quality, and the lack of an overview on what is currently tested, there are certainly improvements that could be made to improve overall workflow and code quality. ## References [^github_actions]: https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions [^codeQL]: https://codeql.github.com/ [^dependabot]: https://github.com/dependabot [^sonarcloud]: https://sonarcloud.io/project/overview?id=odpi_egeria [^sonarcloud_handler]: https://sonarcloud.io/project/issues?fileUuids=AXUwjjTq8Z59dRxV-Iua&types=CODE_SMELL&id=odpi_egeria [^CodeScene]: https://codescene.io/projects/24556/jobs/404511/results/code/biomarkers [^github_generichandlers]: https://github.com/odpi/egeria/tree/master/open-metadata-implementation/common-services/generic-handlers [^codeEducation]: https://github.com/odpi/egeria/tree/master/open-metadata-resources [^TechnicalDebtRatio]: https://docs.sonarqube.org/latest/user-guide/metric-definitions/ [^TechnicalDebt]: https://docs.sonarqube.org/latest/user-guide/concepts/ [^codeguidelines]: https://egeria-project.org/guides/contributor/guidelines/ [^wayofworking]: https://egeria-project.org/guides/contributor/process/ [^formatting]: https://egeria-project.org/guides/documentation/formatting/#link-within-docs-using-absolute-links [^documentationguideline]: https://egeria-project.org/guides/documentation/guide/ [^template1]: https://blog.natterstefan.me/discover-the-benefits-you-get-with-github-templates [^template2]: https://madeintandem.com/blog/tandem-uses-pull-request-templates/ [^projectorg]: https://egeria-project.org/guides/project-operations/#community-members [^contributorlist]: https://github.com/odpi/egeria/blob/master/CONTRIBUTORS.md [^maintainerlist]: https://github.com/odpi/egeria/blob/master/MAINTAINERS.md [^sonarqubeabout]: https://www.sonarqube.org/about/ [^sonarqube1]: https://www.trustradius.com/products/sonarqube/reviews [^sonarqube2]: https://www.g2.com/products/sonarqube/reviews [^sonarqube3]: https://www.gartner.com/reviews/market/application-security-testing/vendor/sonarsource/product/sonarqube [^egeriasonar]: https://sonarcloud.io/project/overview?id=odpi_egeria [^reviewguideline]:https://egeria-project.org/guides/contributor/guidelines/#review-code-changes [^sonarcube_sum]: https://sonarcloud.io/summary/overall?id=odpi_egeria [^test_mod]: https://github.com/odpi/egeria/tree/master/open-metadata-test [^conformance]: https://github.com/odpi/egeria/tree/master/open-metadata-conformance-suite [^video]: https://www.youtube.com/watch?v=n-Xm8_WIyBM&ab_channel=MandyChessell [^dojo]: https://egeria-project.org/education/egeria-dojo/ [^roadmap]: https://egeria-project.org/release-notes/roadmap/ [^pr1]: https://github.com/odpi/egeria/pull/6233 [^pr2]: https://github.com/odpi/egeria/pull/6163 [^pr3]: https://github.com/odpi/egeria/pull/6131 [^pr4]: https://github.com/odpi/egeria/pull/5957 [^coverage_issue]: https://github.com/odpi/egeria/issues/3969 [^cont_int]: https://docs.github.com/en/actions/automating-builds-and-tests/about-continuous-integration

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully