Skip to content

Commit

Permalink
Remove RSS throttling limits
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Kisler <[email protected]>
  • Loading branch information
kislerdm committed Nov 28, 2023
1 parent a02827b commit 8f99b83
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/bump-versions-test-rss-throttling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Bump Providers Test

on:
workflow_dispatch:
push:

jobs:
bump-versions:
runs-on: ubuntu-latest

permissions:
# these permissions are required for RSS feed
# even if the runner writes nothing to the repo
contents: write
actions: write
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: './src/go.mod'

- name: Run version bump script
working-directory: ./src
run: go run ./cmd/bump-versions
5 changes: 4 additions & 1 deletion src/cmd/bump-versions/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ func main() {
logger.Error("Failed to list providers", slog.Any("err", err))
os.Exit(1)
}
err = providers.Parallel(20, func(p provider.Provider) error {

// FIXME: test assumption that we won't hit the throttling limit of the RSS feed
concurrencyProviders := len(providers)
err = providers.Parallel(concurrencyProviders, func(p provider.Provider) error {
return p.UpdateMetadataFile()
})
if err != nil {
Expand Down
5 changes: 3 additions & 2 deletions src/internal/github/rss.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ func (c Client) extractTag(item *gofeed.Item) *string {
}

func (c Client) getReleaseRSSFeed(releasesRSSURL string) (*gofeed.Feed, error) {
done := c.rssThrottle()
defer done()
// TODO: uncomment if we end up being kickoff by github
// done := c.rssThrottle()
// defer done()

resp, err := c.httpClient.Get(releasesRSSURL)
if err != nil {
Expand Down

0 comments on commit 8f99b83

Please sign in to comment.