-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Bug: Not all repos with topics are targetted by the workflow | [Tracking] Sync Tooling - push - ErikSchierboom - f28daf625fa326fafdcf261db7699377c8d1ed37 #225
Comments
To others: Sascha manually triggered exercism/nim-test-runner#138 |
That's really strange. Perhaps fetching the full repo object and comparing them between the listed and unlisted repos could show some differences that explain this? This might be an issue with the GH search itself, too. (Sorry for the less than helpful comments, can't look into it properly atm due to PC issues) |
Maybe the problem is that when the tool does this it's paginated and only looks at the first page? |
That was my initial thought too, but the call to Sending the same query via curl shows that we should not be hitting the rate limits either:
|
Could you retry and see if the |
The below command outputs 109 repo names, and includes I think I was seeing fewer at one point. But it might have been an intermittent rate-limiting or pagination thing. And Did you change something? $ gh search repos --owner=exercism --topic=exercism-tooling --limit 200 | cut -f1 | sort
exercism/abap-test-runner
exercism/bash-analyzer
exercism/bash-test-runner
exercism/cfml-test-runner
exercism/clojure-analyzer
exercism/clojure-representer
exercism/clojurescript-test-runner
exercism/clojure-test-runner
exercism/coffeescript-test-runner
exercism/common-lisp-analyzer
exercism/common-lisp-representer
exercism/common-lisp-test-runner
exercism/cpp-test-runner
exercism/c-representer
exercism/crystal-test-runner
exercism/csharp-analyzer
exercism/csharp-representer
exercism/csharp-test-runner
exercism/c-test-runner
exercism/dart-test-runner
exercism/delphi-test-runner
exercism/DEPRECATED.rikki-ruby-analyzer
exercism/d-test-runner
exercism/elixir-analyzer
exercism/elixir-representer
exercism/elixir-test-runner
exercism/elm-analyzer
exercism/elm-representer
exercism/elm-test-runner
exercism/emacs-lisp-test-runner
exercism/erlang-analyzer
exercism/erlang-representer
exercism/erlang-test-runner
exercism/fortran-test-runner
exercism/fsharp-analyzer
exercism/fsharp-representer
exercism/fsharp-test-runner
exercism/generic-analyzer
exercism/generic-representer
exercism/generic-test-runner
exercism/go-analyzer
exercism/go-representer
exercism/go-test-runner
exercism/groovy-test-runner
exercism/haskell-test-runner
exercism/haxe-analyzer
exercism/haxe-representer
exercism/haxe-test-runner
exercism/j-analyzer
exercism/java-analyzer
exercism/java-representer
exercism/javascript-analyzer
exercism/javascript-representer
exercism/javascript-test-runner
exercism/java-test-runner
exercism/j-representer
exercism/j-test-runner
exercism/julia-analyzer
exercism/julia-representer
exercism/julia-test-runner
exercism/kotlin-analyzer
exercism/kotlin-test-runner
exercism/lfe-test-runner
exercism/lua-test-runner
exercism/mips-test-runner
exercism/nim-representer
exercism/nim-test-runner
exercism/objective-c-test-runner
exercism/ocaml-test-runner
exercism/perl5-analyzer
exercism/perl5-test-runner
exercism/pharo-smalltalk-test-runner
exercism/php-test-runner
exercism/plsql-test-runner
exercism/prolog-test-runner
exercism/purescript-test-runner
exercism/python-analyzer
exercism/python-representer
exercism/python-test-runner
exercism/racket-test-runner
exercism/raku-test-runner
exercism/reasonml-test-runner
exercism/red-analyzer
exercism/red-representer
exercism/red-test-runner
exercism/r-test-runner
exercism/ruby-analyzer
exercism/ruby-representer
exercism/ruby-test-runner
exercism/rust-analyzer
exercism/rust-representer
exercism/rust-test-runner
exercism/scala-analyzer
exercism/scala-test-runner
exercism/scheme-test-runner
exercism/sml-test-runner
exercism/stub-analyzer
exercism/swift-test-runner
exercism/tcl-test-runner
exercism/typescript-analyzer
exercism/typescript-representer
exercism/typescript-test-runner
exercism/vbnet-test-runner
exercism/vimscript-test-runner
exercism/wasm-test-runner
exercism/wren-representer
exercism/wren-test-runner
exercism/x86-64-assembly-test-runner
exercism/zig-test-runner |
I removed leading white space from the |
@ee7 could you submit a PR that adds your whitespace checks to GitHub please? :D |
I see. By the way, is it intended that https://github.com/exercism/delphi-test-runner is private? As far as I can see, it's the only private exercism repo: $ gh repo list exercism --visibility private
Showing 1 of 1 repositories in @exercism that match your search
exercism/delphi-test-runner private Oct 5, 2021 (It's probably also better to use |
Yes. It contains delphi's source code, which is proprietory (delphi is our only non open-source language AFAICT) |
Ah.
@SaschaMann You jest, but I've actually been considering a repo that runs periodic checks on Exercism repo metadata. Then we can get notifications for things like:
I suppose it could even be a periodic workflow in |
(cc @kytrinyx to this too) |
If you're gonna implement that, please add "repo is empty" as that has caused us issues a few times already :) |
You'd like a failing check when any Exercism repo has The 5 repos with the lowest disk usage currently: gh repo list exercism \
--limit 500 --no-archived --visibility public --json diskUsage,isEmpty,name \
| jq 'sort_by(.diskUsage) | .[0:5]' [
{
"diskUsage": 6,
"isEmpty": false,
"name": "babel-preset-javascript"
},
{
"diskUsage": 11,
"isEmpty": false,
"name": "guys-slack-bot"
},
{
"diskUsage": 12,
"isEmpty": false,
"name": "open-source-stats"
},
{
"diskUsage": 12,
"isEmpty": false,
"name": "backlog"
},
{
"diskUsage": 13,
"isEmpty": false,
"name": "wip"
}
] (https://github.com/exercism/babel-preset-javascript is quite small:
#110? Can we filter out empty repos before we fork? |
Yes but I'd argue that the org-wide-files should be synced to those repos as well and that a repo should generally not be empty, even if it only has a dummy commit. It seems like an easier fix to not have empty repos than to add logic to this and the webhooks to handle those situations. |
Agreed. At the least, a repo should have a README.md file |
Do we have any open issues remaining regarding not all repos being targeted? |
I'm more persuaded by the counter-argument: it seems easier to be robust to the existence of an empty repo, rather than being blocked by one and needing manual intervention (so I could also claim that an empty repo does not do anything yet, and so does not urgently need to be targeted by the next We could have a periodic job that runs e.g. daily, and does things like producing an error if there is an empty repo. But that doesn't help if an empty repo is created shortly before an But I probably don't have the full picture, and I'm not the one who has to deal with it. Do whatever's easiest, of course. |
I think only this issue. I believe It's strange that It does have the topic: gh repo view exercism/nim-test-runner --json repositoryTopics {
"repositoryTopics": [
{
"name": "exercism-tooling"
},
{
"name": "exercism-test-runner"
}
]
} In case it's a weird rate-limiting problem, maybe we could try using And/or switch to Getting all the Exercism-owned, public, non-archived, repos with the gh repo list exercism \
--visibility public \
--no-archived \
--limit 500 \
--topic exercism-tooling \
--json name \
--jq 'sort_by(.name)' \
| jq '.[:3]' (The final pipe to [
{
"name": "abap-test-runner"
},
{
"name": "bash-analyzer"
},
{
"name": "bash-test-runner"
}
] I think this avoids the search API, because if I write |
I think it already does that: https://github.com/actions/github-script#actionsgithub-script
|
I don't have a particular preference for github-script vs gh for this particular use case. Though I'm not sure if this would be as readable in Bash. These lines would need to be rewritten: org-wide-files/.github/workflows/sync-rest.yml Lines 78 to 97 in cd20548
Not relying on the search API seems like a good idea for resilience. |
But then what does it use? The graphql API? Something special? |
I didn't look up what the gh command does but there's an endpoint that returns all repositories in an organisation. You could then filter these based on topics afterwards. |
I think that is what they do: https://github.com/cli/cli/blob/00e97121ec8cf4de86bdda704fb711302a8dfc96/pkg/cmd/repo/list/http.go#L80 |
I think the source of truth is https://github.com/cli/cli/blob/00e97121ec8c/pkg/cmd/repo/list/http.go#L32, but I don't understand exactly what I'm seeing. It looks like both (Edit: Erik beat me by 7 seconds). |
If the graphql search API is used, I'd assume that also has rate limits, so are we gaining anything by not using github script? |
Aha, I've worked it out. If I write gh repo list exercism --no-archived --topic exercism-tooling --limit 1234 Then the output does start with
But the warning does not appear if I add some gh repo list exercism --no-archived --topic exercism-tooling --limit 1234 --json name I think they could still print that warning on stderr (which is where it appears when |
I don't know. But the GraphQL API and the REST API do have different limits: https://docs.github.com/en/graphql/overview/resource-limitations#rate-limit Maybe let's do nothing for now, and keep an eye on the number of repos targeted by an |
Workflow run: https://github.com/exercism/org-wide-files/actions/runs/2306860844
The text was updated successfully, but these errors were encountered: