diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 8dcd9d7..4d38037 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.0.17 +current_version = 0.0.18 parse = (?P\d+)\.(?P\d+)\.(?P\d+) serialize = {major}.{minor}.{patch} diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ff7d59..396f6b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [0.0.18] - 2021-12-19 +### Changed +- Catch asyncio.exceptions.TimeoutError when updating notebook metadata over RTU + ## [0.0.17] - 2022-12-16 ### Changed - Catch all HTTPStatusErrors when trying to delete the kernel session after successful execution diff --git a/papermill_origami/_version.py b/papermill_origami/_version.py index fc28f3a..662fbed 100644 --- a/papermill_origami/_version.py +++ b/papermill_origami/_version.py @@ -1 +1 @@ -version = "0.0.17" +version = "0.0.18" diff --git a/papermill_origami/engine.py b/papermill_origami/engine.py index 2b78427..8c11101 100644 --- a/papermill_origami/engine.py +++ b/papermill_origami/engine.py @@ -320,7 +320,11 @@ async def sync_noteable_nb_metadata_with_papermill(self): for key, value in flatten_dict( self.nb.metadata.papermill, parent_key_tuple=("papermill",) ).items(): - await self.km.client.update_nb_metadata(self.file, {"path": key, "value": value}) + try: + await self.km.client.update_nb_metadata(self.file, {"path": key, "value": value}) + except asyncio.exceptions.TimeoutError: + logger.debug("Timeout error while updating notebook metadata") + pass @staticmethod def create_kernel_manager(file: NotebookFile, client: NoteableClient, **kwargs): @@ -358,9 +362,13 @@ def _cell_start(self, cell, cell_index=None, **kwargs): def _cell_exception(self, cell, cell_index=None, **kwargs): self.catch_cell_metadata_updates(self.nb_man.cell_exception)(cell, cell_index, **kwargs) # Manually update the Noteable nb metadata - run_sync(self.km.client.update_nb_metadata)( - self.file, {"path": ["papermill", "exception"], "value": True} - ) + try: + run_sync(self.km.client.update_nb_metadata)( + self.file, {"path": ["papermill", "exception"], "value": True} + ) + except asyncio.exceptions.TimeoutError: + logger.debug("Timeout error while updating notebook metadata") + pass def _cell_complete(self, cell, cell_index=None, **kwargs): self.catch_cell_metadata_updates(self.nb_man.cell_complete)(cell, cell_index, **kwargs) diff --git a/pyproject.toml b/pyproject.toml index ba9c65c..cb198d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ [tool.poetry] name = "papermill-origami" -version = "0.0.17" +version = "0.0.18" description = "The noteable API interface" authors = ["Matt Seal "] maintainers = ["Matt Seal "]