Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## Release (2025-xx-xx)
- `auditlog`: [v0.1.1](services/auditlog/CHANGELOG.md#v011)
- **Bugfix:** Prevent year 0 timestamp issue
- `authorization`: [v0.4.1](services/authorization/CHANGELOG.md#v041)
- **Bugfix:** Prevent year 0 timestamp issue
- `cdn`: [v1.7.1](services/cdn/CHANGELOG.md#v171)
- **Bugfix:** Prevent year 0 timestamp issue
- `git`: [v0.5.1](services/git/CHANGELOG.md#v051)
- **Bugfix:** Prevent year 0 timestamp issue
- `intake`: [v0.2.1](services/intake/CHANGELOG.md#v021)
- **Bugfix:** Prevent year 0 timestamp issue
- `kms`: [v0.4.1](services/kms/CHANGELOG.md#v041)
- **Bugfix:** Prevent year 0 timestamp issue
- `modelserving`: [v0.2.2](services/modelserving/CHANGELOG.md#v022)
- **Bugfix:** Prevent year 0 timestamp issue
- `objectstorage`: [v1.2.1](services/objectstorage/CHANGELOG.md#v121)
- **Bugfix:** Prevent year 0 timestamp issue
- `resourcemanager`: [v0.6.1](services/resourcemanager/CHANGELOG.md#v061)
- **Bugfix:** Prevent year 0 timestamp issue
- `scf`: [v0.2.1](services/scf/CHANGELOG.md#v021)
- **Bugfix:** Prevent year 0 timestamp issue
- `serviceaccount`: [v0.4.2](services/serviceaccount/CHANGELOG.md#v042)
- **Bugfix:** Prevent year 0 timestamp issue
- `serviceenablement`: [v1.1.1](services/serviceenablement/CHANGELOG.md#v111)
- **Bugfix:** Prevent year 0 timestamp issue
- `ske`: [v1.3.1](services/ske/CHANGELOG.md#v131)
- **Bugfix:** Prevent year 0 timestamp issue

## Release (2025-10-13)
- `observability`: [v0.11.0](services/observability/CHANGELOG.md#v0110)
- **Deprecation:** The `JaegerHttpTracesUrl` field is now deprecated in all relevant models and will be removed after 9th April 2026. Use the new `JaegerHttpUrl` field instead.
Expand Down
3 changes: 3 additions & 0 deletions services/auditlog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v0.1.1
- **Bugfix:** Prevent year 0 timestamp issue

## v0.1.0

- **New**: STACKIT Audit Log module for retrieving recorded actions and system changes. Download audit log entries for folders, organizations, and projects with time range filtering, pagination, and configurable result limits.
2 changes: 1 addition & 1 deletion services/auditlog/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stackit-auditlog"

[tool.poetry]
name = "stackit-auditlog"
version = "v0.1.0"
version = "v0.1.1"
authors = [
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import json
import pprint
import re # noqa: F401
from datetime import datetime
from typing import Any, ClassVar, Dict, List, Optional, Set

Expand Down Expand Up @@ -118,13 +119,39 @@ class AuditLogEntryResponse(BaseModel):
"visibility",
]

@field_validator("event_time_stamp", mode="before")
def event_time_stamp_change_year_zero_to_one(cls, value):
"""Workaround which prevents year 0 issue"""
if isinstance(value, str):
# Check for year "0000" at the beginning of the string
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
if value.startswith("0000-01-01T") and re.match(
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
):
# Workaround: Replace "0000" with "0001"
return "0001" + value[4:] # Take "0001" and append the rest of the string
return value

@field_validator("event_type")
def event_type_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(["ADMIN_ACTIVITY", "SYSTEM_EVENT", "POLICY_DENIED"]):
raise ValueError("must be one of enum values ('ADMIN_ACTIVITY', 'SYSTEM_EVENT', 'POLICY_DENIED')")
return value

@field_validator("received_time_stamp", mode="before")
def received_time_stamp_change_year_zero_to_one(cls, value):
"""Workaround which prevents year 0 issue"""
if isinstance(value, str):
# Check for year "0000" at the beginning of the string
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
if value.startswith("0000-01-01T") and re.match(
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
):
# Workaround: Replace "0000" with "0001"
return "0001" + value[4:] # Take "0001" and append the rest of the string
return value

@field_validator("severity")
def severity_validate_enum(cls, value):
"""Validates the enum"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@

import json
import pprint
import re # noqa: F401
from datetime import datetime
from typing import Any, ClassVar, Dict, List, Optional, Set, Union

from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
from pydantic import (
BaseModel,
ConfigDict,
Field,
StrictFloat,
StrictInt,
StrictStr,
field_validator,
)
from typing_extensions import Self


Expand All @@ -33,6 +42,19 @@ class ErrorResponse(BaseModel):
timestamp: Optional[datetime] = Field(default=None, description="Timestamp at which the error occurred.")
__properties: ClassVar[List[str]] = ["message", "path", "status", "timestamp"]

@field_validator("timestamp", mode="before")
def timestamp_change_year_zero_to_one(cls, value):
"""Workaround which prevents year 0 issue"""
if isinstance(value, str):
# Check for year "0000" at the beginning of the string
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
if value.startswith("0000-01-01T") and re.match(
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
):
# Workaround: Replace "0000" with "0001"
return "0001" + value[4:] # Take "0001" and append the rest of the string
return value

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@
import pprint
from typing import Any, ClassVar, Dict, List, Optional, Set, Union

from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
from pydantic import (
BaseModel,
ConfigDict,
Field,
StrictFloat,
StrictInt,
StrictStr,
)
from typing_extensions import Self


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@
import pprint
from typing import Any, ClassVar, Dict, List, Optional, Set, Union

from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
from pydantic import (
BaseModel,
ConfigDict,
Field,
StrictFloat,
StrictInt,
StrictStr,
)
from typing_extensions import Self

from stackit.auditlog.models.audit_log_entry_response import AuditLogEntryResponse
Expand Down
3 changes: 3 additions & 0 deletions services/authorization/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v0.4.1
- **Bugfix:** Prevent year 0 timestamp issue

## v0.4.0
- **Feature**: Add support for assignable subjects

Expand Down
2 changes: 1 addition & 1 deletion services/authorization/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stackit-authorization"

[tool.poetry]
name = "stackit-authorization"
version = "v0.4.0"
version = "v0.4.1"
authors = [
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

import json
import pprint
import re # noqa: F401
from datetime import datetime
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from typing_extensions import Self


Expand All @@ -34,6 +35,19 @@ class ErrorResponse(BaseModel):
time_stamp: datetime = Field(alias="timeStamp")
__properties: ClassVar[List[str]] = ["error", "message", "path", "status", "timeStamp"]

@field_validator("time_stamp", mode="before")
def time_stamp_change_year_zero_to_one(cls, value):
"""Workaround which prevents year 0 issue"""
if isinstance(value, str):
# Check for year "0000" at the beginning of the string
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
if value.startswith("0000-01-01T") and re.match(
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
):
# Workaround: Replace "0000" with "0001"
return "0001" + value[4:] # Take "0001" and append the rest of the string
return value

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
Expand Down
3 changes: 3 additions & 0 deletions services/cdn/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v1.7.1
- **Bugfix:** Prevent year 0 timestamp issue

## v1.7.0
- **Feature:** Add models: `DistributionWaf`, `WafConfig`, `WAFConfigPatch`, `WAFMode`, `WAFRule`, `WAFRuleCollection`, `WAFRuleGroup` and `WAFStatusRuleBlock`
- **Feature:** Add `Waf` attribute to `Config` and `Distribution`
Expand Down
2 changes: 1 addition & 1 deletion services/cdn/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stackit-cdn"

[tool.poetry]
name = "stackit-cdn"
version = "v1.7.0"
version = "v1.7.1"
authors = [
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
]
Expand Down
27 changes: 27 additions & 0 deletions services/cdn/src/stackit/cdn/models/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import json
import pprint
import re # noqa: F401
from datetime import datetime
from typing import Any, ClassVar, Dict, List, Optional, Set

Expand Down Expand Up @@ -63,13 +64,39 @@ class Distribution(BaseModel):
"waf",
]

@field_validator("created_at", mode="before")
def created_at_change_year_zero_to_one(cls, value):
"""Workaround which prevents year 0 issue"""
if isinstance(value, str):
# Check for year "0000" at the beginning of the string
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
if value.startswith("0000-01-01T") and re.match(
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
):
# Workaround: Replace "0000" with "0001"
return "0001" + value[4:] # Take "0001" and append the rest of the string
return value

@field_validator("status")
def status_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(["CREATING", "ACTIVE", "UPDATING", "DELETING", "ERROR"]):
raise ValueError("must be one of enum values ('CREATING', 'ACTIVE', 'UPDATING', 'DELETING', 'ERROR')")
return value

@field_validator("updated_at", mode="before")
def updated_at_change_year_zero_to_one(cls, value):
"""Workaround which prevents year 0 issue"""
if isinstance(value, str):
# Check for year "0000" at the beginning of the string
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
if value.startswith("0000-01-01T") and re.match(
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
):
# Workaround: Replace "0000" with "0001"
return "0001" + value[4:] # Take "0001" and append the rest of the string
return value

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@

import json
import pprint
import re # noqa: F401
from datetime import datetime
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from pydantic import (
BaseModel,
ConfigDict,
Field,
StrictBool,
StrictInt,
StrictStr,
field_validator,
)
from typing_extensions import Annotated, Self


Expand Down Expand Up @@ -50,6 +59,19 @@ class DistributionLogsRecord(BaseModel):
"timestamp",
]

@field_validator("timestamp", mode="before")
def timestamp_change_year_zero_to_one(cls, value):
"""Workaround which prevents year 0 issue"""
if isinstance(value, str):
# Check for year "0000" at the beginning of the string
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
if value.startswith("0000-01-01T") and re.match(
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
):
# Workaround: Replace "0000" with "0001"
return "0001" + value[4:] # Take "0001" and append the rest of the string
return value

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

import json
import pprint
import re # noqa: F401
from datetime import datetime
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictInt
from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator
from typing_extensions import Self

from stackit.cdn.models.distribution_statistics_record_regions import (
Expand Down Expand Up @@ -48,6 +49,32 @@ class DistributionStatisticsRecord(BaseModel):
"start",
]

@field_validator("end", mode="before")
def end_change_year_zero_to_one(cls, value):
"""Workaround which prevents year 0 issue"""
if isinstance(value, str):
# Check for year "0000" at the beginning of the string
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
if value.startswith("0000-01-01T") and re.match(
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
):
# Workaround: Replace "0000" with "0001"
return "0001" + value[4:] # Take "0001" and append the rest of the string
return value

@field_validator("start", mode="before")
def start_change_year_zero_to_one(cls, value):
"""Workaround which prevents year 0 issue"""
if isinstance(value, str):
# Check for year "0000" at the beginning of the string
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
if value.startswith("0000-01-01T") and re.match(
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
):
# Workaround: Replace "0000" with "0001"
return "0001" + value[4:] # Take "0001" and append the rest of the string
return value

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
Expand Down
Loading