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

Possible bug / security issue with checkout action #561

Closed
avahoffman opened this issue Sep 2, 2022 · 8 comments
Closed

Possible bug / security issue with checkout action #561

avahoffman opened this issue Sep 2, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@avahoffman
Copy link
Contributor

@cansavvy wanted to make sure you saw this.

We were having some render-all workflows failing at git checkout:
https://github.com/jhudsl/GDSCN_Book_Statistics_for_Genomics_scRNA-seq/runs/8164703061?check_suite_focus=true
jhudsl/GDSCN_Book_Statistics_for_Genomics_scRNA-seq#11

Run git config --local user.email "itcrtrainingnetwork@gmail.com"
fatal: --local can only be used inside a git repository
Error: Process completed with exit code 128.

This looks similar to the issue here.

We solved it with the following (example here):

    steps:
      - name: Checkout files
        uses: actions/checkout@v3
        with:
          fetch-depth: 0

      # Set up git checkout
      - name: Set up git checkout
        run: |
          git config --global --add safe.directory "$GITHUB_WORKSPACE"
          git config --local user.email "itcrtrainingnetwork@gmail.com"
          git config --local user.name "jhudsl-robot"

Not sure if we want to implement this just yet, since the checkout actions team might have a fix for it. Suggest keeping a close eye on it!

@cansavvy
Copy link
Collaborator

cansavvy commented Sep 3, 2022

Thanks for digging into this, @avahoffman If it's something that makes OTTR unusable, we should probably implement this fix and then we can undo the fix after the checkout bug is fixed.

@avahoffman
Copy link
Contributor Author

@cansavvy I'm not really sure what's causing it. I relaunched a render-all in another repo and it was fine 🤔 Maybe something specific to the syncs?

@cansavvy
Copy link
Collaborator

cansavvy commented Sep 3, 2022

Maybe something specific to the syncs?

Are you saying this because it has only happened with syncs and your regular PRs are running fine?

@cansavvy
Copy link
Collaborator

cansavvy commented Sep 3, 2022

https://github.com/jhudsl/Documentation_and_Usability/runs/8165984943?check_suite_focus=true

This problem doesn't arise in syncs from general OTTR_Template. I think it may be something related to the pull_request.yml changes in AnVIL_Template. Happy to help look into it further. But I do believe this means this is not an OTTR_Template problem generally but an AnVIL_Template problem.

But let's keep this issue open until we know the real source of the problem. Either way, knowing the source of the issue is informative.

@avahoffman
Copy link
Contributor Author

avahoffman commented Sep 3, 2022

That's what I thought initially, but it's failing on a part of pull-request that we haven't changed.

I encountered a similar problem with an OTTR repo before that was fixed by changing the action version. The initial issue here seems to be related to the version of git running on the container.

I don't think we need to do anything now, just wanted to document this error so it's not maddening when someone else runs across it since this fix seems to work for now 🙂

@cansavvy
Copy link
Collaborator

cansavvy commented Sep 3, 2022

There is an action required and ran before the render-preview that could affect it though. But I haven't looked into this enough.

So far, I'm not able to replicate the error so far which makes it all the more mysterious. I'll look into it later.

Thanks for documenting it, I agree that's a good call!

@avahoffman
Copy link
Contributor Author

avahoffman commented Sep 3, 2022

so mysterious haha. I'll look into it more time permitting!

@cansavvy
Copy link
Collaborator

I think now that we bumped up to @v4 this is addressed! But we can reopen if we see anything happening again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants