Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

client.delete_api() not working anymore?

未关闭
#560 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
api, databases

调研方向

从 client.delete_api() 入口点开始,使用提供的 Python 示例和客户端版本 1.27.0,针对 InfluxDB Cloud 存储桶重现该调用。检查 measurement 删除请求是否被接受,以及新创建的存储桶与较旧的存储桶之间的行为是否不同;确定受支持的行为或记录已确认的原因即视为完成。

由索引模型根据 Issue 内容生成。

描述

bug
Specifications
  • Client Version: 1.27.0
  • InfluxDB Version: Cloud
  • Platform: Windows 10

I am trying to use the below function that we normally use to delete a measurement. But it seems to no longer be working as intended. Has this been depreceated?

  def delete_influx(self, device):
        """Given a 'measurement' name (e.g. device ID), delete the related data from InfluxDB"""
        start = "1970-01-01T00:00:00Z"
        stop = "2099-01-01T00:00:00Z"

        delete_api = self.client.delete_api()
        delete_api.delete(
            start,
            stop,
            f'_measurement="{device}"',
            bucket=self.influx_bucket,
            org=self.org_id,
        )
Code sample to reproduce problem
  self.client.delete_api()
        delete_api.delete(
            start,
            stop,
            f'_measurement="{device}"',
            bucket=self.influx_bucket,
            org=self.org_id,
        )


Expected behavior

The entire measurement should be deleted from my influxdb cloud bucket

Actual behavior

The measurement is not deleted from the cloud bucket. I am not sure if this is related to the test being performed on a newly created cloud bucket, whereas previous tests have been performed on older accounts (where the UI in the cloud bucket looks very different). The versions appear to be the same, though, and I can write data to the bucket without issues.

Additional info

No response

主要语言
Python
星标
792
派生
186
平均合并
3 小时 2 分钟
30 天内合并 PR
1

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

influxdata/influxdb-client-python 的其他 Issue

查看 influxdata/influxdb-client-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。