Skip to content
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

chore: create issue fingerprint table in postgres #25690

Merged
merged 12 commits into from
Oct 24, 2024

Conversation

daibhin
Copy link
Contributor

@daibhin daibhin commented Oct 18, 2024

Problem

Related to Related to https://github.com/PostHog/product-internal/pull/662

Changes

Adds a new Postgres table that tracks any issue fingerprint overrides. This is the source of truth from which the ClickHouse table is based.

class ErrorTrackingIssueFingerprint(models.Model):
team = models.ForeignKey("Team", on_delete=models.CASCADE, db_index=False)
issue = models.ForeignKey(ErrorTrackingGroup, on_delete=models.CASCADE)
fingerprint = models.CharField(max_length=400)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Going with a string here. I know fingerprints are arrays of strings right now but I feel like the intention is to move towards a proper hash that will be stored as a string

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's correct, yeah.... although I don't know that setting a 400 character limit on it is a good idea. We want a postgres TEXT field here I think (unless this is a constraint coming from clickhouse?)

Copy link
Contributor

Choose a reason for hiding this comment

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

400 is a "magic number" dotted around our codebase whose significance I don't understand.

@daibhin daibhin requested a review from a team October 21, 2024 13:42
@daibhin daibhin merged commit 632bb8d into master Oct 24, 2024
87 checks passed
@daibhin daibhin deleted the dn-chore/create-issue-fingerprint-table branch October 24, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants