Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#80117 - [dagger] checkVersionCompatibility failed to parse engine version as semver: No Major. ┃ Minor.Patch

Attached to Project: Arch Linux
Opened by Wouter Van Hemel (wvh) - Tuesday, 31 October 2023, 15:11 GMT
Last edited by George Rawlinson (rawlinsong) - Friday, 03 November 2023, 21:19 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To George Rawlinson (rawlinsong)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I'm trying to run the Go SDK v0.8.8 and v0.9.1 and I'm getting the following error with the current v0.9.1 version of the `dagger` package:

```
$ dagger run go run main.go
┣─╮
│ ▽ init
│ █ [1.22s] connect
│ ┣ [1.18s] starting engine
│ ┣ [0.04s] starting session
│ ┃ OK!
│ ┻
█ [1.45s] go run main.go
┃ Building with Dagger
┃ failed to check version compatibility: input:1: checkVersionCompatibility failed to parse engine version as semver: No Major.
┃ Minor.Patch elements found
█ [0.00s] ERROR checkVersionCompatibility(version: "0.9.1")

• Engine: 29313be02785 (version main)
⧗ 2.68s ✔ 4 ✘ 1
$ dagger version
dagger devel (ed98d775a) (registry.dagger.io/engine) linux/amd64
```

I think that the `dagger` service needs a SemVer on build to be able to talk to connecting clients, and the compiled version of `dagger` in this package has a fallback `devel` hash injected during build. Apparently connecting clients don't like to be served that `devel` fallback version string.


Additional info:
* package version(s): v0.8.8 and v0.9.1 (current)

Steps to reproduce:
- create a "hello world" Go Dagger SDK program
- run `dagger run go run main.go`
- the build process returns a version string error (assumably when the Go SDK tries to connect to the Dagger service)

The solution would be to make sure the actual SemVer version string is injected during the build process; or perhaps ping the Dagger developers about being more flexible in the client SDK.
This task depends upon

Closed by  George Rawlinson (rawlinsong)
Friday, 03 November 2023, 21:19 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 0.9.2-1
Comment by loqs (loqs) - Tuesday, 31 October 2023, 16:07 GMT
If you rebuild dagger with the attached diff applied; does it resolve the issue?
Comment by Wouter Van Hemel (wvh) - Thursday, 02 November 2023, 03:54 GMT
Fails to build from source.

The package `mitchellh/osext` was apparently deprecated and has been removed from Github. (It's a dependency somewhere deep down the rabbit hole.)

See: https://pkg.go.dev/github.com/mitchellh/osext


```
==> Starting prepare()...
go: github.com/tonistiigi/go-actions-cache@v0.0.0-20220404170428-0bdeb6e1eac7 requires
github.com/moby/buildkit@v0.8.1 requires
github.com/containerd/stargz-snapshotter@v0.0.0-20201027054423-3a04e4c2c116 requires
github.com/Microsoft/hcsshim/test@v0.0.0-20200826032352-301c83a30e7c requires
github.com/docker/distribution@v0.0.0-20190905152932-14b96e55d84c requires
github.com/mitchellh/osext@v0.0.0-20151018003038-5e2d6d41470f: invalid version: git ls-remote -q origin in /home/wouter/TMPBUILD/src/pkg/mod/cache/vcs/94ed57c5b21c953d93b47487113db43a5c9b69fd990329ec70dc77348c4dd443: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Confirm the import path was entered correctly.
If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.
==> ERROR: A failure occurred in prepare().
Aborting...
```
Comment by loqs (loqs) - Thursday, 02 November 2023, 08:28 GMT
It builds for me with the patch applied in a clean chroot [1]. I increased the pkgver to 1.1 to distinguish the patched build. Logs for that build attached. The package that produced is linked below:

https://drive.google.com/file/d/1Z6g1ZR12fKOrZ5EGXcI5B1vrUhHHvyi-/view?usp=sharing dagger-0.9.1-1-x86_64.pkg.tar.zst

[1]: https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot

Loading...