BioDynaMo / biodynamo

BioDynaMo is a high-performance and modular, agent-based simulation platform.
Apache License 2.0
95 stars 46 forks source link

Making a PR from a branch of fork repository causes workflows to fail #373

Closed imorlxs closed 2 months ago

imorlxs commented 3 months ago

Describe the bug If you fork the repository and create a branch in it, the workflows will fail when you make a pull request. This issue occurs because the workflow tries to find your branch in the main repository. Since your branch does not exist there, curl returns a 404 error, and the installation cannot proceed. The PR that led me to discover this is #372

The workflows that fails are:

To Reproduce Steps to reproduce the behavior:

  1. Create a branch with unique name in your fork
  2. Make some commits
  3. Open a pull request
  4. See error: `% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 14 100 14 0 0 133 0 --:--:-- --:--:-- --:--:-- 133 bash: line 1: 404:: command not found`

Expected behavior Workflows are executed correctly

Additional context I think the error is in https://github.com/BioDynaMo/biodynamo/blob/cf540ee85582a5132aa451aa22c7867787b5e2b2/.github/workflows/ubuntu-system-ci.yml#L58 (and the other workflows files) I think that the ${GHA_BRANCH_NAME} returns the original branch (the fork one), not the master (where the PR will be). When trying to curl, the link returns a 404 and bash can't execute it

TobiasDuswald commented 3 months ago

Can you elaborate on the 'Describe the bug' part? It's unclear to me what goes wrong. Can you maybe link the PR run led you to discover this? Also, is it just Ubuntu or all of the CI's?

imorlxs commented 3 months ago

Done. The issue arises when contributors fork the repository and create branches. The workflows fail because it attempt to locate the branch in the main repository. As the branch doesn't exist there, this results in a 404 error. I'm currently working on a fix.