actions / stale

Marks issues and pull requests that have not had recent interaction
MIT License
1.34k stars 353 forks source link

Actions fails if rate Limit is not enabled #1156

Open ggabijaa opened 4 months ago

ggabijaa commented 4 months ago

Description: When running action on schedule errors due to rateLimit. The actions is marked as successful but logs were showing errors:

image

Is this expected behavior? Should action error out when rateLimit, not enabled?

Action version: V9

Platform: Rocky Linux

Runner type: Self-hosted

Workfkow config:

name: Mark Stale Pull Requests

on:
  schedule:
    - cron: '0 1 * * *'

permissions:
  issues: write
  pull-requests: write

jobs:
  stale:
    runs-on: [self-hosted, rocky]
    steps:
      - uses: actions/stale@v9
        with:
          days-before-stale: 3
          stale-pr-label: 'stale'
          labels-to-remove-when-unstale: 'stale'
          days-before-close: -1
HarithaVattikuti commented 4 months ago

Hello @ggabijaa Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.

martin-majlis-s1 commented 1 month ago

When I check the documentation - https://docs.github.com/en/enterprise-server@3.13/admin/configuring-settings/configuring-user-applications-for-your-enterprise/configuring-rate-limits#about-rate-limits-for-github-actions - I can see, that it says:

By default, the rate limit for GitHub Actions is disabled. Because GitHub Enterprise Server can handle temporary spikes in usage without performance degradation, this rate limit is intended to protect against sustained high load. We recommend leaving the rate limit disabled unless you are experiencing performance problems. In some cases, GitHub Support may recommend that you enable a rate limit for GitHub Actions.

Not having a rate limit is expected state and it should not be logged as an error - https://github.com/actions/stale/blob/main/src/classes/issues-processor.ts#L648

What do you think?