Skip to content

"build_plan.task.file" doesn't follow symlinks #1691

Closed as not planned
Closed as not planned

Description

@cjcjameson

Bug Report

We've got a "PR Pipeline" that uses the PR resource. When we need to change the filename of a particular task.yml, there's a rough cutover period when everyone needs to rebase their PRs kinda all at the same time or else they get Orange "task.yml not found" errors.

We were making a file-renaming that was going to affect the PR pipeline, and we wanted to make it smoother for people by:

  1. Rename the file
  2. Put in a symlink for the old filename to point to the new filename
  3. Don't yet make a change to the PR Pipeline manifest file nor the configuration that has been fly set-pipelined up to concourse
  4. Commit in Update README.md #1 and Cleanup formatting and add a simple description #2 in the same commit to master
  5. Email out saying "Rebase your PRs in the next two business days"
  6. Wait two business days
  7. Update the PR pipeline file and remove the symlink
  8. fly set-pipeline the new PR pipeline configuration
  9. Commit Update README.md #7 together in the same commit to master

That way, as long as people rebased at some point within the two business days, they get uninterrupted PR pipeline support.

However, this workflow relies on a Build Plan following symlinks in task.file, which it seems to not.

image

So that's the technical crux.

More Details:

  • Concourse version: Tested on both 2.7.3 and 3.5.0
  • Deployment type (BOSH/Docker/binary): BOSH
  • Infrastructure/IaaS: AWS
  • Browser (if applicable): Chrome
  • Did this used to work? Not necessarily -- may never have worked.

Activity

  1. cjcjameson commented on Oct 3, 2017

    @cjcjameson
    ContributorAuthor

    @jtarchie for reference on the PR Pipeline -- I don't think this is an issue with the PR Pipeline but a relevant workflow / pattern if you're interested

    @pivotal-mike @divyabhargov @goutamtadi1 @kmacoskey @doty-pivotal @l-wang for visibility

  2. vito commented on Oct 3, 2017

    @vito
    Contributor

    What happens?

  3. cjcjameson commented on Oct 3, 2017

    @cjcjameson
    ContributorAuthor

    We've lost the configuration, but it goes orange and specifically says that it's looking for a platform: and one other field that would typically be in a task.yml

    Thus we conclude that it's literally parsing the contents of the symlink (as they might show up in Github, for example). It does find a file.

  4. cjcjameson commented on Oct 3, 2017

    @cjcjameson
    ContributorAuthor

    Recreated the issue: we see

    failed to load gpdb_src/concourse/tasks/im-a-symlink.yml: invalid task configuration:
      missing 'platform'
      missing path to executable to run
    
  5. professor commented on Nov 15, 2018

    @professor

    My current team came across the same issue too. It appears that the concourse worker does not follow symlinks. less task.yml works from a hijacked container, but the worker can not read the contents.

    We were wanting to move some files without causing 30+ developers to re-fly their pipelines.

  6. professor commented on Nov 16, 2018

    @professor

    Interestingly, ioutil.ReadFile(configPath) can follow and read symlinks.

    https://github.com/professor/go-read-symlink/blob/master/main.go

    Not sure why concourse is having issues with this.

  7. stale commented on Aug 8, 2019

    @stale

    Beep boop! This issue has been idle for long enough that it's time to check in and see if it's still important.

    If it is, what is blocking it? Would anyone be interested in submitting a PR or continuing the discussion to help move things forward?

    If no activity is observed within the next week, this issue will be exterminated closed, in accordance with our stale issue process.

  8. anitgandhi commented on Aug 12, 2020

    @anitgandhi

    Can we consider re-opening this? I'm still observing this issue on 6.3.0.

  9. reopened this on Aug 13, 2020
  10. matthewcosgrove commented on Sep 30, 2020

    @matthewcosgrove

    Would be handy for Concourse to support symlinks for sure. Can anyone narrow down which parts of the codebase are relevant to review for a potential fix?

  11. taylorsilva commented on Oct 1, 2020

    @taylorsilva
    Member

    A bit of a guess here but I think this function in worker.client is what the web node uses to fetches a file:

    func (client *client) StreamFileFromArtifact(
    ctx context.Context,
    logger lager.Logger,
    artifact runtime.Artifact,
    filePath string,
    ) (io.ReadCloser, error) {

    Example of usage here:
    stream, err := s.client.StreamFileFromArtifact(s.ctx, s.logger, art, file)
    if err != nil {
    if err == baggageclaim.ErrFileNotFound {

    Not 100% sure but the change may have to happen in baggageclaim which is the component that handles volumes on the worker, including all streaming.

  12. mgranoski commented on Jun 9, 2021

    @mgranoski

    I am running into this problem myself, a fix would be nice.

  13. taylorsilva commented on Jan 6, 2025

    @taylorsilva
    Member

    Issue Bankruptcy

    This issue is being closed as part of 2025's Issue Bankruptcy declaration. See here for details

    If you think this issue still has merit then feel free to open a new issue and reference this one.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions