Skip to content

Commit

Permalink
Merge pull request #860 from hkad98/jkd/trivial
Browse files Browse the repository at this point in the history
fix: automation deser for first_run
  • Loading branch information
hkad98 authored Oct 24, 2024
2 parents c2525d6 + cf865fb commit 016e88d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# (C) 2024 GoodData Corporation
import builtins
from datetime import datetime
from typing import Any, Optional

from attrs import define, field
Expand All @@ -26,7 +25,7 @@
class CatalogAutomationSchedule(Base):
cron: str
cron_description: Optional[str] = field(default=None, eq=False)
first_run: Optional[datetime] = None
first_run: Optional[str] = None
timezone: Optional[str] = "UTC"

@staticmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ interactions:
X-XSS-Protection:
- '0'
set-cookie:
- SPRING_REDIRECT_URI=; Max-Age=0; Expires=Wed, 23 Oct 2024 11:21:42 GMT;
- SPRING_REDIRECT_URI=; Max-Age=0; Expires=Thu, 24 Oct 2024 09:45:11 GMT;
Path=/; HTTPOnly; SameSite=Lax
body:
string: []
Expand Down Expand Up @@ -143,7 +143,7 @@ interactions:
X-XSS-Protection:
- '0'
set-cookie:
- SPRING_REDIRECT_URI=; Max-Age=0; Expires=Wed, 23 Oct 2024 11:21:42 GMT;
- SPRING_REDIRECT_URI=; Max-Age=0; Expires=Thu, 24 Oct 2024 09:45:11 GMT;
Path=/; HTTPOnly; SameSite=Lax
body:
string: ''
Expand All @@ -161,6 +161,7 @@ interactions:
type: notificationChannel
schedule:
cron: 0 0 * * *
firstRun: '2023-10-05T14:30:00+00:00'
timezone: UTC
headers:
Accept-Encoding:
Expand Down Expand Up @@ -221,7 +222,7 @@ interactions:
X-XSS-Protection:
- '0'
set-cookie:
- SPRING_REDIRECT_URI=; Max-Age=0; Expires=Wed, 23 Oct 2024 11:21:42 GMT;
- SPRING_REDIRECT_URI=; Max-Age=0; Expires=Thu, 24 Oct 2024 09:45:11 GMT;
Path=/; HTTPOnly; SameSite=Lax
body:
string: ''
Expand Down Expand Up @@ -292,9 +293,9 @@ interactions:
X-XSS-Protection:
- '0'
content-length:
- '203'
- '237'
set-cookie:
- SPRING_REDIRECT_URI=; Max-Age=0; Expires=Wed, 23 Oct 2024 11:21:42 GMT;
- SPRING_REDIRECT_URI=; Max-Age=0; Expires=Thu, 24 Oct 2024 09:45:11 GMT;
Path=/; HTTPOnly; SameSite=Lax
body:
string:
Expand All @@ -306,6 +307,7 @@ interactions:
type: notificationChannel
schedule:
cron: 0 0 * * *
firstRun: '2023-10-05T14:30:00Z'
timezone: UTC
state: ACTIVE
title: Automation
Expand Down Expand Up @@ -372,7 +374,7 @@ interactions:
X-XSS-Protection:
- '0'
set-cookie:
- SPRING_REDIRECT_URI=; Max-Age=0; Expires=Wed, 23 Oct 2024 11:21:42 GMT;
- SPRING_REDIRECT_URI=; Max-Age=0; Expires=Thu, 24 Oct 2024 09:45:11 GMT;
Path=/; HTTPOnly; SameSite=Lax
body:
string: ''
Expand Down Expand Up @@ -443,7 +445,7 @@ interactions:
X-XSS-Protection:
- '0'
set-cookie:
- SPRING_REDIRECT_URI=; Max-Age=0; Expires=Wed, 23 Oct 2024 11:21:42 GMT;
- SPRING_REDIRECT_URI=; Max-Age=0; Expires=Thu, 24 Oct 2024 09:45:11 GMT;
Path=/; HTTPOnly; SameSite=Lax
body:
string: []
Expand Down Expand Up @@ -511,7 +513,7 @@ interactions:
X-XSS-Protection:
- '0'
set-cookie:
- SPRING_REDIRECT_URI=; Max-Age=0; Expires=Wed, 23 Oct 2024 11:21:42 GMT;
- SPRING_REDIRECT_URI=; Max-Age=0; Expires=Thu, 24 Oct 2024 09:45:11 GMT;
Path=/; HTTPOnly; SameSite=Lax
body:
string: ''
4 changes: 1 addition & 3 deletions gooddata-sdk/tests/catalog/test_catalog_workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,9 +947,7 @@ def test_layout_automations(test_config):
title="Automation",
state="ACTIVE",
notification_channel=CatalogNotificationChannelIdentifier(id="webhook"),
schedule=CatalogAutomationSchedule(
cron="0 0 * * *",
),
schedule=CatalogAutomationSchedule(cron="0 0 * * *", first_run="2023-10-05 14:30:00+00:00"),
metadata={"key": "value"},
)
]
Expand Down

0 comments on commit 016e88d

Please sign in to comment.