From 8de5bd7ab9a9f970c9617501be74b26bac31ad2f Mon Sep 17 00:00:00 2001 From: Solomon Negusse Date: Fri, 10 Jan 2025 11:37:07 -0600 Subject: [PATCH 1/3] wait for cog creation to complete before setting version to latest --- src/datapump/jobs/version_update.py | 30 +++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/datapump/jobs/version_update.py b/src/datapump/jobs/version_update.py index 6503b60..851e3f2 100644 --- a/src/datapump/jobs/version_update.py +++ b/src/datapump/jobs/version_update.py @@ -75,21 +75,18 @@ def next_step(self): elif self.step == RasterVersionUpdateJobStep.creating_tile_cache: status = self._check_tile_cache_status() if status == JobStatus.complete: - self.step = RasterVersionUpdateJobStep.mark_latest - self._mark_latest() + if self.aux_tile_set_parameters: + self.step = RasterVersionUpdateJobStep.creating_aux_assets + for tile_set_params in self.aux_tile_set_parameters: + self._create_aux_tile_set(tile_set_params) + else: + self.step = RasterVersionUpdateJobStep.mark_latest + self._mark_latest() elif status == JobStatus.failed: self.status = JobStatus.failed elif self.step == RasterVersionUpdateJobStep.creating_aggregated_tile_set: status = self._check_aux_assets_status() - if status == JobStatus.complete: - self.step = RasterVersionUpdateJobStep.mark_latest - self._mark_latest() - elif status == JobStatus.failed: - self.status = JobStatus.failed - - elif self.step == RasterVersionUpdateJobStep.mark_latest: - status = self._check_latest_status() if status == JobStatus.complete: if self.aux_tile_set_parameters: self.step = RasterVersionUpdateJobStep.creating_aux_assets @@ -100,6 +97,13 @@ def next_step(self): elif status == JobStatus.failed: self.status = JobStatus.failed + elif self.step == RasterVersionUpdateJobStep.mark_latest: + status = self._check_latest_status() + if status == JobStatus.complete: + self.status = JobStatus.complete + elif status == JobStatus.failed: + self.status = JobStatus.failed + elif self.step == RasterVersionUpdateJobStep.creating_aux_assets: status = self._check_aux_assets_status() if status == JobStatus.complete: @@ -110,14 +114,16 @@ def next_step(self): self.status = JobStatus.failed break else: - self.status = JobStatus.complete + self.step = RasterVersionUpdateJobStep.mark_latest + self._mark_latest() elif status == JobStatus.failed: self.status = JobStatus.failed elif self.step == RasterVersionUpdateJobStep.creating_cog_assets: status = self._check_aux_assets_status() if status == JobStatus.complete: - self.status = JobStatus.complete + self.step = RasterVersionUpdateJobStep.mark_latest + self._mark_latest() elif status == JobStatus.failed: self.status = JobStatus.failed From 1aeee4c9dbc5280570b125bf7ee337e984391f0c Mon Sep 17 00:00:00 2001 From: Solomon Negusse Date: Fri, 10 Jan 2025 11:59:36 -0600 Subject: [PATCH 2/3] mark latest after aggregated tile set creation if no aux asset --- src/datapump/jobs/version_update.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/datapump/jobs/version_update.py b/src/datapump/jobs/version_update.py index 851e3f2..01475fc 100644 --- a/src/datapump/jobs/version_update.py +++ b/src/datapump/jobs/version_update.py @@ -93,7 +93,8 @@ def next_step(self): for tile_set_params in self.aux_tile_set_parameters: self._create_aux_tile_set(tile_set_params) else: - self.status = JobStatus.complete + self.step = RasterVersionUpdateJobStep.mark_latest + self._mark_latest() elif status == JobStatus.failed: self.status = JobStatus.failed From 7b1f8ca8a03431752e39f010961924d16a3881fa Mon Sep 17 00:00:00 2001 From: Solomon Negusse Date: Mon, 13 Jan 2025 14:56:23 -0600 Subject: [PATCH 3/3] trigger deployment --- src/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dockerfile b/src/Dockerfile index 9822f2f..05deaa4 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -15,7 +15,7 @@ RUN pip install . -t python # to change the hash of the file and get TF to realize it needs to be # redeployed. Ticket for a better solution: # https://gfw.atlassian.net/browse/GTC-1250 -# change 18 +# change 19 RUN yum install -y zip geos-devel