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

[Integration][async-gitlab] - GitLab integration with Async support #1121

Closed
wants to merge 26 commits into from

Conversation

victor-devv
Copy link

@victor-devv victor-devv commented Nov 5, 2024

Description

What - Ocean Gitlab integration with async support using the http async client. Includes support for resources which includes groups, projects, merge requests and issues; as well as webhooks.

Why -

How -

Type of change

Please leave one option from the following and delete the rest:

  • New Integration (non-breaking change which adds a new integration)

All tests should be run against the port production environment(using a testing org).

Core testing checklist

  • Integration able to create all default resources from scratch
  • Resync finishes successfully
  • Resync able to create entities
  • Resync able to update entities
  • Resync able to detect and delete entities
  • Scheduled resync able to abort existing resync and start a new one
  • Tested with at least 2 integrations from scratch
  • 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
  • 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

Preflight checklist

  • Handled rate limiting
  • Handled pagination
  • Implemented the code in async
  • Support Multi account

Screenshots

Screenshot 2024-11-05 at 18 31 13
Screenshot 2024-11-05 at 18 31 24
Screenshot 2024-11-05 at 18 31 34
Screenshot 2024-11-05 at 18 31 42

API Documentation

Provide links to the API documentation used for this integration.

@victor-devv victor-devv changed the title [Integration][async-gitlab] - <GitLab integration with Async support> [Integration][async-gitlab] - GitLab integration with Async support Nov 7, 2024
"calculationProperties": {
"lead_time_days": {
"title": "Lead time (Days)",
"calculation": "if .properties.status == \"merged\" then ((.properties.mergedAt | sub(\"\\\\.[0-9]+\\\\+00:00$\"; \"Z\") | strptime(\"%Y-%m-%dT%H:%M:%SZ\") | mktime) - (.properties.createdAt | sub(\"\\\\.[0-9]+\\\\+00:00$\"; \"Z\") | strptime(\"%Y-%m-%dT%H:%M:%SZ\") | mktime)) / 86400 | tonumber else null end",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is lead time a calculation property here, The calculation should be done in the mapping configuration and default to null if the pr hasn't been merged. we have access to both mergedAt and createdAt at the time of ingesting. this would help the reuse of leadTime. calculation properties are done on the fly. there are instances that we need to use leadTime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants