Skip to content

Commit

Permalink
Merge pull request #3211 from SwissDataScienceCenter/release/v1.9.2
Browse files Browse the repository at this point in the history
chore: release v1.9.2
  • Loading branch information
m-alisafaee authored Nov 15, 2022
2 parents 008ae71 + 170389e commit 4dca1a4
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 4 deletions.
10 changes: 10 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@
Changes
=======

`1.9.2 <https://github.com/SwissDataScienceCenter/renku-python/compare/v1.9.1...v1.9.2>`__ (2022-11-15)
-------------------------------------------------------------------------------------------------------

Bug Fixes
~~~~~~~~~

- **workflow:** set plan creation date to activity start date
(`#3210 <https://github.com/SwissDataScienceCenter/renku-python/issues/3210>`__)
(`c18f85c <https://github.com/SwissDataScienceCenter/renku-python/commit/c18f85cd834d036aaa76691d4552f9ab335c8f9f>`__)

`1.9.1 <https://github.com/SwissDataScienceCenter/renku-python/compare/v1.9.0...v1.9.1>`__ (2022-11-07)
-------------------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion helm-chart/renku-core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ appVersion: "1.0"
description: A Helm chart for Kubernetes
name: renku-core
icon: https://avatars0.githubusercontent.com/u/53332360?s=400&u=a4311d22842343604ef61a8c8a1e5793209a67e9&v=4
version: 1.9.1
version: 1.9.2
2 changes: 1 addition & 1 deletion helm-chart/renku-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ versions:
fullnameOverride: ""
image:
repository: renku/renku-core
tag: "v1.9.1"
tag: "v1.9.2"
pullPolicy: IfNotPresent
v8:
name: v8
Expand Down
4 changes: 3 additions & 1 deletion renku/command/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ def parse_explicit_definition(entries, type):
if not creators:
creators = [cast(Person, get_git_user(project_context.repository))]

plan = tool.to_plan(name=name, description=description, keywords=keyword, creators=creators)
plan = tool.to_plan(
name=name, description=description, keywords=keyword, creators=creators, date_created=started_at_time
)
activity = Activity.from_plan(
plan=plan,
repository=project_context.repository,
Expand Down
3 changes: 3 additions & 0 deletions renku/core/workflow/plan_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import shlex
import time
from contextlib import contextmanager
from datetime import datetime
from itertools import chain
from pathlib import Path
from typing import Any, Dict, Iterable, List, Optional, Set, Tuple, Union, cast
Expand Down Expand Up @@ -701,11 +702,13 @@ def to_plan(
description: Optional[str] = None,
keywords: Optional[List[str]] = None,
creators: Optional[List[Person]] = None,
date_created: Optional[datetime] = None,
) -> Plan:
"""Return an instance of ``Plan`` based on this factory."""
plan = Plan(
id=self.plan_id,
name=name,
date_created=date_created,
description=description,
keywords=keywords,
command=" ".join(self.base_command),
Expand Down
2 changes: 1 addition & 1 deletion renku/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
except ImportError:
from importlib_metadata import distribution # type: ignore

__version__ = "1.9.1"
__version__ = "1.9.2"
__template_version__ = "0.3.1"
__minimum_project_version__ = "1.7.0"

Expand Down
14 changes: 14 additions & 0 deletions tests/cli/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1450,3 +1450,17 @@ def test_rerun_doesnt_update_plan_index(runner, project, with_injection):
assert 0 == result.exit_code, format_result_exception(result)
assert new_description in result.output
assert original_description not in result.output


def test_plan_creation_date(runner, project, with_injection):
"""Test Plan's creation date is before Activity's start date."""
result = runner.invoke(cli, ["run", "--name", "r1", "--no-output", "sleep", "2"])
assert 0 == result.exit_code, format_result_exception(result)

with with_injection():
plan_gateway = PlanGateway()
plan = plan_gateway.get_by_name("r1")
activity_gateway = ActivityGateway()
activity = activity_gateway.get_all_activities()[0]

assert plan.date_created <= activity.started_at_time

0 comments on commit 4dca1a4

Please sign in to comment.