From 9275fb9eaaed7d1febc477f1dae7d1b096188ae7 Mon Sep 17 00:00:00 2001 From: Paul Haesler Date: Mon, 13 May 2024 12:11:59 +1000 Subject: [PATCH] Develop 1.9 cherry picks (#1018) * Prep for 1.8.40 release (#1013) * Increment default version number. * Add test for Robbi's s3 URL displaying PR. * Update HISTORY.rst for 1.8.40 release. * Lintage. * Fix broken date call. * More lintage. (cherry picked from commit 26f7002f6377c2221d52c38d73b3d36e37bcdfd7) * Add friendlier message for creating extents without updated views (#1016) Co-authored-by: Tisham Dhar (cherry picked from commit ffa043cdc1b24f12a5f1f9bb6304892c9d764e54) --------- Co-authored-by: Tisham Dhar --- HISTORY.rst | 14 ++++++++++++++ datacube_ows/__init__.py | 2 +- datacube_ows/update_ranges_impl.py | 5 +++++ tests/test_data.py | 9 +++++++-- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 432c0b97..4dbcf623 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,20 @@ History Datacube-ows version 1.8.x indicates that it is designed work with datacube-core versions 1.8.x. +1.8.40 (2024-04-29) +------------------- + +Bug fix release + +* Loading now uses `skip_broken_datasets=True` by default. (#1001) +* Bump base osgeo/gdal docker image version. (#1003) +* Update versions of several upstream packages to avoid known security issues (#1004, #1005, #1008) +* pre-commit autoupdate (#1006) +* Make S3 URL rewriting work with metadata indexed from STAC (#1011) +* Update HISTORY.rst and increment default version for release and some tests. (#1013) + +This release includes contributions from @whatnick, @pjonsson, @SpacemanPaul, and various automatic updater bots. + 1.8.39 (2024-03-13) ------------------- diff --git a/datacube_ows/__init__.py b/datacube_ows/__init__.py index 3e7649d4..fa9c824d 100644 --- a/datacube_ows/__init__.py +++ b/datacube_ows/__init__.py @@ -7,4 +7,4 @@ try: from ._version import version as __version__ except ImportError: - __version__ = "1.8.39+?" + __version__ = "1.8.40?" diff --git a/datacube_ows/update_ranges_impl.py b/datacube_ows/update_ranges_impl.py index 00649901..1741773f 100755 --- a/datacube_ows/update_ranges_impl.py +++ b/datacube_ows/update_ranges_impl.py @@ -170,6 +170,11 @@ def main(layers: list[str], click.echo("") click.echo(" Try running with the --schema options first.") sys.exit(1) + elif isinstance(e.orig, psycopg2.errors.NotNullViloation): + click.echo("ERROR: OWS materialised views are most likely missing a newly indexed product") + click.echo("") + click.echo(" Try running with the --viewes options first.") + sys.exit(1) else: raise e if errors: diff --git a/tests/test_data.py b/tests/test_data.py index 015c0225..d02409f1 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -32,12 +32,16 @@ def __init__(self, uris): "s3://test-bucket/hello_world/data.yaml" ]) d2 = TestDataset([ - "s3://test-bucket/hello.word/foo.bar/hello.test.yaml", - "s3://test-bucket/hello.word/foo.bar/hello-test.yaml" + "s3://test-bucket/hello.word/foo.bar/hello.test.yaml", + "s3://test-bucket/hello.word/foo.bar/hello-test.yaml" + ]) + d3 = TestDataset([ + "s3://test-bucket/this.is/from.stac/hello.test.json", ]) datasets.append(d1) datasets.append(d2) + datasets.append(d3) class DataSetMock: def __init__(self, datasets): @@ -69,6 +73,7 @@ def test_s3_browser_uris(s3_url_datasets): assert "http://test-bucket.s3-website-ap-southeast-2.amazonaws.com/?prefix=hello_world" in uris assert "http://test-bucket.s3-website-ap-southeast-2.amazonaws.com/?prefix=hello.word/foo.bar" in uris + assert "http://test-bucket.s3-website-ap-southeast-2.amazonaws.com/?prefix=this.is/from.stac" in uris # TODO: read_data is now a method of the DataStacker class. This test needs a rewrite. # @patch('xarray.Dataset')