Skip to content

Commit

Permalink
[Core] Fix ingest example url (#664)
Browse files Browse the repository at this point in the history
# Description

What - fix ingest example url
Why - kind can include `/`
How - add quote

## Type of change

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

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] 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)

## Screenshots

Include screenshots from your environment showing how the resources of
the integration will look.

## API Documentation

Provide links to the API documentation used for this integration.
  • Loading branch information
talsabagport authored May 29, 2024
1 parent 91cab5d commit 5c91d5b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

<!-- towncrier release notes start -->

## 0.5.22 (2024-05-29)

### Bug Fixes

- Fixed an issue in `send_raw_data_examples` when there are slashes in integration kind


## 0.5.21 (2024-05-26)

### Features
Expand Down
3 changes: 2 additions & 1 deletion port_ocean/clients/port/mixins/integrations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Any, TYPE_CHECKING, Optional, TypedDict
from urllib.parse import quote_plus

import httpx
from loguru import logger
Expand Down Expand Up @@ -145,7 +146,7 @@ async def ingest_integration_kind_examples(
logger.debug(f"Ingesting examples for kind: {kind}")
headers = await self.auth.headers()
response = await self.client.post(
f"{self.auth.api_url}/integration/{self.integration_identifier}/kinds/{kind}/examples",
f"{self.auth.api_url}/integration/{quote_plus(self.integration_identifier)}/kinds/{quote_plus(kind)}/examples",
headers=headers,
json={
"examples": sensitive_log_filter.mask_object(data, full_hide=True),
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "port-ocean"
version = "0.5.21"
version = "0.5.22"
description = "Port Ocean is a CLI tool for managing your Port projects."
readme = "README.md"
homepage = "https://app.getport.io"
Expand Down

0 comments on commit 5c91d5b

Please sign in to comment.