Skip to content

Commit

Permalink
PORT-5378 normalizing identifier to lowercase (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
yairsimantov20 authored Dec 4, 2023
1 parent 2d855b4 commit 887abee
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

<!-- towncrier release notes start -->

## 0.4.6 (2023-12-04)


### Bug Fixes

- Fixed a bug that triggered the integration to update during the initialization process when the integration already existed and the organization lacked default blueprints (PORT-5378).
- Fixed an issue where setting integration type or identifier that contains a capital letter will not show the integration in the UI (PORT-5399)


## 0.4.5 (2023-11-30)


Expand Down
6 changes: 5 additions & 1 deletion port_ocean/config/settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any, Literal

from pydantic import BaseSettings, BaseModel, Extra, AnyHttpUrl, parse_obj_as
from pydantic import BaseSettings, BaseModel, Extra, AnyHttpUrl, parse_obj_as, validator

from port_ocean.config.base import BaseOceanSettings
from port_ocean.core.event_listener import EventListenerSettingsType
Expand Down Expand Up @@ -33,6 +33,10 @@ class IntegrationSettings(BaseModel, extra=Extra.allow):
type: str
config: dict[str, Any]

@validator("identifier", "type")
def validate_lower(cls, v: str) -> str:
return v.lower()


class IntegrationConfiguration(BaseOceanSettings, extra=Extra.allow):
initialize_port_resources: bool = True
Expand Down
5 changes: 2 additions & 3 deletions port_ocean/core/defaults/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
from port_ocean.clients.port.types import UserAgentType
from port_ocean.config.settings import IntegrationConfiguration
from port_ocean.context.ocean import ocean
from port_ocean.core.defaults.common import Defaults, get_port_integration_defaults
from port_ocean.core.handlers.port_app_config.models import PortAppConfig
from port_ocean.exceptions.port_defaults import (
AbortDefaultCreationError,
)

from port_ocean.core.defaults.common import Defaults, get_port_integration_defaults


def deconstruct_blueprints_to_creation_steps(
raw_blueprints: list[dict[str, Any]]
Expand Down Expand Up @@ -111,7 +110,7 @@ async def _create_resources(
)
)

await port_client.initialize_integration(
await port_client.create_integration(
integration_config.integration.type,
integration_config.event_listener.to_request(),
port_app_config=defaults.port_app_config,
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.4.5"
version = "0.4.6"
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 887abee

Please sign in to comment.