Skip to content

Commit

Permalink
Delete the old workaround for the case where createRepoTopicsAgg do…
Browse files Browse the repository at this point in the history
…esn't exist (now all released).
  • Loading branch information
mildbyte committed Aug 18, 2021
1 parent 8dfa862 commit 546006d
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions splitgraph/cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,19 +756,6 @@ def upsert_metadata(self, namespace: str, repository: str, metadata: Metadata):
Update metadata for a single repository.
"""
response = self._gql(self._prepare_upsert_metadata_gql(namespace, repository, metadata))
if (
response.status_code == 400
and 'Cannot query field \\"createRepoTopicsAgg\\" on type \\"Mutation\\"'
in response.text
):
# TODO: hack, delete when all upgraded.
# We don't yet have API versioning on the GQL side and there's a breaking change
# coming that'll rename createRepoTopic to createRepoTopicsAgg. If there's
# an error calling the latter, rewrite the query to call the former instead.
logging.debug("Using old metadata replacement query")
response = self._gql(
self._prepare_upsert_metadata_gql(namespace, repository, metadata, v1=True)
)
return response

def bulk_upsert_metadata(
Expand Down

0 comments on commit 546006d

Please sign in to comment.