Bug: tea command fails when remote version is a SHA1 #531
Labels
No Label
kind/breaking
kind/bug
kind/build
kind/dependency
kind/deployment
kind/docs
kind
enhancement
kind
feature
kind/proposal
kind
question
kind
refactor
kind/security
kind/testing
kind/translation
priority/critical
priority/high
priority/low
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/has-backport
status/has-pull
status/needs-backport
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
upstream/sdk
No Milestone
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/tea#531
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
describe your environment
tea -v
): 0.9.0-1Version: 0.9.0+11-gfaa9858 golang: 1.20 go-sdk: v0.15.1-0.20220927025037-8f846bdb9bbe
main
,master
, ortrunk
)describe the issue (observed vs expected behaviour)
The tea command fails when when the
version
is a SHA1, I assume this is the remote version as it is a SHA1 from gitea it's self (which I don't have installed).See: https://github.com/go-gitea/gitea/commit/f63af34
Note, that I've replaced some text with (
X
), the last line shows the problemThank you for this report <3
I believe the error is surfaced from the go-sdk due it attempting to parse the version for feature detection.
Right now, it's just failing out, but I wonder if the appropriate action to take would be to assume the lowest version that go-sdk supports in this case. The downside of this is you don't get all of the goodness from the latest APIs, but at least you'd still get a mostly useful experience.
Regarding using the lowest version - I'm not sure what this means in practical terms, but working (even on a basic level) would be a good start :)
Possible first step is over at gitea/go-sdk#612
The solution here might actually be for Gitea itself to provide more info about its version. Just the hash doesn't mean anything; a command like
git describe
can give the latest tagged version + the number of commits since then. Such info could be deconstructed at compile time, and returned by the API as backward-compatible info:Generally the binary does embed better information using describe, so I assumed this was a specially built binary.
Since the Gitea version is set with a build flag, technically anyone could set it to anything.
If the binary isn't actually setting the version correctly, then that may be a bug for the main repo.
It might be our local build. I just found that if you clone our fork (https://github.com/blender/gitea) you don't get any tags. That explains the lack of more detailed versioning info in the API response.
Update: This issue with our build is now tracked at https://projects.blender.org/infrastructure/blender-projects-platform/issues/22
@ideasman42
there is a
version_check
field for logins in the tea config ... just set it totrue