Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action: query the Go proxy for CUE versions #13

Merged
merged 1 commit into from
Aug 2, 2023

Commits on Aug 2, 2023

  1. action: query the Go proxy for latest CUE version

    We believe that the cause of intermittent GitHub API 403 responses,
    which are now exposed to the Action consumer and not masked, is that
    this Action doesn't use a GITHUB_TOKEN (even when provided as an envvar)
    to authenticate to the GitHub API.
    
    Therefore, all our API requests are unauthenticated, which are nominally
    rate-limited at a level which shouldn't affect any consumer. However,
    they *do* affect consumers: ourselves, in testing, and also in
    production.
    
    We hypothesise that this is because GitHub-hosted GitHub Actions runners
    are issued IP addresses from some shared pool, thus any requests "we"
    make are counted against a rate limit that a previous user may have
    already used up.
    
    To get round this, this commit changes the Action's behaviour to use the
    Go Proxy as the upstream decision maker for which CUE version is the
    "latest", instead of querying the GitHub API for all versions and then
    making this decision locally. This has the advantage of harmonising the
    Action and the Go CLI's concepts of "latest".
    
    An alternative would be to teach this Action's API requests to use the
    GITHUB_TOKEN, if provided. This would have the downside of needing the
    Action's consumers to provide this token in their workflows, so we avoid
    this alternative for now.
    
    Signed-off-by: Jonathan Matthews <[email protected]>
    jpluscplusm committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    eb2a542 View commit details
    Browse the repository at this point in the history