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

Resource not updated when only submodule has changes (because of cache) #421

Open
ThibaultDelaune-pro opened this issue Jan 17, 2024 · 0 comments
Labels

Comments

@ThibaultDelaune-pro
Copy link

ThibaultDelaune-pro commented Jan 17, 2024

Describe the bug

I have a repo with multiple git submodules within. When changes appear in any of that submodule, even if I have submodule_remote: true, the corresponding resource is not updated because of cache existance.

Reproduction steps

  1. create a Git repo with any content in it --> child-repo
  2. create another Git repo with child-repo as a Git submodule --> parent-repo
  3. create a pipeline with a resource on parent-repo
  4. create a job wich make a get on parent-repo (with submodule_remote param)
  5. launch a first time the job
  6. make a change on child-repo
  7. launch the job again
  8. observe that the resource hasn't change ("INFO: found existing resource cache")
    ...

Expected behavior

At 8th step, I expect that the resource fetch the parent-repo in order to have the latest changes in any of its childs repos.

Additional context

parent-repo

|_ child-repo/
|_ somefile

child-repo

|_ README

pipeline.yaml

resources:
- name: my-repo
  type: git
  source:
    uri: ssh://git@git-scm.***:2222/parent-repo.git
    private_key: ******
    branch: master

jobs:
- name: test
  plan:
  - get: parent-repo
    params:
      submodule_remote: true
  - task: show-readme-content
    config:
      platform: linux
      image_resource:
        type: registry-image
        source:
          repository: busybox
      inputs:
      - name: git-repo
      run:
        path: /bin/sh
        args:
        - -ec
        - |
          cat git-repo/child-repo/README

If I modify the README just before the 2nd launch (6th step), I don't see the changes in the console!

it can also be noted that if I run fly crc -r my-pipeline/parent-repo, it does not work either.

Concourse version : v7.9.1

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

No branches or pull requests

1 participant