Skip to content

sha256Hash fails to hash symlink to directory  #112

@andreafalzetti

Description

@andreafalzetti

Bug description

When building the image for JetBrains Rider, we hit this error:

 build  components/ide/jetbrains/image:download-rider-latest  (version 249f098fb2645cf5fadbd511dcee0ec35561bb05)

[components/ide/jetbrains/image:download-rider-latest] build started (version 249f098fb2645cf5fadbd511dcee0ec35561bb05)
[components/ide/jetbrains/image:download-rider-latest] package build failed
[components/ide/jetbrains/image:download-rider-latest] Reason: cannot compute hash of /backend/bin/JBDevice.framework/Versions/Current: read /tmp/build/components-ide-jetbrains-image--download-rider-latest.249f098fb2645cf5fadbd511dcee0ec35561bb05/backend/bin/JBDevice.framework/Versions/Current: is a directory
:cloud:  uploading build artifacts to remote cache
build failed
Reason: build failed
FATA[0041] build failed  

In the JetBrains tar.gz there are a couple of files which are symlink other directories. Example:

  • JBDevice.framework/Versions/Current
  • Bridge.framework/Versions/Current

Those are the ones causing the problem

Related code in Leeway: https://github.com/gitpod-io/leeway/blob/main/pkg/leeway/provenance.go#L332
Related PR in gitpod: gitpod-io/gitpod#14524

Steps to reproduce

  1. Start a workspace for this PR: [JetBrains] Add Rider & CLion to beta gitpod#14524
  2. Edit components/ide/jetbrains/image/download.sh and comment out the rm commands
  3. Run leeway build components/ide/jetbrains/image:download-rider-latest

Expected behavior

No response

Example repository

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions