-
Notifications
You must be signed in to change notification settings - Fork 60
docs: Support for Release and Tag kinds for Gitlab v2 integration #2905
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
base: main
Are you sure you want to change the base?
docs: Support for Release and Tag kinds for Gitlab v2 integration #2905
Conversation
This pull request is automatically being deployed by Amplify Hosting (learn more). |
Release
and Tag
Webhook Processors for Live Events
port-labs/ocean#2304
) ### **User description** This PR adds support for syncing GitLab releases and tags as new resource kinds. What - Why - How - ## Type of change Please leave one option from the following and delete the rest: - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] New Integration (non-breaking change which adds a new integration) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Non-breaking change (fix of existing functionality that will not change current behavior) - [ ] Documentation (added/updated documentation) <h4> All tests should be run against the port production environment(using a testing org). </h4> ### Core testing checklist - [x] Integration able to create all default resources from scratch - [x] Resync finishes successfully - [x] Resync able to create entities - [x] Resync able to update entities - [x] Resync able to detect and delete entities - [ ] Scheduled resync able to abort existing resync and start a new one - [x] Tested with at least 2 integrations from scratch - [x] Tested with Kafka and Polling event listeners - [ ] Tested deletion of entities that don't pass the selector ### Integration testing checklist - [ ] Integration able to create all default resources from scratch - [ ] Completed a full resync from a freshly installed integration and it completed successfully - [ ] Resync able to create entities - [ ] Resync able to update entities - [ ] Resync able to detect and delete entities - [ ] Resync finishes successfully - [ ] If new resource kind is added or updated in the integration, add example raw data, mapping and expected result to the `examples` folder in the integration directory. - [ ] If resource kind is updated, run the integration with the example data and check if the expected result is achieved - [ ] If new resource kind is added or updated, validate that live-events for that resource are working as expected - [ ] Docs PR link [here](port-labs/port-docs#2905) ### Preflight checklist - [ ] Handled rate limiting - [x] Handled pagination - [ ] Implemented the code in async - [ ] Support Multi account ## Screenshots <img width="1434" height="648" alt="image" src="https://github.com/user-attachments/assets/0a079299-41f8-4d15-bf1e-3005ebebd0eb" /> <img width="1676" height="277" alt="image" src="https://github.com/user-attachments/assets/80d904eb-e3e4-4952-8721-01db52550dd6" /> <img width="1438" height="618" alt="image" src="https://github.com/user-attachments/assets/cf7ed51f-1ecc-4f61-917f-5a04610b9fd9" /> <img width="1206" height="250" alt="image" src="https://github.com/user-attachments/assets/ec535168-3a85-4c35-bf5f-4c7c47b94d60" /> ## API Documentation Provide links to the API documentation used for this integration. ___ ### **PR Type** Enhancement ___ ### **Description** - Added support for syncing GitLab `releases` and `tags` as new resource kinds - Implemented `get_tags()` and `get_releases()` methods with project enrichment - Added new blueprints and Port mappings for tag and release entities - Created comprehensive test coverage for new tag and release functionality ___ ### Diagram Walkthrough ```mermaid flowchart LR client["GitLabClient"] -- "fetch tags/releases" --> enrichment["get_projects_resource_with_enrichment"] enrichment -- "enrich with project info" --> resources["Tags & Releases"] resources -- "sync to Port" --> blueprints["Port Blueprints"] main["main.py"] -- "register handlers" --> resync["on_resync_tags/releases"] ``` <details> <summary><h3> File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>3 files</summary><table> <tr> <td><strong>gitlab_client.py</strong><dd><code>Add methods for fetching tags and releases with enrichment</code></dd></td> <td><a href="https://github.com/port-labs/ocean/pull/2294/files#diff-b3f1d213dcdf27692a83a107111221fca8097003a7dd83161193b75b4ecc8b73">+75/-0</a> </td> </tr> <tr> <td><strong>utils.py</strong><dd><code>Add TAG and RELEASE to ObjectKind enum</code> </dd></td> <td><a href="https://github.com/port-labs/ocean/pull/2294/files#diff-b6d200025b09143ad6e8531200e2fe96e76e693353fdb5ba58a103f5b42b5f08">+2/-0</a> </td> </tr> <tr> <td><strong>main.py</strong><dd><code>Implement resync handlers for tags and releases</code> </dd></td> <td><a href="https://github.com/port-labs/ocean/pull/2294/files#diff-0863b6f5aa347d648ed8ec779bf541736547be7c6d485d3d7a60bb9e520bfd1d">+36/-0</a> </td> </tr> </table></details></td></tr><tr><td><strong>Configuration changes</strong></td><td><details><summary>4 files</summary><table> <tr> <td><strong>integration.py</strong><dd><code>Add TagResourceConfig and ReleaseResourceConfig classes</code> </dd></td> <td><a href="https://github.com/port-labs/ocean/pull/2294/files#diff-5428dc0c8a5bea86af937a9bd6175c82ef351b1f0b0f8c11064e78fc695bb584">+12/-0</a> </td> </tr> <tr> <td><strong>blueprints.json</strong><dd><code>Define blueprints for gitlabTag and gitlabRelease entities</code></dd></td> <td><a href="https://github.com/port-labs/ocean/pull/2294/files#diff-643023e08a676647dd51641b0c8cd3dfeb81de8e67d855303ee30ec7f9470ea7">+104/-0</a> </td> </tr> <tr> <td><strong>port-app-config.yml</strong><dd><code>Add Port mappings for tag and release kinds</code> </dd></td> <td><a href="https://github.com/port-labs/ocean/pull/2294/files#diff-1da49cc15ff5e38bc7cfed355587bf763d910e6affc39a0ea46fc46dab603470">+40/-1</a> </td> </tr> <tr> <td><strong>spec.yaml</strong><dd><code>Register releases and tags as exportable resources</code> </dd></td> <td><a href="https://github.com/port-labs/ocean/pull/2294/files#diff-92da44d9fc7f21c79d4d592e927c0441a3572a82743d823600e7566581b20a92">+2/-0</a> </td> </tr> </table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>test_gitlab_client.py</strong><dd><code>Add test cases for tags and releases functionality</code> </dd></td> <td><a href="https://github.com/port-labs/ocean/pull/2294/files#diff-592ff8cc9ce3a966d414c26ace95b8f1a4ef56bb12c6bca44608c9b46170a283">+103/-0</a> </td> </tr> </table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>CHANGELOG.md</strong><dd><code>Document addition of releases and tags support</code> </dd></td> <td><a href="https://github.com/port-labs/ocean/pull/2294/files#diff-fa549dfca83e908e603381bb974e4505c70cb46b8ba916cccaeda7709d376051">+8/-0</a> </td> </tr> </table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>pyproject.toml</strong><dd><code>Bump version to 0.2.37</code> </dd></td> <td><a href="https://github.com/port-labs/ocean/pull/2294/files#diff-3d3559f33cb8792e0b0724f93bfc87fe42318e91aa6d78aa616b5cb914e837a2">+1/-1</a> </td> </tr> </table></details></td></tr></tr></tbody></table> </details> ___ --------- Signed-off-by: Dennis Bilson <[email protected]> Co-authored-by: Michael Kofi Armah <[email protected]>
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.
LGTM
<details> | ||
<summary>Release blueprint</summary> | ||
<ReleaseBlueprint /> | ||
</details> |
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 better to add the details and summary in the template itself, so when using it, this won't be repeated each time.
Also, please add bold and (click to expand) to the collapsible.
like so:
<details>
<summary><b>TItle (Click to expand)</b></summary>
...
</details>
…ase-and-Tag-Kinds-Addition
This addition includes a documentation on the support for
releases
andtags
for the Gitlab v2 integration. This allows users to view releases and tags for their projects on Port.Updated docs pages
Please also include the path for the updated docs
/
)build-your-software-catalog/sync-data-to-catalog/git/gitlab-v2/installation
)/build-your-software-catalog/sync-data-to-catalog/git/gitlab-v2/examples
)