Skip to content

Commit 4dca1a4

Browse files
Merge pull request #3211 from SwissDataScienceCenter/release/v1.9.2
chore: release v1.9.2
2 parents 008ae71 + 170389e commit 4dca1a4

File tree

7 files changed

+33
-4
lines changed

7 files changed

+33
-4
lines changed

CHANGES.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818
Changes
1919
=======
2020

21+
`1.9.2 <https://github.com/SwissDataScienceCenter/renku-python/compare/v1.9.1...v1.9.2>`__ (2022-11-15)
22+
-------------------------------------------------------------------------------------------------------
23+
24+
Bug Fixes
25+
~~~~~~~~~
26+
27+
- **workflow:** set plan creation date to activity start date
28+
(`#3210 <https://github.com/SwissDataScienceCenter/renku-python/issues/3210>`__)
29+
(`c18f85c <https://github.com/SwissDataScienceCenter/renku-python/commit/c18f85cd834d036aaa76691d4552f9ab335c8f9f>`__)
30+
2131
`1.9.1 <https://github.com/SwissDataScienceCenter/renku-python/compare/v1.9.0...v1.9.1>`__ (2022-11-07)
2232
-------------------------------------------------------------------------------------------------------
2333

helm-chart/renku-core/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ appVersion: "1.0"
33
description: A Helm chart for Kubernetes
44
name: renku-core
55
icon: https://avatars0.githubusercontent.com/u/53332360?s=400&u=a4311d22842343604ef61a8c8a1e5793209a67e9&v=4
6-
version: 1.9.1
6+
version: 1.9.2

helm-chart/renku-core/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ versions:
9797
fullnameOverride: ""
9898
image:
9999
repository: renku/renku-core
100-
tag: "v1.9.1"
100+
tag: "v1.9.2"
101101
pullPolicy: IfNotPresent
102102
v8:
103103
name: v8

renku/command/run.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ def parse_explicit_definition(entries, type):
204204
if not creators:
205205
creators = [cast(Person, get_git_user(project_context.repository))]
206206

207-
plan = tool.to_plan(name=name, description=description, keywords=keyword, creators=creators)
207+
plan = tool.to_plan(
208+
name=name, description=description, keywords=keyword, creators=creators, date_created=started_at_time
209+
)
208210
activity = Activity.from_plan(
209211
plan=plan,
210212
repository=project_context.repository,

renku/core/workflow/plan_factory.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import shlex
2323
import time
2424
from contextlib import contextmanager
25+
from datetime import datetime
2526
from itertools import chain
2627
from pathlib import Path
2728
from typing import Any, Dict, Iterable, List, Optional, Set, Tuple, Union, cast
@@ -701,11 +702,13 @@ def to_plan(
701702
description: Optional[str] = None,
702703
keywords: Optional[List[str]] = None,
703704
creators: Optional[List[Person]] = None,
705+
date_created: Optional[datetime] = None,
704706
) -> Plan:
705707
"""Return an instance of ``Plan`` based on this factory."""
706708
plan = Plan(
707709
id=self.plan_id,
708710
name=name,
711+
date_created=date_created,
709712
description=description,
710713
keywords=keywords,
711714
command=" ".join(self.base_command),

renku/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
except ImportError:
2525
from importlib_metadata import distribution # type: ignore
2626

27-
__version__ = "1.9.1"
27+
__version__ = "1.9.2"
2828
__template_version__ = "0.3.1"
2929
__minimum_project_version__ = "1.7.0"
3030

tests/cli/test_workflow.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,3 +1450,17 @@ def test_rerun_doesnt_update_plan_index(runner, project, with_injection):
14501450
assert 0 == result.exit_code, format_result_exception(result)
14511451
assert new_description in result.output
14521452
assert original_description not in result.output
1453+
1454+
1455+
def test_plan_creation_date(runner, project, with_injection):
1456+
"""Test Plan's creation date is before Activity's start date."""
1457+
result = runner.invoke(cli, ["run", "--name", "r1", "--no-output", "sleep", "2"])
1458+
assert 0 == result.exit_code, format_result_exception(result)
1459+
1460+
with with_injection():
1461+
plan_gateway = PlanGateway()
1462+
plan = plan_gateway.get_by_name("r1")
1463+
activity_gateway = ActivityGateway()
1464+
activity = activity_gateway.get_all_activities()[0]
1465+
1466+
assert plan.date_created <= activity.started_at_time

0 commit comments

Comments
 (0)