-
Notifications
You must be signed in to change notification settings - Fork 2
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
refactor: DBTP-1766 - version provider #761
base: main
Are you sure you want to change the base?
Conversation
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.
Some questions.
pass | ||
|
||
|
||
# TODO add timeouts and exception handling for requests |
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 this todo not address yet on purpose or by omission?
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.
on purpose as we were not currently handling this so need to do some investigation to decide what we should return in the case of not being able to resolve one of the versions. Will be addressed in a follow up PR as part of the same ticket.
class VersionProvider(ABC): | ||
pass |
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 started writing this suggestion, then realised that the two concrete implementations methods have different arguments. So I'm wondering what the benefit of the abstract class is?
class VersionProvider(ABC): | |
pass | |
class VersionProvider(ABC): | |
@abstractmethod | |
def get_latest_version(repo_name: str, tags: bool = False) -> SemanticVersion: | |
pass |
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 wonder whether the interface can be the same if GithubVersionProvider. get_latest_version()
returns whichever version is highest from the releases or tags?
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.
We'll address this in one of the next PRs.
Addresses DBTP-
Checklist:
Title:
Description:
Tasks: