Skip to content

Commit

Permalink
Ignore the requested field when calculating the expected hash
Browse files Browse the repository at this point in the history
  • Loading branch information
addyess committed Mar 4, 2024
1 parent 9d8dbf2 commit c3e32a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ops/ops/interface_gcp/requires.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ def from_json(s: str):
except json.decoder.JSONDecodeError:
return s

to_sha = {key: from_json(val) for key, val in self._to_publish.items()}
to_sha = {
key: from_json(val)
for key, val in self._to_publish.items()
if key != "requested"
}
return sha256(json.dumps(to_sha, sort_keys=True).encode()).hexdigest()

def _request(self, keyvals):
Expand Down

0 comments on commit c3e32a7

Please sign in to comment.