aai-institute / aai-institute/lakefs-spec

[upstream] Tag names cannot contain spaces

未关闭
#282 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug triage
主要语言
Python
星标
65
派生
7
PR 合并指标
30 天内没有已合并 PR

描述

### What happened?

Creating tags as such:

```py
with fs.transaction(repository.id) as tx:
sha = tx.rev_parse("main")
tag = tx.tag(sha, "v2 pipapo hello")
```

does not work because the lakeFS API rejects tag names containing spaces. It says

```
lakefs.exceptions.BadRequestException: code: 400, reason: Bad Request, body: {'message': 'argument tagID: tag id: invalid value: validation error'}
```
but with no mention as to what the validation mechanism (probably regex?) actually is. This would benefit from a bit of validation before sending the API request, to give the user a clearer idea of what actually went wrong.

IMO, it doesn't actually matter where that validation is happening, so it might as well be in lakeFS's Python wrapper project.

### What did you expect to happen?

The tag being created just fine.

### lakeFS-spec version

HEAD

### lakeFS version

latest

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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