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

fix: Skip webhook patch tests, temporary comment lint #317

Merged
merged 10 commits into from
Sep 25, 2024
Merged

Conversation

makseq
Copy link
Member

@makseq makseq commented Sep 25, 2024

This test is skipped because the API is called incorrectly. The implementation of api/webhooks/{id} is wrong because it's wrongly implemented in openapi schema of Label Studio backend (see webhooks/api.py).

Entrypoints:

  • PATCH /api/webhooks/{id}/
  • Run fern mock server: fern test --command "poetry run pytest -rP ." --log-level debug
  • Check .mock/definition/webhooks.yml - fern mock server uses it for mocking
  • Also, there are problems in client.webhooks.update() and async_client.webhooks.update(), check my fixes here:
    def update(
    self,
    id_: int,
    *,
    url: str,
    webhook_serializer_for_update_url: str,
    send_payload: bool = True,
    send_for_all_actions: bool = True,
    headers: typing.Optional[str] = None,
    is_active: bool = True,
    actions: typing.Optional[
    typing.Union[
    WebhooksUpdateRequestActionsItem,
    typing.Sequence[WebhooksUpdateRequestActionsItem],
    ]
    ] = None,
    id: typing.Optional[int] = OMIT,
    organization: typing.Optional[int] = OMIT,
    project: typing.Optional[int] = OMIT,
    webhook_serializer_for_update_send_payload: typing.Optional[bool] = OMIT,
    webhook_serializer_for_update_send_for_all_actions: typing.Optional[
    bool
    ] = OMIT,
    webhook_serializer_for_update_headers: typing.Optional[
    typing.Dict[str, typing.Any]
    ] = OMIT,
    webhook_serializer_for_update_is_active: typing.Optional[bool] = OMIT,
    webhook_serializer_for_update_actions: typing.Optional[
    typing.Sequence[WebhookSerializerForUpdateActionsItem]
    ] = OMIT,
    created_at: typing.Optional[dt.datetime] = OMIT,
    updated_at: typing.Optional[dt.datetime] = OMIT,
    request_options: typing.Optional[RequestOptions] = None,
    ) -> WebhookSerializerForUpdate:

@github-actions github-actions bot added the fix label Sep 25, 2024
@makseq makseq changed the title fix: Webhook tests fix: Skip webhook patch tests Sep 25, 2024
@makseq makseq requested a review from a team as a code owner September 25, 2024 21:13
@makseq makseq changed the title fix: Skip webhook patch tests fix: Skip webhook patch tests, temporary comment lint Sep 25, 2024
@makseq makseq merged commit 4b662e0 into master Sep 25, 2024
5 checks passed
@makseq makseq deleted the fix-webhook-tests branch September 25, 2024 21:16
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.

1 participant