Time travel to the date of advisory publish time when importing - #467
Merged
Conversation
sbs2001
force-pushed
the
time_travel_advisory
branch
from
June 13, 2021 11:54
ebb6afa to
33d8daa
Compare
pombredanne
requested changes
Jun 14, 2021
pombredanne
left a comment
Member
There was a problem hiding this comment.
Thanks. See my comments inline for your consideration!
| async def load_api(self, repo_set): | ||
| async with client_session() as session: | ||
| session = client_session() | ||
| async with session as session: |
Member
There was a problem hiding this comment.
This code looks hard to read... we should have intermediate variable to avoid the nested complexity, possibly using generator expressions.
Collaborator
Author
There was a problem hiding this comment.
Tracking this in #492 .
Could you elaborate an approach there ?
| ) | ||
|
|
||
| async def fetch(self, owner_repo: str, session) -> None: | ||
| async def fetch(self, owner_repo: str, endpoint=None) -> None: |
Member
There was a problem hiding this comment.
What about using a purl instead owner_repo
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
sbs2001
force-pushed
the
time_travel_advisory
branch
from
July 3, 2021 04:21
33d8daa to
dd4c14c
Compare
Signed-off-by: Shivam Sandbhor <shivam@crowdsec.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR gets us one step closer to #140 (comment)
High level working:
*VersionAPIclasses to instead accept a cutoff date, to partition the versions accordingly. Here's a simple snippetThings to do
newandvalidkeys, use a class. @pombredanne please help in naming these.