Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
2562 - Per-file parsing log, tech memo #3275
2562 - Per-file parsing log, tech memo #3275
Changes from 8 commits
94c6e0d
a6f7352
743d580
181e671
e5d20da
2b515d9
750ff44
85a1710
96f45d4
2b07c68
8d01df3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats a good idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking it could be nice to call out why S3 is "better" as opposed to storing the file in postgres. I caught myself asking the question again and then reasoning about it while reading. Your call though, im good either way!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to also call out that although s3 is nice option, there is still 5TB size limit (it's a lot but can be filled out quickly), we might need to think about retention policy. S3 has different tiers, a less frequent access tier is: S3 Standard-IA we might want to look into that to backup logs after some time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elipe17 @raftmsohani updated, let me know what you think. i couldn't think of a reason we'd put the files in postgres, so i didn't mention alternatives to s3. just some pros and cons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How much memory does it need? I can't imagine more a couple of KB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, it shouldn't take much. there is an impact though, and i think it would be correlated to how many instances of
logger
are being storedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if
reparse_id
isNone
? Do we have to pass thereparse_id
to all parse functions to be able to callget_logger_instance
or is it available in the datafile model?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part takes a little finagling. We need some unique information to recall the logger from the manager class - in my mind,
datafile_id
is probably enough, but i includedreparse_id
to differentiate the resulting log files.either way, enough information to reconstruct the identifier (or the identifier itself) needs to be passed into functions that require the logger. I don't see a good way around that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so too. Ill do some more thinking about how we can avoid passing the ID(s) and see if I come up with anything. Non blocking though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we couldnt have a one to many relation on the datafile? The datafile model is no longer deleted during a reparse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having a url property on
DataFile
is what I was referring to being wiped out. We could absolutely do a one-to-many relationship by creating another model to hold the s3 urlThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right my brain wasn't working. For some reason I was thinking we could have a foreign key on the URL but that doesnt make sense. Thank you.