Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-20031

Go modules resolution should use modules path location instead of path declared in mod file

    XMLWordPrintable

    Details

      Description

      This is especially important for GoCenter, where users can submit project forks to be processed without fixing the path declared in the mod file, so the original path is still being used. Artifactory sees the module published as being the original one.

      Example: https://gocenter.jfrog.io/gocenter/webapp/#/artifacts/browse/tree/Properties/gocenter-build/github.com/millergarym/opts/@v/v1.1.1.mod

      github.com/millergarym/opts is a fork of github.com/jpillora/opts. The module name declared in the go.mod file was not fixed. After processing github.com/millergarym/opts@v1.1.1 the following request works.:

      → curl --head https://gocenter.jfrog.io/gocenter/api/go/gocenter-uber-virtual/github.com/jpillora/opts/@v/v1.1.1.mod
      HTTP/1.1 200 OK
      
      → curl https://gocenter.jfrog.io/gocenter/api/go/gocenter-uber-virtual/github.com/jpillora/opts/@v/v1.1.1.mod
      module github.com/jpillora/opts
      
      go 1.12
      
      require github.com/posener/complete v1.2.1
      

      It should return a 404 instead since the original module has not been processed yet. This does not allow us to process the original module using the CLI because it sees the original module as already present there.

        Attachments

          Activity

            People

            Assignee:
            nadavy Nadav Yogev
            Reporter:
            eliom Elio Marcolino
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: