miki3421 opened a new issue, #209:
URL: https://github.com/apache/openserverless/issues/209
## 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
1. Build the CLI from a semantic version tag.
2. Run task tests.
3. The Go unit tests pass.
4. 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
1. 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.
2. Add a regression test for an embedded host application whose semantic
version is lower than 3.
3. Publish a new sciabarracom/task module version.
4. 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
- CLI 0.9.1 failure:
https://github.com/apache/openserverless-cli/actions/runs/29120113681
- CLI 0.1.1 confirmation:
https://github.com/apache/openserverless-cli/actions/runs/29121604038
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]