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

chore(gitlab): Switch to upstream GitLab catalog providers with event support #1361

Closed
wants to merge 2 commits into from

Conversation

jesuino
Copy link
Contributor

@jesuino jesuino commented Jun 28, 2024

Description

Add support to events for Gitlab Org Provider

Which issue(s) does this PR fix

To test this follow the steps below:

  • Enable the plugin backstage-plugin-catalog-backend-module-gitlab-org-dynamic:
  - package: ./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-gitlab-org-dynamic
    disabled: false
  • Have a valid gitlab token
  • Fill the catalog with a group. You can use the public group gitlab-org. Bear in mind that this group is huge and take a while to load, hence add a good timeout

Here are the changes to app-config.yaml:

integrations:
  gitlab:
  - apiBaseUrl: https://gitlab.com/api/v4
    host: gitlab.com
    token: ${GITLAB_TOKEN}
catalog:
  import:
    {}
  providers:
    gitlab:
      development:
        group: gitlab-org
        orgEnabled: true
        host: gitlab.com
        rules:
        - allow:
          - Group
          - User
        schedule:
          frequency:
            minutes: 1
          initialDelay:
            seconds: 10
          timeout:
            minutes: 10

In Janus I can see the groups and users loaded in the catalog:

Screenshot from 2024-06-28 10-39-50
Screenshot from 2024-06-28 10-39-56

@jesuino jesuino requested a review from a team as a code owner June 28, 2024 14:58
@openshift-ci openshift-ci bot requested review from josephca and kim-tsao June 28, 2024 14:58
Copy link

openshift-ci bot commented Jun 28, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kadel for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1361!

@openshift-merge-robot
Copy link

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@jesuino
Copy link
Contributor Author

jesuino commented Jul 10, 2024

This PR may be obsolete due the update to Backstage 1.27 PR. That PR uses the new plugin "plugin-catalog-backend-module-gitlab-org" on version 0.0.1 and it exports the org provider already with event support.

Could you please confirm @schultzp2020 ? Thanks!

Gitlab Org 0.0.1 provider has Event Support:
https://github.com/backstage/backstage/blob/v1.27.0/plugins/catalog-backend-module-gitlab-org/src/catalogModuleGitlabOrgDiscoveryEntityProvider.ts#L44

Backstage 1.27.0 update changes on gitlab org wrapper:
4c1ee5d#diff-ad768d5b9a811ba84c7e962bba18d96d66f2dba2eb38694cb3b3edab63bcc622R30

@jesuino
Copy link
Contributor Author

jesuino commented Jul 12, 2024

I am closing this PR because this feature was covered by PR 1325.

@jesuino jesuino closed this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants