Summary
Tagged Apache OpenServerless CLI builds fail their Bats integration tests because the embedded Task engine reports the CLI release version as its own version. Valid Taskfiles using schema version 3 are then rejected whenever the CLI version is lower than 3.
The issue is tracked here because Issues are disabled in both apache/openserverless-cli and sciabarracom/task.
Affected components
- apache/openserverless-cli release workflow
- github.com/sciabarracom/task/v3 v3.38.11
- Tagged CLI versions including 0.9.1-2607102200.dev and 0.1.1-2607102223.dev
Reproduction
- Build the CLI from a semantic version tag.
- Run task tests.
- The Go unit tests pass.
- The Bats test tests/vars.bats fails when ops invokes a valid opsfile with version: 3.
Observed errors:
Schema version (3.0.0) is greater than the current version of Task (0.9.1-2607102200.dev)
Changing the CLI base version to 0.1.1 produces the same result:
Schema version (3.0.0) is greater than the current version of Task (0.1.1-2607102223.dev)
Root cause
The embedded Task version package reads debug.ReadBuildInfo().Main.Version. When Task runs as a library inside ops, the main module is github.com/apache/openserverless-cli, not github.com/sciabarracom/task/v3.
The schema check therefore compares Taskfile schema 3.0.0 against the host CLI version. Local source builds often hide the problem because the main version is reported as (devel), which is not parseable as semver and causes the current-version comparison to be skipped.
Expected behavior
The embedded Task engine should identify itself as v3.38.11 and accept Taskfile schema version 3 independently of the host CLI release version.
Proposed fix
- Update sciabarracom/task so its version resolver uses its own entry from debug.BuildInfo.Deps when embedded, while retaining debug.BuildInfo.Main when Task is the main program. Alternatively, expose an explicit embedded-version override.
- Add a regression test for an embedded host application whose semantic version is lower than 3.
- Publish a new sciabarracom/task module version.
- Update the CLI go.mod and rerun the release workflow.
Changing the CLI version or Taskfile schema is not a valid fix because the two versions describe different components.
CI evidence
In both runs, dependency license checks and Go unit tests pass; the release is blocked only when the embedded Task schema check runs during Bats integration tests.
Summary
Tagged Apache OpenServerless CLI builds fail their Bats integration tests because the embedded Task engine reports the CLI release version as its own version. Valid Taskfiles using schema version 3 are then rejected whenever the CLI version is lower than 3.
The issue is tracked here because Issues are disabled in both apache/openserverless-cli and sciabarracom/task.
Affected components
Reproduction
Observed errors:
Changing the CLI base version to 0.1.1 produces the same result:
Root cause
The embedded Task version package reads debug.ReadBuildInfo().Main.Version. When Task runs as a library inside ops, the main module is github.com/apache/openserverless-cli, not github.com/sciabarracom/task/v3.
The schema check therefore compares Taskfile schema 3.0.0 against the host CLI version. Local source builds often hide the problem because the main version is reported as (devel), which is not parseable as semver and causes the current-version comparison to be skipped.
Expected behavior
The embedded Task engine should identify itself as v3.38.11 and accept Taskfile schema version 3 independently of the host CLI release version.
Proposed fix
Changing the CLI version or Taskfile schema is not a valid fix because the two versions describe different components.
CI evidence
In both runs, dependency license checks and Go unit tests pass; the release is blocked only when the embedded Task schema check runs during Bats integration tests.