Skip to content
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

Update to qestdb 2.0.3 API #53

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

antst
Copy link

@antst antst commented Dec 5, 2024

This implements qestdb-2.0 API and lift qestdb dependancy to questdb==2.0.3, as only 2.0.3 version of questdb python module client can be build by pip from sources (if Rust compiler "cargo" is installed).
Earlier versions have bugs here and there and PIP can not build them.
Also, it is much easier to convince questdb people to provide binaries (to avoid building altogether) for recent client, than for old one.

@antst
Copy link
Author

antst commented Dec 10, 2024

@CM000n please, look at it. As everyone, who upgraded to 2024.12, has problem currently.

@mgumz
Copy link
Contributor

mgumz commented Dec 11, 2024

@antst

Logger: homeassistant.setup
Source: setup.py:269
First occurred: 07:04:57 (1 occurrences)
Last logged: 07:04:57

Setup failed for custom integration 'qss': Requirements for qss not found: ['questdb==2.0.3'].

I git-cloned your branch to custom_components (or rather only the qss subfolder). HA:2024.12.2

@antst
Copy link
Author

antst commented Dec 11, 2024

@antst

Logger: homeassistant.setup
Source: setup.py:269
First occurred: 07:04:57 (1 occurrences)
Last logged: 07:04:57

Setup failed for custom integration 'qss': Requirements for qss not found: ['questdb==2.0.3'].

I git-cloned your branch to custom_components (or rather only the qss subfolder). HA:2024.12.2

As there is no prebuilt wheel for questdb yet, and there are couple of obstacles which prevent installation of questdb from sources automatically, you need to look for instructions here:
#52 (comment)

@@ -6,6 +6,6 @@
"documentation": "https://github.com/CM000n/QSS",
"iot_class": "local_push",
"issue_tracker": "https://github.com/CM000n/QSS/issues",
"requirements": ["questdb>=1.2,<2.0", "tenacity>=8.0"],
"requirements": ["questdb==2.0.3", "tenacity>=8.0"],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we at least support all patch and minor version jumps instead of pinning a specific version?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CM000n no, why? when you pin the dep … you do a release on which you know that it works. someone at questdb releases a breaking version, which results in issues opened here.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they take semantic versioning seriously, minor patch releases should never break the API. With a pin, I see a greater risk that users will then remain on a lower version than currently available and not notice and use security-relevant patches.
Unfortunately, I don't have the time or inclination to publish a Qss release for every questdb patch release.

@@ -14,7 +14,7 @@
CONF_AUTH_Y_KEY = "y_key"

RETRY_WAIT_SECONDS = 5
RETRY_ATTEMPTS = 10
RETRY_ATTEMPTS = 10000
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if I like this approach, I'll have to think about it again.
But I think this change should be done independently with the changes necessary for the questdb client update.

@CM000n
Copy link
Owner

CM000n commented Dec 11, 2024

hello @antst. Thank you very much for this PR 😊 Can you please also adjust the pyproject.toml file and update the lock file

@CM000n
Copy link
Owner

CM000n commented Dec 11, 2024

Also pre-commit hooks are failing at the moment 😉

@CM000n CM000n assigned CM000n and antst and unassigned CM000n Dec 11, 2024
@mgumz
Copy link
Contributor

mgumz commented Dec 12, 2024

@antst works.

@antst
Copy link
Author

antst commented Dec 12, 2024

hello @antst. Thank you very much for this PR 😊 Can you please also adjust the pyproject.toml file and update the lock file

I updated deps and version in project file and mainifest and incorporated changes which should make liniter happy. But I have zero clue about lock file. Keep in mind, I am not python dev :)

@saintman23
Copy link

Lookingforward for a fix to use QuestDB with latrest HA...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants