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

Deal with old Github runs #5

Open
elisabettai opened this issue Sep 29, 2023 · 3 comments
Open

Deal with old Github runs #5

elisabettai opened this issue Sep 29, 2023 · 3 comments

Comments

@elisabettai
Copy link

elisabettai commented Sep 29, 2023

It looks like that GitHub CI runs disappear after a while.

E.g. I had a repo with the last commit from June 2022 (484 days ago), which had no CI runs associate to it anymore.
This fails with:

$ 'git ls-remote https://github.com/ITISFoundation/spinal-cord-toolbox.git refs/heads/main -q'
==================================================
GENERATED PIPELINE
==================================================
stages:
    - info
no-further-action-required:
    image: $CI_SERVICE_INTEGRATION_LIBRARY
    tags:
    stage: info
    tags:
        - DOCKER
        - XSERVER
        - GPU
        - LINUX
    script:
        - echo "Nothing required updates. No builds scheduled."
==================================================
Traceback (most recent call last):
  File "/.pyenv/versions/3.10.10/bin/dpos", line 33, in <module>
    sys.exit(load_entry_point('docker-publisher-osparc-services==0.0.1', 'console_scripts', 'dpos')())
  File "/.pyenv/versions/3.10.10/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/.pyenv/versions/3.10.10/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/.pyenv/versions/3.10.10/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/.pyenv/versions/3.10.10/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/.pyenv/versions/3.10.10/lib/python3.10/site-packages/docker_publisher_osparc_services/cli.py", line 130, in main
    asyncio.get_event_loop().run_until_complete(run_command(config))
  File "/.pyenv/versions/3.10.10/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/.pyenv/versions/3.10.10/lib/python3.10/site-packages/docker_publisher_osparc_services/cli.py", line 38, in run_command
    if not await did_ci_pass(repo_model, branch_hash):
  File "/.pyenv/versions/3.10.10/lib/python3.10/site-packages/docker_publisher_osparc_services/operations.py", line 47, in did_ci_pass
    return await github_did_last_repo_run_pass(repo_model, branch_hash)
  File "/.pyenv/versions/3.10.10/lib/python3.10/site-packages/docker_publisher_osparc_services/http_interface.py", line 31, in github_did_last_repo_run_pass
    raise Exception(f"Could not find associated run to commit {branch_hash}")
Exception: Could not find associated run to commit ca7b4a14eff6c188e786ca4ec6b2a4b68bcdad32

And it might happen again.
Workarounds exist, so it is not very urgent.

Workaround

Trigger a pipeline run in the concerned repository (e.g. just edit the README.md directly in the main/master branch) or any other file that is not ignored and that triggers a CI run. The Ci doesn't need to be "green" at the end.

@GitHK
Copy link
Collaborator

GitHK commented Apr 5, 2024

fixed in v1.0.4 by 90cf8a4

@GitHK GitHK closed this as completed Apr 5, 2024
@elisabettai elisabettai reopened this Apr 5, 2024
@GitHK
Copy link
Collaborator

GitHK commented Apr 5, 2024

Above fixed a different issue, related to pagination.

@elisabettai
Copy link
Author

This occurred again to @Konohana0608 and @wvangeit and it will happen again, since CI runs on Github are deleted after 90 days.

@pcrespov, @sanderegg, as a Owner of IT'IS Foundation, I just noticed that we can increase CI logs and artifacts retention time to 400 days. Do you have anything against increasing from the current 90 days?

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

2 participants