You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TPT-4130: add support for valkey as a new managed database - #759
This PR adds support for Valkey as a new managed database type in linode python sdk
What does this PR do and why is this change necessary?
TPT-4130 is tracking InnerSource DX tools initiative changes covering Managed Database Valkey as an addition to the list of supported database engine type. The support for Valkey is already released to APIv4 and is live in production (as a limited availability offering). Adding this support in linodeapiv4-python sdk will help us prepare to announce Valkey as GA/
✔️ How to Test
What are the steps to reproduce the issue or verify the changes?
Unit test coverage has been updated
# Install development dependencies (if needed)
make dev-install
# Run the focused Valkey unit tests
python -m pytest test/unit/groups/valkey_test.py test/unit/objects/valkey_test.py -q
# Run the full mocked unit suite
make test-unit
# Check the Valkey integration tests without making live API calls
python -m pytest test/integration/models/database/test_valkey.py -q
How do I run the relevant unit/integration tests?
I setup LINODE_TOKEN env var and ran, based on documentation:
…etwork teardown to prevent leaked resources'
Adjusted text logic to account for the test scenario where If the private-network test fails before detaching the database, the fixture’s cleanup runs after the test’s subnet/VPC finalizers, so network deletion can fail while the database is still attached. The change is to register database cleanup on request.node so it runs before subnet and VPC cleanup.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Credential reset and patch invalidate cached state before the POST succeeds, discarding unsaved changes if the request fails; invalidation should occur only after success.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Preserve unsaved changes when credential reset fails
linode_api4/objects/database.py:650
If the credential-reset POST fails, invalidate() has already discarded unsaved changes such as label and allow_list. Send the POST first, then invalidate only on success and return its response. The same issue affects patch() at line 647.
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
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.
📝 Description
This PR adds support for Valkey as a new managed database type in linode python sdk
What does this PR do and why is this change necessary?
TPT-4130 is tracking InnerSource DX tools initiative changes covering Managed Database Valkey as an addition to the list of supported database engine type. The support for Valkey is already released to APIv4 and is live in production (as a limited availability offering). Adding this support in linodeapiv4-python sdk will help us prepare to announce Valkey as GA/
✔️ How to Test
What are the steps to reproduce the issue or verify the changes?
How do I run the relevant unit/integration tests?
I setup LINODE_TOKEN env var and ran, based on documentation: