Skip to content

[v3.52.0 regression] Tests fail when built from source archive #2907

Description

@ReillyBrogan

Description

I was updating the AerynOS package to the latest version when I saw that the test suite now fails. As far as I can tell this is caused by using the Github-generated source archive for building go-task (which is typical for distribution packages as it's much more easily cached) and introduced by 616433d. Likely all of the failing tests should be skipped if running from a non-git source or modified so that they manage their own git directory.

+ go test ./...
--- FAIL: TestGitignoreChecksum (0.00s)
    --- FAIL: TestGitignoreChecksum/ignored_file_modified (0.00s)
        task_test.go:725: Result did not match the golden fixture. Diff is below:

            --- Expected
            +++ Actual
            @@ -1,2 +1,2 @@
            -task: Task "build" is up to date
            +task: [build] cp ./source.txt ./generated.txt


--- FAIL: TestGitignoreNegation (0.00s)
    --- FAIL: TestGitignoreNegation/ignored_file_modified (0.00s)
        task_test.go:741: Result did not match the golden fixture. Diff is below:

            --- Expected
            +++ Actual
            @@ -1,2 +1,3 @@
            -task: Task "build" is up to date
            +task: [build] echo "build executed"
            +build executed


--- FAIL: TestGitignoreNested (0.00s)
    --- FAIL: TestGitignoreNested/ignored_file_modified (0.00s)
        task_test.go:758: Result did not match the golden fixture. Diff is below:

            --- Expected
            +++ Actual
            @@ -1,2 +1,3 @@
            -task: Task "build" is up to date
            +task: [build] echo "build executed"
            +build executed


--- FAIL: TestGitignoreIncluded (0.00s)
    --- FAIL: TestGitignoreIncluded/ignored_file_modified (0.00s)
        task_test.go:773: Result did not match the golden fixture. Diff is below:

            --- Expected
            +++ Actual
            @@ -1,2 +1,3 @@
            -task: Task "included:build" is up to date
            +task: [included:build] echo "build executed"
            +build executed


FAIL
FAIL        github.com/go-task/task/v3      0.458s

Version

v3.52.0

Operating system

Linux (AerynOS)

Experiments Enabled

No response

Example Taskfile

Activity

  1. ReillyBrogan commented on Jul 3, 2026

    @ReillyBrogan
    ContributorAuthor

    CC @vmaerten as author of commit introducing issue.

  2. added
    area: releasingChanges related to the release process.
    and removed
    state: needs triageWaiting to be triaged by a maintainer.
    on Jul 3, 2026
  3. added theissue type on Jul 3, 2026
  4. hiSandog commented on Jul 7, 2026

    @hiSandog

    Distribution source archives are a common build path, so tests that require a git checkout should either create their own temporary repo or skip with a clear reason when .git is absent. That is better than depending on GitHub-generated archives having repository metadata. A packaging-oriented CI job that runs tests from a source archive would catch this class of release regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: releasingChanges related to the release process.

    Type

    Fields

    No fields configured for bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions