Skip to content

cmd/go: [modules + integration] use several goproxy sources simultaneously #31304

Closed
@nim-nim

Description

@nim-nim

This report is part of a series, filled at the request of @mdempsky, focused at making Go modules integrator-friendly.

Please do not close or mark it as duplicate before making sure you’ve read and understood the general context. A lot of work went into identifying problems points precisely.

Needed feature

Go needs to allow using multiple goproxy sources simultaneously (at least 2).

Constrains

  • the sources may be specified in an environment variable, or a config file
  • the config file is probably the best solution as URLs can get long and messy
  • if using a config file, it should reside in /etc/go/something completed or masked by ~/.config/go/something on Linux systems, as per the Filesystem Hierarchy Standard and the XDG Base Directory Specification
  • it is desirable for the list of goproxy sources to be hierarchical:
    • if a suitable module is found in several sources, take it from the higher-priority source
    • or even do not search for better (closer to HDR) module versions in lower priority sources, once something suitable has been found in higher-priority sources
  • one source may be “Internet” (direct download)
  • the “Internet” source must be optional

Motivation

In integrator workflows, a single goproxy can not be used, due to the distinction between:

  • modules that passed QA in another CI/CD job and
  • modules being created in this CI/CD job

For build reliability and security, the first class of modules must be deployed on a read-only goproxy. The second class however, has to be deployed on a read-write goproxy (because the aim of the CI/CD job is to create and write those modules).

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.modules

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions