Skip to content

Commit

Permalink
Turn off default httpavailability for source-gitlab (#22001)
Browse files Browse the repository at this point in the history
* Turn off default for source-gitlab (default won't work for some streams on this source)

* Update gitlab.md

* Update streams.py

* Update streams.py

* Update gitlab.md

* auto-bump connector version

---------

Co-authored-by: Octavia Squidington III <[email protected]>
  • Loading branch information
erohmensing and octavia-squidington-iii authored Jan 30, 2023
1 parent 0daf9be commit 9e7f1b6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@
- name: Gitlab
sourceDefinitionId: 5e6175e5-68e1-4c17-bff9-56103bbb0d80
dockerRepository: airbyte/source-gitlab
dockerImageTag: 1.0.1
dockerImageTag: 1.0.2
documentationUrl: https://docs.airbyte.com/integrations/sources/gitlab
icon: gitlab.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4850,7 +4850,7 @@
path_in_connector_config:
- "credentials"
- "client_secret"
- dockerImage: "airbyte/source-gitlab:1.0.1"
- dockerImage: "airbyte/source-gitlab:1.0.2"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/gitlab"
connectionSpecification:
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-gitlab/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ COPY main.py ./

ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=1.0.1
LABEL io.airbyte.version=1.0.2
LABEL io.airbyte.name=airbyte/source-gitlab
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import pendulum
import requests
from airbyte_cdk.models import SyncMode
from airbyte_cdk.sources.streams.availability_strategy import AvailabilityStrategy
from airbyte_cdk.sources.streams.core import StreamData
from airbyte_cdk.sources.streams.http import HttpStream

Expand Down Expand Up @@ -52,6 +53,10 @@ def request_params(
def url_base(self) -> str:
return f"https://{self.api_url}/api/v4/"

@property
def availability_strategy(self) -> Optional["AvailabilityStrategy"]:
return None

def should_retry(self, response: requests.Response) -> bool:
# Gitlab API returns a 403 response in case a feature is disabled in a project (pipelines/jobs for instance).
if response.status_code == 403:
Expand Down
3 changes: 2 additions & 1 deletion docs/integrations/sources/gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ Gitlab has the [rate limits](https://docs.gitlab.com/ee/user/gitlab_com/index.ht

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:-------------------------------------------------------------------------------------------|
| 1.0.1 | 2022-01-23 | [21713](https://github.com/airbytehq/airbyte/pull/21713) | Fix missing data issue |
| 1.0.2 | 2023-01-27 | [22001](https://github.com/airbytehq/airbyte/pull/22001) | Set `AvailabilityStrategy` for streams explicitly to `None` |
| 1.0.1 | 2023-01-23 | [21713](https://github.com/airbytehq/airbyte/pull/21713) | Fix missing data issue |
| 1.0.0 | 2022-12-05 | [7506](https://github.com/airbytehq/airbyte/pull/7506) | Add `OAuth2.0` authentication option |
| 0.1.12 | 2022-12-15 | [20542](https://github.com/airbytehq/airbyte/pull/20542) | Revert HttpAvailability changes, run on cdk 0.15.0 |
| 0.1.11 | 2022-12-14 | [20479](https://github.com/airbytehq/airbyte/pull/20479) | Use HttpAvailabilityStrategy + add unit tests |
Expand Down

0 comments on commit 9e7f1b6

Please sign in to comment.