Skip to content

fix: bump next-runtime to 5.15.9#1477

Merged
pieh merged 3 commits intomainfrom
pieh-patch-6-1
Mar 10, 2026
Merged

fix: bump next-runtime to 5.15.9#1477
pieh merged 3 commits intomainfrom
pieh-patch-6-1

Conversation

@pieh
Copy link
Contributor

@pieh pieh commented Mar 10, 2026

Thanks for contributing the Netlify plugins directory!

Are you adding a plugin or updating one?

  • Adding a plugin
  • Updating a plugin

Have you completed the following?

Test plan
Please add a link to a successful public deploy log using the stated version of the plugin. Include any other context reviewers might need for testing.

@pieh pieh requested a review from a team as a code owner March 10, 2026 07:36
@netlify
Copy link

netlify bot commented Mar 10, 2026

Deploy Preview for netlify-plugins ready!

Name Link
🔨 Latest commit 0dfd1a8
🔍 Latest deploy log https://app.netlify.com/projects/netlify-plugins/deploys/69afd68c60c8610008663376
😎 Deploy Preview https://deploy-preview-1477--netlify-plugins.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

Warning

Rate limit exceeded

@pieh has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 21 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5749f8ee-3a54-43d8-b0a0-f8a9ae657ab7

📥 Commits

Reviewing files that changed from the base of the PR and between efa26de and 0dfd1a8.

📒 Files selected for processing (2)
  • .github/workflows/test.yml
  • test/main.js
📝 Walkthrough

Walkthrough

Bumps Next.js plugin version pins in site/plugins.json from 5.15.8 to 5.15.9 (two occurrences). Adds retry helpers to test/main.js: sleep, BACKOFF_BASE, ONE_SECOND_IN_MS, and fetchWithRetry(url, options) that retries on 429 using Retry-After or exponential backoff; replaces direct HTTP calls with fetchWithRetry. test/main.js also imports node:process to access environment variables. Adds GITHUB_TOKEN to the Tests step environment in .github/workflows/test.yml. No public API or exported signatures changed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: bump next-runtime to 5.15.9' accurately describes the main change: updating the Next.js plugin version from 5.15.8 to 5.15.9 in site/plugins.json.
Description check ✅ Passed The description explains the PR is updating an existing Netlify plugin and mentions completing plugin guidelines, required fields, and testing; it relates to the version bump update.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pieh-patch-6-1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
test/main.js (1)

20-34: Good retry implementation with one minor defensive improvement.

The retry logic correctly handles 429 responses and the Retry-After header parsing gracefully falls back to backoff for edge cases (missing header, HTTP-date format, or zero value).

Consider adding optional chaining on headers access for defensive coding, though in practice got v11 always provides headers when a response exists:

🛡️ Optional: add defensive optional chaining
       if (error.response?.statusCode === 429 && attempt < retries) {
-        const retryAfter = Number(error.response.headers['retry-after']) * ONE_SECOND_IN_MS || backoff * (attempt + 1)
+        const retryAfter = Number(error.response.headers?.['retry-after']) * ONE_SECOND_IN_MS || backoff * (attempt + 1)
         await sleep(retryAfter)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/main.js` around lines 20 - 34, The retry logic in fetchWithRetry should
defensively guard header access: when reading the Retry-After value use optional
chaining on response headers (e.g., error.response?.headers?.['retry-after'])
and keep the existing fallback to backoff so missing headers or unexpected
shapes don't throw; update the expression that computes retryAfter to reference
error.response?.headers?.['retry-after'] and preserve the Number(...) || backoff
* (attempt + 1) fallback behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@test/main.js`:
- Around line 20-34: The retry logic in fetchWithRetry should defensively guard
header access: when reading the Retry-After value use optional chaining on
response headers (e.g., error.response?.headers?.['retry-after']) and keep the
existing fallback to backoff so missing headers or unexpected shapes don't
throw; update the expression that computes retryAfter to reference
error.response?.headers?.['retry-after'] and preserve the Number(...) || backoff
* (attempt + 1) fallback behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4e9f365b-964f-45db-bdfd-05abf25fa6ee

📥 Commits

Reviewing files that changed from the base of the PR and between 14d80f6 and 9471130.

📒 Files selected for processing (1)
  • test/main.js

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/test.yml:
- Around line 28-29: The workflow currently exposes GITHUB_TOKEN via the env
block without explicit job-level permissions; add a job-level permissions
mapping immediately above the env section that grants only the minimal scopes
your tests require (e.g., contents: read or other specific permissions) instead
of broad defaults, so the GITHUB_TOKEN is scoped and not left to repo/org
defaults; update the job containing env: GITHUB_TOKEN to include the new
permissions block and adjust scopes to the least privilege needed for the test
job.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a5304f9b-2bd5-4581-b87f-d3d19341b883

📥 Commits

Reviewing files that changed from the base of the PR and between 9471130 and efa26de.

📒 Files selected for processing (2)
  • .github/workflows/test.yml
  • test/main.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/main.js

@pieh
Copy link
Contributor Author

pieh commented Mar 10, 2026

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

const BACKOFF_BASE = 5000
const ONE_SECOND_IN_MS = 1000

const fetchWithRetry = async (url, { retries = 3, backoff = BACKOFF_BASE } = {}) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests started to hit github's 429 errors randomly, so added some retry and using github action's token to make authenticated requests to raise the quota

@pieh pieh merged commit 3901a3c into main Mar 10, 2026
7 checks passed
@pieh pieh deleted the pieh-patch-6-1 branch March 10, 2026 08:44
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 this pull request may close these issues.

2 participants