Skip to content

Commit

Permalink
🔖 prepare 0.8.2 release (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
renardeinside authored Nov 2, 2022
1 parent 77cb903 commit a9c93b5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

[Please read through the Keep a Changelog (~5min)](https://keepachangelog.com/en/1.0.0/).

## [0.8.2] - 2022-11-02

## Fixed
- 🩹 Deletion logic in the workflow eraser


## [0.8.1] - 2022-11-02

## Changed

- 📖 Reference documentation for deployment file
- ♻️ Add extensive caching for job listing

Expand Down
2 changes: 1 addition & 1 deletion dbx/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.8.1"
__version__ = "0.8.2"
9 changes: 6 additions & 3 deletions dbx/api/destroyer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from dbx.models.cli.destroyer import DestroyerConfig, DeletionMode
from dbx.models.deployment import AnyWorkflow
from dbx.models.files.project import EnvironmentInfo
from dbx.models.workflow.common.pipeline import Pipeline
from dbx.models.workflow.common.workflow_types import WorkflowType
from dbx.utils import dbx_echo


Expand All @@ -32,11 +32,14 @@ def __init__(self, api_client: ApiClient, workflows: List[AnyWorkflow], dry_run:
self._client = api_client
self._workflows = workflows
self._dry_run = dry_run
self._pipeline_service = NamedPipelinesService(self._client)
self._jobs_service = NamedJobsService(self._client)

def _delete_workflow(self, workflow: AnyWorkflow):
dbx_echo(f"Workflow {escape(workflow.name)} will be deleted")
operator_service = NamedPipelinesService if isinstance(workflow, Pipeline) else NamedJobsService
service_instance = operator_service(self._client)
service_instance = (
self._jobs_service if not workflow.workflow_type == WorkflowType.pipeline else self._pipeline_service
)
obj_id = service_instance.find_by_name(workflow.name)

if not obj_id:
Expand Down
1 change: 1 addition & 0 deletions dbx/api/services/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class NamedJobsService(WorkflowBaseService):
def __init__(self, api_client: ApiClient):
super().__init__(api_client)
self._service = JobsService(api_client)
dbx_echo(f"Total jobs in the workspace: {len(self.all_jobs)}")

@property
@lru_cache(maxsize=2000)
Expand Down
2 changes: 1 addition & 1 deletion dbx/commands/destroy.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def destroy(
relevant_workflows = env_config.payload.select_relevant_or_all_workflows(workflow_name, workflow_names)

_d_config = DestroyerConfig(
workflow_names=relevant_workflows,
workflows=relevant_workflows,
deletion_mode=deletion_mode,
dracarys=dracarys,
deployment=env_config,
Expand Down

0 comments on commit a9c93b5

Please sign in to comment.