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
Add event support for the Catalog Plugin GitLab Discovery Entity providers #23373
Add event support for the Catalog Plugin GitLab Discovery Entity providers #23373
Conversation
Changed Packages
|
Uffizzi Cluster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amazing work 👏
Just added a tiny comment about the changesets, otherwise ✨
plugins/catalog-backend-module-gitlab/src/providers/GitlabOrgDiscoveryEntityProvider.ts
Outdated
Show resolved
Hide resolved
plugins/catalog-backend-module-gitlab/src/providers/GitlabOrgDiscoveryEntityProvider.ts
Outdated
Show resolved
Hide resolved
plugins/catalog-backend-module-gitlab/src/providers/GitlabOrgDiscoveryEntityProvider.ts
Outdated
Show resolved
Hide resolved
plugins/catalog-backend-module-gitlab/src/providers/GitlabOrgDiscoveryEntityProvider.ts
Outdated
Show resolved
Hide resolved
plugins/catalog-backend-module-gitlab/src/providers/GitlabOrgDiscoveryEntityProvider.ts
Outdated
Show resolved
Hide resolved
plugins/catalog-backend-module-gitlab/src/providers/GitlabOrgDiscoveryEntityProvider.ts
Outdated
Show resolved
Hide resolved
plugins/catalog-backend-module-gitlab/src/providers/GitlabOrgDiscoveryEntityProvider.ts
Outdated
Show resolved
Hide resolved
4db44fb
to
580dcf8
Compare
Hi @vinzscam ! I had some issues with my branch and had to recreate it (I know, I'm such a git newbie! :D ). thanks again in advance!!! :) |
Yeah that
|
093d668
to
24b2bbb
Compare
Hi guys, the suggested changes have been made. Could you please take a look? |
2bad1cc
to
07eb276
Compare
Hi @awanlin ! I've changed the docu a little bit. Could you please review? :) |
Hi @freben , done! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding in the schedule details to the docs @elaine-mattos, I left two comments but they are the same. As I haven't reviewed the code just the docs I'm only leaving this review as a comment
docs/integrations/gitlab/org.md
Outdated
groupPattern: '[\s\S]*' # Optional. Filters found groups based on provided pattern. Defaults to `[\s\S]*`, which means to not filter anything | ||
schedule: # optional; same options as in TaskScheduleDefinition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this true in all cases that it's optional? If I'm using the New Backend System would that not then be required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @awanlin !
I changed this line. Could you please check? :)
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
Signed-off-by: elaine-mattos <elaine.mattos@gmail.com>
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
282eeb7
to
4594531
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, phew! I left some comments that can be deferred to a follow-up PR some time down the line. Do check them out. But for now,
As this provider is not one of the default providers, you will first need to install the Gitlab provider plugin: | ||
|
||
```bash | ||
# From your Backstage root directory | ||
yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-gitlab | ||
yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-gitlab @backstage/plugin-catalog-backend-module-gitlab-org |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really both?
coreServices, | ||
createBackendModule, | ||
} from '@backstage/backend-plugin-api'; | ||
import { GitlabOrgDiscoveryEntityProvider } from '@backstage/plugin-catalog-backend-module-gitlab'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree that the implementation should really be moved over to the package where it belongs, and deprecated in the old place. If in a follow-up PR - fine. But should probably be done soonish :)
"@backstage/plugin-catalog-node": "workspace:^", | ||
"@backstage/plugin-events-node": "workspace:^", | ||
"@gitbeaker/rest": "^40.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"@gitbeaker/rest": "^40.0.3", | |
"@gitbeaker/rest": "^39.25.0", |
if that's okay, to align with the other deps in the repo - this should clean up the yarn.lock diff
] | ||
} | ||
}, | ||
"version": "0.3.15-next.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what happened with the field order sorting here :) version is usually way up at the top etc, but we can sort (hah!) that out some other time
* @public | ||
*/ | ||
// <<< EventSupportChange: implemented EventSubscriber interface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
@@ -96,7 +133,7 @@ export class GitlabOrgDiscoveryEntityProvider implements EntityProvider { | |||
const integration = integrations.byHost(providerConfig.host); | |||
|
|||
if (!providerConfig.orgEnabled) { | |||
return; | |||
throw new Error(`Org not enabled for ${providerConfig.id}.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really a safe change?
Thank you for contributing to Backstage! The changes in this pull request will be part of the |
Hey, I just made a Pull Request!
Add events support for the GitLab Entity Provider modules.
Refs: RFC: Event Subscription Mechanism for Cross-Plugin Module Integration in the New Backend System #22393 and 🚀 Feature: Add Events Support for GitlabDiscoveryEntityProvider and GitlabOrgDiscoveryEntityProvider #21553
✔️ TODO List
✔️ Checklist
Signed-off-by
line in the message. (more info)