concourse icon indicating copy to clipboard operation
concourse copied to clipboard

Fly excludes Mac metadata when uploading local inputs

Open selzoc opened this issue 1 year ago • 7 comments

Changes proposed by this PR

On recent MacOS machines, tar files created (i.e. from fly execute with a local resource) include files prefixed by ._. As a result, once you transfer this tar file to a Linux system and untar, these files may interfere with jobs. This flag will prevent that from happening.

closes #8916

Release Note

  • fly execute no longer includes MacOS extended file attributes when uploading local inputs

selzoc avatar Apr 05 '24 22:04 selzoc

Looks like all the unit tests should get run: https://github.com/concourse/ci/blob/883ba8faf5db4ae8af582143cd7d54f0a59e958b/tasks/scripts/unit#L26

taylorsilva avatar Apr 05 '24 22:04 taylorsilva

Looks like all the unit tests should get run: https://github.com/concourse/ci/blob/883ba8faf5db4ae8af582143cd7d54f0a59e958b/tasks/scripts/unit#L26

I'll note that the code that is changed in go-archive has no unit tests. We'd probably have to do a little refactor to pass in a CommandRunner or something if we want to verify the flags passed to tar.

selzoc avatar Apr 05 '24 22:04 selzoc

@taylorsilva any updates here? I'm not able to see the concourse output of the failed ci runs.

selzoc avatar Apr 26 '24 22:04 selzoc

@selzoc yes! Could you rebase on master please? We had to fix some stuff in the integration test suite. Once you rebase and CI runs again I'll merge the PR. Thanks for pinging btw

Edit: Forgot I could rebase your PR myself!

taylorsilva avatar Apr 27 '24 01:04 taylorsilva

Ah there's an issue with houdini depending on go-archive still. Can reproduce locally with go test -v ./worker/runtime/integration/

# github.com/concourse/concourse/worker/runtime/integration

../gopath/pkg/mod/github.com/vito/[email protected]/container.go:15:2: missing go.sum entry for module providing package github.com/concourse/go-archive/tarfs (imported by github.com/vito/houdini); to add:

	go get github.com/vito/[email protected]

FAIL	github.com/concourse/concourse/worker/runtime/integration [setup failed]

taylorsilva avatar Apr 28 '24 18:04 taylorsilva

OK I pushed a fix for that integration failure - it's a bit weird to have inlined go-archive and also indirectly reference it, but 🤷

selzoc avatar May 03 '24 17:05 selzoc

From the most recent run:

There were failures detected in the following suites:

  tarfs ./go-archive/tarfs [Compilation failure]

  tgzfs ./go-archive/tgzfs [Compilation failure]

  zipfs ./go-archive/zipfs [Compilation failure]


Test Suite Failed

and above that

Failed to compile tarfs:


go: updates to go.mod needed; to update it:

	go mod tidy


Failed to compile tgzfs:


go: updates to go.mod needed; to update it:

	go mod tidy


Failed to compile zipfs:


go: updates to go.mod needed; to update it:

	go mod tidy

image

taylorsilva avatar May 03 '24 23:05 taylorsilva

So running the go-archive tests with go test works fine:

image

Running with ginkgo results in the error seen in CI, which runs this command:

ginkgo -r -p -flake-attempts=3 -race -skip-package ./integration,testflight,topgun,./worker/runtime/integration,./worker/baggageclaim "$@"

Which gets us this output (truncated by me):

Output from proc 1:
  flag provided but not defined: -ginkgo.flake-attempts
  Usage of /Users/taylor/workspace/concourse/concourse/go-archive/tarfs/tarfs.test:
<truncated>

taylorsilva avatar Jun 16 '24 19:06 taylorsilva

Thanks for the initial push making this PR happen @selzoc

taylorsilva avatar Jun 17 '24 01:06 taylorsilva

Thanks for the follow-through @taylorsilva !

selzoc avatar Jun 17 '24 02:06 selzoc