-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
feat(bump-version): bump-version support for explicit version #42970
feat(bump-version): bump-version support for explicit version #42970
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
b06b405
to
2618320
Compare
version_str = value.split("version:", 1)[1] | ||
if semver.VersionInfo.is_valid(version_str): | ||
return value | ||
self.fail(f"{value} is not a valid bump type. Valid choices are {self.choices} or 'version:<semver>'.", param, ctx) |
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.
self.fail(f"{value} is not a valid bump type. Valid choices are {self.choices} or 'version:<semver>'.", param, ctx) | |
self.fail(f"{value} is not a valid bump type. Valid choices are {self.choices} or 'version:<semver-version>'.", param, ctx) |
return value | ||
if value.startswith("version:"): | ||
version_str = value.split("version:", 1)[1] | ||
if semver.VersionInfo.is_valid(version_str): |
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.
Do we care that this allows for e.g. dev versions, alpha versions etc.? My guess is probably not, since we don't intend it to be used much.
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/steps/bump_version.py
Show resolved
Hide resolved
Thanks @erohmensing Since we dont need this ASAP. Im going to wait to see if @alafanechere has some comments. |
@bnchrch that's fine, we should just keep a sharp eye out for errors in that publish channel until this is merged :) |
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.
Haven't tested manually, but the code looks like it'd work.
Appease mypy gods:
pipelines/airbyte_ci/connectors/bump_version/commands.py:16: error: Function is missing a return type annotation [no-untyped-def]
pipelines/airbyte_ci/connectors/bump_version/commands.py:16: note: Use "-> None" if function does not return a value
pipelines/airbyte_ci/connectors/bump_version/commands.py:19: error: Function is missing a type annotation [no-untyped-def]
pipelines/airbyte_ci/connectors/bump_version/commands.py:28: error: Function is missing a type annotation [no-untyped-def]
Found 3 errors in 1 file (checked 156 source files)
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 like this: an elegant way to workaround your issue 👏
name = "bump-type" | ||
|
||
def __init__(self): | ||
self.choices = ["patch", "minor", "major"] |
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.
nit: wondering if there could be an enum with these values we could pulled from the semver
lib
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.
Can you please update the bump-version
doc?
efccd5f
to
f2db0de
Compare
f2db0de
to
03df7ac
Compare
What
Updates
bump_version
to allow for explicit setting of a versionWhy
This is to support the temporary decision to keep source-declarative-manifest and the cdk with the same version
In the long term we plan to add a better way to resolve CDK to SDM versions on the platform