Skip to content

Commit

Permalink
use created_at to validate snapshot state
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry committed Aug 19, 2021
1 parent aeb87dd commit 997daeb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions biothings/hub/datarelease/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def __init__(self, snapshot_manager, *args, **kwargs):

def get_pre_post_previous_result(self, build_doc, key_value):
assert build_doc["snapshot"][key_value], "previous step not successful"
assert build_doc["snapshot"][key_value]["snapshot"]
assert build_doc["snapshot"][key_value]["created_at"]
previous_result = build_doc["snapshot"][key_value]["conf"]["repository"]
return previous_result

Expand Down Expand Up @@ -766,7 +766,6 @@ def published(f):
task.add_done_callback(published)
yield from task


def done(f):
try:
_ = f.result()
Expand Down Expand Up @@ -1457,9 +1456,9 @@ def publish(self, publisher_env, snapshot_or_build_name, *args, **kwargs):
"snapshot", {}):
# doc was returend with snapshot_or_build_name matching _id, not snapshot name, invalidate
snapshot_doc = None
# TODO
# TODO
# diff is wrt another diff, maybe should be this way?
#--------------------------------------
#--------------------------------------
# if diff_doc and snapshot_or_build_name not in diff_doc.get("diff", {}):
if diff_doc and not diff_doc.get("diff", {}):
diff_doc = None
Expand Down

0 comments on commit 997daeb

Please sign in to comment.