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

interface to re-fetch logs for some specific PR #162

Closed
yarikoptic opened this issue Feb 25, 2023 · 6 comments · Fixed by #171
Closed

interface to re-fetch logs for some specific PR #162

yarikoptic opened this issue Feb 25, 2023 · 6 comments · Fixed by #171
Assignees

Comments

@yarikoptic
Copy link
Member

yarikoptic commented Feb 25, 2023

in attempt to troubleshoot datalad/datalad#7296 I thought to compare logs between to CI runs on that PR, for which we should have had logs on smaug a264136 and 2340b4c, for which we have

$> ls -ld */pr/7271/{a264136,2340b4c} 
drwxr-sr-x 1 datalad datalad 930 Feb 22 03:28 21/pr/7271/2340b4c/
drwxr-sr-x 1 datalad datalad 166 Feb 22 03:20 21/pr/7271/a264136/
drwxr-sr-x 1 datalad datalad  92 Feb 23 03:20 22/pr/7271/2340b4c/
placing the oddity of 1 fastest github run getting into 22nd aside
(git)smaug:/mnt/datasets/datalad/ci/logs/2023/02[master]git
$> ls -l 22/pr/7271/2340b4c/ 21/pr/7271/2340b4c/
21/pr/7271/2340b4c/:
total 0
drwxr-sr-x 1 datalad datalad 280 Feb 22 03:28 appveyor-9134-failed/
drwxr-sr-x 1 datalad datalad 120 Feb 22 03:28 appveyor-9134-success/
drwxr-sr-x 1 datalad datalad  24 Feb 22 03:20 github-Add\ changelog.d\ snippet-565-incomplete/
drwxr-sr-x 1 datalad datalad  86 Feb 22 03:20 github-Benchmarks-6132-success/
drwxr-sr-x 1 datalad datalad  56 Feb 22 03:20 github-CrippledFS-3876-success/
drwxr-sr-x 1 datalad datalad  62 Feb 22 03:20 github-Docs-6191-success/
drwxr-sr-x 1 datalad datalad 648 Feb 22 03:20 github-Extensions-6140-failed/
drwxr-sr-x 1 datalad datalad  56 Feb 22 03:20 github-Linters-3027-success/
drwxr-sr-x 1 datalad datalad  56 Feb 22 03:20 github-Shellcheck\ on\ scripts-4379-success/
drwxr-sr-x 1 datalad datalad  56 Feb 22 03:20 github-Test\ for\ semver\ label-3182-success/
drwxr-sr-x 1 datalad datalad  56 Feb 22 03:20 github-Test\ old\ nose\ code-795-success/
drwxr-sr-x 1 datalad datalad 148 Feb 22 03:20 github-Test\ on\ macOS-4368-failed/
drwxr-sr-x 1 datalad datalad  68 Feb 22 03:20 github-Type-check-821-success/
drwxr-sr-x 1 datalad datalad  20 Feb 22 03:28 travis-15237-errored/
drwxr-sr-x 1 datalad datalad  70 Feb 22 03:28 travis-15237-failed/
drwxr-sr-x 1 datalad datalad  12 Feb 22 03:28 travis-15237-success/

22/pr/7271/2340b4c/:
total 0
drwxr-sr-x 1 datalad datalad 40 Feb 23 03:20 github-Auto-release\ on\ PR\ merge-325-incomplete/

what is most upsetting is that we have only few of non-interesting logs for the other one:

$> ls 21/pr/7271/a264136/
github-Add\ changelog.d\ snippet-564-success/  github-Test\ for\ semver\ label-3181-success/

AFAIK we do not have logs for those tinuous runs anywhere so can't tell why that happened (may be the idea of #154 would still have value). So I thought that may be there is a way to have a command to (re)fetch logs for some specific PR/commit? @jwodder -- would that be possible?

@jwodder
Copy link
Member

jwodder commented Feb 27, 2023

@yarikoptic

  • For GitHub, there's no direct way to get the workflow runs for a PR itself; instead, you have to go through the commits in the PR and fetch the associated runs for those.
  • Travis and Appveyor do not appear to have a way to request the run(s) for a given PR or commit in the first place.

@yarikoptic
Copy link
Member Author

rright -- commit is associated with a PR. So in principle I could request
"give me logs for commit X and place to folder Y", i.e. smth like tinuous fetch-logs-for-commit a264136 21/pr/7271/a264136/ for my problem above?

@jwodder
Copy link
Member

jwodder commented Mar 2, 2023

@yarikoptic Why would/should the output path be given on the command line? Wouldn't it make more sense for it to be determined according to the config file as though it were being fetched as part of a normal tinuous run?

@yarikoptic
Copy link
Member Author

the same commit , oddly enough, could be present in multiple PRs. But ok -- could be without path specified.

@yarikoptic
Copy link
Member Author

I keep running into use cases where I am thinking about having such a feature.

@jwodder
Copy link
Member

jwodder commented May 11, 2023

@yarikoptic I've figured out how to get workflow runs for a given commit via the GitHub REST API, but Pygithub doesn't currently support this. I may have to completely replace our use of Pygithub with a custom client in the style of #164.

yarikoptic added a commit that referenced this issue May 16, 2023
Add `fetch-commit` command
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

Successfully merging a pull request may close this issue.

2 participants