-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: keep Item created dates when resupplying TDE-1298 #1145
base: master
Are you sure you want to change the base?
feat!: keep Item created dates when resupplying TDE-1298 #1145
Conversation
2fc7ecf
to
f861c7b
Compare
2ec88dd
to
e00ccb1
Compare
e00ccb1
to
ee8bc25
Compare
4059d62
to
9c3dfa1
Compare
9c3dfa1
to
d82e595
Compare
Approving as pair programmer. |
d82e595
to
8abd002
Compare
11f0a49
to
e87afb0
Compare
5010979
to
ecd0c42
Compare
6a58b41
to
42edc67
Compare
42edc67
to
cbda994
Compare
cbda994
to
e1f1f44
Compare
e1f1f44
to
52f89ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly nitpicking.
As a more general comment, it looks like harmonizing how we handle values and data for testing might potentially make our code more readable and maintainable.
scripts/stac/imagery/create_stac.py
Outdated
created_datetime = updated_datetime = current_datetime | ||
|
||
if published_path: | ||
# FIXME: make this try/catch nicer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to be addressed before merging?
return multihash_as_hex(os.urandom(64)) | ||
|
||
|
||
def any_gdal_version() -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't appear to get used
@@ -1,7 +1,11 @@ | |||
import os |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more specific import?
try: | ||
created_datetime = existing_item["properties"]["created"] | ||
except KeyError: | ||
get_log().info(f"Existing Item {id_} does not have 'properties.created' attribute") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case we should not set the created datetime at all - it needs to be backfilled.
Motivation
assets.visual.created
andproperties.created
datetimes are not changed when resupplying.assets.visual.updated
andproperties.updated
datetimes all are controlled by the caller of the standardise+validate job workflow. This ensures that all theupdated
datetimes for the entire (re-)supply are the same.Modifications
--current-datetime
parameter to standardise+validate (RFC 3339 UTC datetime).created
dates the same on resupply.updated
datetime when its checksum changes.Verification
Unit/integration/E2E tests.