Skip to content

[BUG][flagd-inprocess] Semver detection is not recognizing versions prefixed with an "v" like "v1.0.0" #106

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

Closed
aepfli opened this issue Nov 20, 2024 · 1 comment · Fixed by #107
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@aepfli
Copy link
Member

aepfli commented Nov 20, 2024

use https://github.com/open-feature/python-sdk-contrib/pull/105/files#diff-c0e0afcf1c3a48af5dba2265c040eb008205f50860791d77316b748205907d2aR87-R144 to verify this. this is the migrated test code from the js flagd provider

see documentation for python semver https://python-semver.readthedocs.io/en/3.0.0-dev.3/usage.html#creating-subclasses-from-version

our code were it fails:

try:
v1 = semver.Version.parse(str(arg1))
v2 = semver.Version.parse(str(arg2))
except ValueError as e:
logger.exception(e)
return None

@aepfli
Copy link
Member Author

aepfli commented Nov 20, 2024

@open-feature/sdk-python-maintainers i think this can be marked as a good first issue

@beeme1mr beeme1mr added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Nov 20, 2024
@aepfli aepfli changed the title [BUG][flagd-inprocess] Semver detection is not recognizing versions prefixed with an "v" like "v.1.0.0" [BUG][flagd-inprocess] Semver detection is not recognizing versions prefixed with an "v" like "v1.0.0" Nov 21, 2024
aepfli added a commit to open-feature-forking/python-sdk-contrib that referenced this issue Nov 21, 2024
…re#106)

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
aepfli added a commit to open-feature-forking/python-sdk-contrib that referenced this issue Nov 21, 2024
…re#106)

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
aepfli added a commit to open-feature-forking/python-sdk-contrib that referenced this issue Nov 21, 2024
…re#106)

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
aepfli added a commit to open-feature-forking/python-sdk-contrib that referenced this issue Nov 21, 2024
…re#106)

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
aepfli added a commit to open-feature-forking/python-sdk-contrib that referenced this issue Nov 21, 2024
…re#106)

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
gruebel added a commit that referenced this issue Nov 22, 2024
* fix(flagd): fix semver version parsing to allow "v" prefix(#106)

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>

* Update providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/custom_ops.py

Co-authored-by: Anton Grübel <anton.gruebel@gmail.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>

---------

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
Co-authored-by: Anton Grübel <anton.gruebel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
2 participants