Skip to content

Conversation

@ahmedetefy
Copy link
Contributor

@ahmedetefy ahmedetefy commented Dec 6, 2021

  • Updates subscription deletion to use the new snuba endpoint that accepts an entity_key

For context: getsentry/snuba#2244

@ahmedetefy ahmedetefy requested review from a team and wedamija December 6, 2021 13:16
@ahmedetefy ahmedetefy added the Do Not Merge Don't merge label Dec 6, 2021
@ahmedetefy ahmedetefy changed the title feat(cra-metrics): Updates subscription deletion [DO NOT MERGE] feat(cra-metrics): Updates subscription deletion Dec 6, 2021
@ahmedetefy ahmedetefy requested review from jjbayer and untitaker and removed request for a team December 6, 2021 13:20
Copy link
Member

@wedamija wedamija left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, are the test failures just because the endpoint isn't ready on the snuba side yet?

QueryDatasets.TRANSACTIONS: EntityKey.Transactions,
}[dataset]
# If we get to this, then dataset must be either the metrics or the sessions datasets
except KeyError:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using KeyError feels a bit weird here. Would we better defining the mapping outside and for all entities/datasets, then doing:

entity_key = entity_key_mapping[dataset]
if entity_key in [EntityKey.MetricsCounters, EntityKey.Sessions]:
    # Do extra error checking
return entity_key

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah you are right!

@ahmedetefy
Copy link
Contributor Author

are the test failures just because the endpoint isn't ready on the snuba side yet?

yep getting those merged in today though

Updates subscription deletion to use the new
snuba endpoint that includes the entity key
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants