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

clean submodule #358

Open
GongT opened this issue Sep 28, 2020 · 3 comments
Open

clean submodule #358

GongT opened this issue Sep 28, 2020 · 3 comments

Comments

@GongT
Copy link

GongT commented Sep 28, 2020

current

When clean: true, during Cleaning the repository, it will do:

git clean -ffdx
git reset --hard HEAD

want

When submodules: true or submodules: recursive, I want it also do:

git submodule foreach [--recursive] git clean -ffdx
git submodule foreach [--recursive] git reset --hard

why

I have a submodule in C++, I want to recompile it without cache everytime.

I was manually run git reset before make. But after I set submodule.xxx.update = rebase, it may (or may not) fail during Fetching submodules step.

The clean step must happend before submodule update in my case.

avtikhon added a commit to tarantool/tarantool that referenced this issue Apr 13, 2021
Found that 'actions/checkout' does not remove all temporary files from
previous runs in submodules [1], it runs only 'git clean --xffd' [2]:

  libgcov profiling error:/home/ubuntu/actions-runner/_work/tarantool/tarantool/src/lib/small/CMakeFiles/small.dir/small/small_class.c.gcda:overwriting an existing profile data with a different timestamp

To avoid of it added:

  git submodules foreach --recursive 'git clean -xffd'

to 'actions/environment' which is run after each 'actions/checkout'.

Part of #5986

[1]: https://github.com/tarantool/tarantool/runs/2318244478?check_suite_focus=true#step:5:4012
[2]: actions/checkout#358
avtikhon added a commit to tarantool/tarantool that referenced this issue Apr 13, 2021
Found that 'actions/checkout' does not remove all temporary files from
previous runs in submodules [1], it runs only 'git clean --xffd' [2]:

  libgcov profiling error:/home/ubuntu/actions-runner/_work/tarantool/tarantool/src/lib/small/CMakeFiles/small.dir/small/small_class.c.gcda:overwriting an existing profile data with a different timestamp

To avoid of it added:

  git submodules foreach --recursive 'git clean -xffd'

to 'actions/environment' which is run after each 'actions/checkout'.

Part of #5986

[1]: https://github.com/tarantool/tarantool/runs/2318244478?check_suite_focus=true#step:5:4012
[2]: actions/checkout#358
Totktonada pushed a commit to tarantool/tarantool that referenced this issue Apr 14, 2021
Found that 'actions/checkout' does not remove all temporary files from
previous runs in submodules [1], it runs only 'git clean --xffd' [2]:

  libgcov profiling error:/home/ubuntu/actions-runner/_work/tarantool/tarantool/src/lib/small/CMakeFiles/small.dir/small/small_class.c.gcda:overwriting an existing profile data with a different timestamp

To avoid of it added:

  git submodules foreach --recursive 'git clean -xffd'

to 'actions/environment' which is run after each 'actions/checkout'.

Part of #5986

[1]: https://github.com/tarantool/tarantool/runs/2318244478?check_suite_focus=true#step:5:4012
[2]: actions/checkout#358
Totktonada pushed a commit to tarantool/tarantool that referenced this issue Apr 14, 2021
Found that 'actions/checkout' does not remove all temporary files from
previous runs in submodules [1], it runs only 'git clean --xffd' [2]:

  libgcov profiling error:/home/ubuntu/actions-runner/_work/tarantool/tarantool/src/lib/small/CMakeFiles/small.dir/small/small_class.c.gcda:overwriting an existing profile data with a different timestamp

To avoid of it added:

  git submodules foreach --recursive 'git clean -xffd'

to 'actions/environment' which is run after each 'actions/checkout'.

Part of #5986

[1]: https://github.com/tarantool/tarantool/runs/2318244478?check_suite_focus=true#step:5:4012
[2]: actions/checkout#358

(cherry picked from commit 57ab8c2)
Totktonada pushed a commit to tarantool/tarantool that referenced this issue Apr 14, 2021
Found that 'actions/checkout' does not remove all temporary files from
previous runs in submodules [1], it runs only 'git clean --xffd' [2]:

  libgcov profiling error:/home/ubuntu/actions-runner/_work/tarantool/tarantool/src/lib/small/CMakeFiles/small.dir/small/small_class.c.gcda:overwriting an existing profile data with a different timestamp

To avoid of it added:

  git submodules foreach --recursive 'git clean -xffd'

to 'actions/environment' which is run after each 'actions/checkout'.

Part of #5986

[1]: https://github.com/tarantool/tarantool/runs/2318244478?check_suite_focus=true#step:5:4012
[2]: actions/checkout#358

(cherry picked from commit 57ab8c2)
Totktonada pushed a commit to tarantool/tarantool that referenced this issue Apr 14, 2021
Found that 'actions/checkout' does not remove all temporary files from
previous runs in submodules [1], it runs only 'git clean --xffd' [2]:

  libgcov profiling error:/home/ubuntu/actions-runner/_work/tarantool/tarantool/src/lib/small/CMakeFiles/small.dir/small/small_class.c.gcda:overwriting an existing profile data with a different timestamp

To avoid of it added:

  git submodules foreach --recursive 'git clean -xffd'

to 'actions/environment' which is run after each 'actions/checkout'.

Part of #5986

[1]: https://github.com/tarantool/tarantool/runs/2318244478?check_suite_focus=true#step:5:4012
[2]: actions/checkout#358

(cherry picked from commit 57ab8c2)
@Hish15
Copy link

Hish15 commented Apr 18, 2023

Hello,

Why is this still open? This is a big deal!
It's not possible to have a reliable CI without the mean to clean the submodules when checking-out.

@OscarVanL
Copy link

I ran into this issue recently. For me, a file in a submodule got modified by a previous run and then was present in the next run, causing issues.

It would be nice if this got merged so I can have reliable CI without adding hacks.

This was my workaround by the way:

      - uses: actions/checkout@v3
        with:
          submodules: true
      - name: Submodule cleanup fix  # Bodge for https://github.com/actions/checkout/issues/358
        run: |
          git submodule foreach --recursive git clean -ffdx
          git submodule foreach --recursive git reset --hard

@daniel-carr-3000
Copy link

I've also encountered this issue

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

No branches or pull requests

4 participants