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

stale caches -- any way to avoid or flush? #779

Closed
3 tasks done
tmc opened this issue Jun 24, 2023 · 4 comments · Fixed by #1031
Closed
3 tasks done

stale caches -- any way to avoid or flush? #779

tmc opened this issue Jun 24, 2023 · 4 comments · Fixed by #1031

Comments

@tmc
Copy link

tmc commented Jun 24, 2023

Welcome

  • Yes, I understand that the GitHub action repository is not the repository of golangci-lint itself.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc).

Description of the problem

I maintain https://github.com/tmc/langchaingo and have encountered several apparent stale caches.

Locally and currently in CI I see

$ make lint
golangci-lint run --color=always --sort-results ./...
chains/llm.go:88:1: GetMemory returns interface (github.com/tmc/langchaingo/schema.Memory) (ireturn)
// GetOutputKeys returns the output keys the chain will return.
^

locally a cache clean fixes this but I don't see any way to do that with this action

Version of golangci-lint

golangci-lint has version 1.52.2 built with go1.20.2 from da04413 on 2023-03-23T16:18:48Z

Version of the GitHub Action

3.6.0

Workflow file

name: ci

on:
  push:
  pull_request:
    branches:
      - main

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-go@v4
        with:
          go-version: stable
          # Cache is managed by golangci-lint
          # https://github.com/actions/setup-go#caching-dependency-files-and-build-outputs
          cache: false
      - uses: actions/checkout@v3
      - name: golangci-lint
        uses: golangci/golangci-lint-action@v3.6.0
  build-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-go@v4
        with:
          go-version: stable
          cache: false
      - uses: actions/checkout@v3
      - name: Build
        run: go build -v ./...
      - name: Test
        run: go test -v ./...

Go version

1.20.5

Code example or link to a public repository

https://github.com/tmc/langchaingo/actions/runs/5363122543/jobs/9730477729

@tmc tmc changed the title stale caches -- any way to flush stale caches -- any way to avoid or flush? Jun 24, 2023
@tmc
Copy link
Author

tmc commented Jun 24, 2023

I see

// TODO: configure it via inputs.
-- exposing an input to influence/bump the cache key would be helpful.

@tmc
Copy link
Author

tmc commented Jun 24, 2023

Should the version of golangci-lint be part of the key?

@painhardcore
Copy link

I Have the similar issue, cache is not even restored but have ireturn issues. I wonder how to trigger golangci-lint cache clean

@ldez
Copy link
Member

ldez commented May 4, 2024

Hello,

there is a dedicated section inside the GitHub Actions pages called Caches, inside this section you can delete the cache.

Screenshot_20240504_031151

https://github.com/XXX/YYY/actions/caches

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

Successfully merging a pull request may close this issue.

3 participants