-
Notifications
You must be signed in to change notification settings - Fork 192
Gitlab data source connector #3770
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
Conversation
test_gitlab_connector.py
Outdated
| @@ -0,0 +1,193 @@ | |||
| #!/usr/bin/env python3 | |||
| """Quick test script for GitLab connector with real credentials.""" | |||
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.
This is to be deleted, just providing it for anyone doing an early review if they want to test how output looks, if pagination works etc.
f71c74a to
62b5f30
Compare
requirements/framework.txt
Outdated
| aiogoogle==5.3.0 | ||
| uvloop==0.20.0; sys_platform != 'win32' | ||
| fastjsonschema==2.16.2 | ||
| pydantic==2.10.6 |
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.
Using pydantic to parse responses from APIs - I think this dependency is worth picking up. Makes the code much more readable and we will get descriptive errors when things fail if the API changes, and the failure will be when we parse the response, not down the line in the code when we try to access an unstructured dictionary.
de63dbd to
0805ea2
Compare
- Implements GitLab connector using GraphQL API and Work Items API - Fetches projects, issues, merge requests, epics, and releases - Includes pagination support and remote validation - Adds functional tests and unit tests with >92% coverage
4112983 to
5962dd0
Compare
76152f5 to
322b99e
Compare
263b24a to
724f8b8
Compare
@artem-shelkovnikov yeah that's on me. I posted what I got by printing out docs as I'm running get_docs. In our connectors framework, file contents like this readme are structured to be fetched and extracted as a separate lazy download operation. The get_docs method yields tuples of (document, download_func) where the download function is called later by the framework to fetch the actual content. |
daaf344 to
1cfe01d
Compare
f4bed7a to
93ba23d
Compare
2ec1ef2 to
3a066de
Compare
- Change connectors.source to connectors_sdk.source in client, datasource, and tests - Simplify validation_utils.py module docstring to 3 concise lines
cd6deb5 to
06c9888
Compare
09629df to
6c65e09
Compare
|
@artem-shelkovnikov addressed comments and concern around resilience to changes to the API's response format. Would you mind doing a last 👀 and ✅ ? |
|
@Apmats sorry I missed your ping, looking! |
artem-shelkovnikov
left a comment
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 think it's good to go!
I could miss some things here and there due to the size of the PR, but it's a great starting point that we can iterate on in future.
|
@artem-shelkovnikov thank you! |
## Closes https://github.com/elastic/connectors-py/issues/### <!--Provide a general description of the code changes in your pull request. If the change relates to a specific issue, include the link at the top. If this is an ad-hoc/trivial change and does not have a corresponding issue, please describe your changes in enough details, so that reviewers and other team members can understand the reasoning behind the pull request.--> Previously merged in #3770 - there are a few type checker errors (I assume due to bumping pyright?) - fixing them through type narrowing. ## Checklists <!--You can remove unrelated items from checklists below and/or add new items that may help during the review.--> #### Pre-Review Checklist - [x] this PR does NOT contain credentials of any kind, such as API keys or username/passwords (double check `config.yml.example`) - [x] this PR has a meaningful title - [x] this PR links to all relevant github issues that it fixes or partially addresses - [ ] if there is no GH issue, please create it. Each PR should have a link to an issue - [x] this PR has a thorough description - [x] Covered the changes with automated tests - [x] Tested the changes locally - [x] Added a label for each target release version (example: `v7.13.2`, `v7.14.0`, `v8.0.0`) - [ ] For bugfixes: backport safely to all minor branches still receiving patch releases - [x] Considered corresponding documentation changes - [x] Contributed any configuration settings changes to the configuration reference - [x] if you added or changed Rich Configurable Fields for a Native Connector, you made a corresponding PR in [Kibana](https://github.com/elastic/kibana/blob/main/packages/kbn-search-connectors/types/native_connectors.ts) #### Changes Requiring Extra Attention <!--Please call out any changes that require special attention from the reviewers and/or increase the risk to availability or security of the system after deployment. Remove the ones that don't apply.--> - [ ] Security-related changes (encryption, TLS, SSRF, etc) - [ ] New external service dependencies added. ## Related Pull Requests <!--List any relevant PRs here or remove the section if this is a standalone PR. * https://github.com/elastic/.../pull/123--> ## Release Note <!--If you think this enhancement/fix should be included in the release notes, please write a concise user-facing description of the change here. You should also label the PR with `release_note` so the release notes author(s) can easily look it up.-->
Closes https://github.com/elastic/search-team/issues/11093
This PR includes a new data source / connector for Gitlab - mainly fetching project management related entities.
We fetch and generate docs for:
Projects - Repository metadata (name, description, visibility, stars, forks, etc.)
Issues - Project issues with full metadata (assignees, labels, comments, status)
Epics - Group-level epics for tracking larger initiatives (Premium/Ultimate tier)
Merge Requests - Code review requests with discussions, approvals, and reviewers
Releases - Version releases with changelogs, milestones, and asset links
Files - README files (.md, .rst, .txt) from project repositories
Currently this is yielding docs like this:
Still remaining
Checklists
Pre-Review Checklist
config.yml.example)v7.13.2,v7.14.0,v8.0.0)Changes Requiring Extra Attention
Related Pull Requests
Release Note