Uploaded image for project: 'Red Hat Internal Developer Platform'
  1. Red Hat Internal Developer Platform
  2. RHIDP-5319

GitLab Org plugin throws MODULE_NOT_FOUND error

Create Doc EPIC for Fe...Prepare for Y ReleasePrepare for Z ReleaseXMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.4.1
    • 1.3.1, 1.3.3, 1.4.0
    • Dynamic plugins
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide
      In the previous version of {product-short}, the GitLab Org catalog backend plugin (`plugin-catalog-backend-module-gitlab-org`)and the Notification backend plugin (`plugin-notifications-backend`) fail to load when configured with a `MODULE_NOT_FOUND` error. This has been fixed by embedding the missing dependencies in the dynamic plugins.

      See similar issue https://issues.redhat.com/browse/RHIDP-5308
      Show
      In the previous version of {product-short}, the GitLab Org catalog backend plugin (`plugin-catalog-backend-module-gitlab-org`)and the Notification backend plugin (`plugin-notifications-backend`) fail to load when configured with a `MODULE_NOT_FOUND` error. This has been fixed by embedding the missing dependencies in the dynamic plugins. See similar issue https://issues.redhat.com/browse/RHIDP-5308
    • Bug Fix
    • Rejected
    • RHDH Dynamic Plugins 3267/3268, RHDH Dynamic Plugins 3269
    • Important

      Description of problem:

      Trying to use the GitLab Org discovery feature is not possible due to the plugin throwing a MODULE_NOT_FOUND error when RHDH is starting (error logs attached as a file to this issue).

      The plugin install succeeds and the RHDH instance does not crash, but the plugin does not sync entities when the RHDH container is running.

      The regular backstage-plugin-scaffolder-backend-module-gitlab-dynamic works fine, and will sync catalog-info.yaml files from repositories.

      Prerequisites (if any, like setup, operators/versions):

      Configure GitLab plugins:

       

      - package: ./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-gitlab-dynamic
        disabled: false
      - package: ./dynamic-plugins/dist/backstage-plugin-scaffolder-backend-module-gitlab-dynamic
        disabled: false
      - package: ./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-gitlab-org-dynamic
        disabled: false 

      Configure the GitLab integration:

      integrations:
        gitlab:
        - host: gitlab-gitlab.apps.cluster-GUID.GUID.sandbox1630.opentlc.com
          baseUrl: https://gitlab-gitlab.apps.cluster-GUID.GUID.sandbox1630.opentlc.com
          apiBaseUrl: https://gitlab-gitlab.apps.cluster-GUID.GUID.sandbox1630.opentlc.com/api/v4
          token: $GITLAB_TOKEN 

      Configure the GitLab catalog provider with orgEnabled: true

      providers:
        gitlab:
          selfHosted:
            host: gitlab-gitlab.apps.cluster-GUID.GUID.sandbox1630.opentlc.com
            orgEnabled: true
            rules:
              - allow: [Component, System, API, Group, User, Resource, Location, Domain, Template]
            schedule: # optional; same options as in TaskScheduleDefinition
              # supports cron, ISO duration, "human duration" as used in code
              frequency: { seconds: 10 }
              # supports ISO duration, "human duration" as used in code
              timeout: { seconds: 60 }
              initialDelay: { seconds: 15 } 

       

      Steps to Reproduce

      Configure the GitLab and GitLab Org plugins as shown in the prerequisites section.

      Actual results:

      The MODULE_NOT_FOUND error is raised by the backstage-plugin-catalog-backend-module-gitlab-org-dynamic.

      Expected results:

      Group and User entities should be synchronised to the software catalog.

      Reproducibility (Always/Intermittent/Only Once):

      Always.

      Build Details:

      RHDH Version: 1.3.0
      Backstage Version: 1.29.2
      Upstream: https://github.com/janus-idp/backstage-showcase/tree/release-1.3 @ 905edd21
      Midstream: https://gitlab.cee.redhat.com/rhidp/rhdh/-/commits/rhdh-1.3-rhel-9 @ f9a33e7f
      Build Time: 2024-09-26T11:49:45Z

      Additional info (Such as Logs, Screenshots, etc):

      Error log attached

              tkral@redhat.com Tomas Kral
              eshortis Evan Shortiss
              RHIDP - Dynamic Plugins
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: