8000 chore: add maxDuration for `/query/<id>` by duyet · Pull Request #490 · duyet/clickhouse-monitoring · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: add maxDuration for /query/<id> #490

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

Merged
merged 1 commit into from
Apr 5, 2025
Merged

chore: add maxDuration for /query/<id> #490

merged 1 commit into from
Apr 5, 2025

Conversation

duyet
Copy link
Owner
@duyet duyet commented Apr 5, 2025

Summary by Sourcery

Modify page revalidation and add maximum duration for query page rendering

Chores:

  • Increase page revalidation time from 5 minutes to 1 hour
  • Set a maximum duration of 30 seconds for the query page rendering

Signed-off-by: duyet <5009534+duyet@users.noreply.github.com>
Copy link
vercel bot commented Apr 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clickhouse-monitoring ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 5, 2025 8:07am

Copy link
Contributor
sourcery-ai bot commented Apr 5, 2025

Reviewer's Guide by Sourcery

This pull request adds maxDuration and increases the revalidate time for the /query/<id> page. maxDuration is set to 30 seconds, and revalidate is set to 3600 seconds (1 hour).

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Added maxDuration to the /query/<id> page.
  • Set maxDuration to 30 seconds.
app/[host]/query/[query_id]/page.tsx
Increased the revalidate time for the /query/<id> page.
  • Set revalidate to 3600 seconds (1 hour).
app/[host]/query/[query_id]/page.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 5, 2025
@duyet duyet temporarily deployed to github-pages April 5, 2025 08:05 — with GitHub Actions Inactive
@duyet duyet requested a review from Copilot April 5, 2025 08:05
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

app/[host]/query/[query_id]/page.tsx:12

  • [nitpick] Consider renaming 'maxDuration' to a more descriptive name such as 'queryMaxRenderDuration' to clearly indicate its purpose.
export const maxDuration = 30

Copy link
Contributor
@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @duyet - I've reviewed your changes - here's some feedback:

Overall Comments:

  • It's unusual to set both revalidate and maxDuration; consider if you need both.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Review instructions: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov-commenter
Copy link
codecov-commenter commented Apr 5, 2025

Bundle Report

Changes will increase total bundle size by 24 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
clickhouse-monitoring-bundle-server-cjs 2.58MB 24 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: clickhouse-monitoring-bundle-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
../app/[host]/query/[query_id]/page.js 24 bytes 29.2kB 0.08%
view changes for bundle: clickhouse-monitoring-bundle-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
server/middleware-*.js -740 bytes 170 bytes -81.32%
server/middleware-*.js 740 bytes 910 bytes 435.29% ⚠️
static/eTodt3l6JZYeRJIzpqLS1/_buildManifest.js (New) 810 bytes 810 bytes 100.0% 🚀
static/eTodt3l6JZYeRJIzpqLS1/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/BkZK0xAgTact60muvrgYn/_buildManifest.js (Deleted) -810 bytes 0 bytes -100.0% 🗑️
static/BkZK0xAgTact60muvrgYn/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

@dosubot dosubot bot added the enhancement New feature or request label Apr 5, 2025
@codecov-commenter
Copy link
codecov-commenter commented Apr 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.82%. Comparing base (6cc3c88) to head (3bfad99).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #490   +/-   ##
=======================================
  Coverage   76.82%   76.82%           
=======================================
  Files           5        5           
  Lines         164      164           
  Branches       60       60           
=======================================
  Hits          126      126           
+ Misses         38       35    -3     
- Partials        0        3    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@duyet
Copy link
Owner Author
duyet commented Apr 5, 2025

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

https://vercel.com/docs/functions/configuring-functions/duration#maximum-duration-for-different-runtimes

@duyet duyet merged commit c34e51a into main Apr 5, 2025
40 checks passed
@duyet duyet deleted the duyet-patch-1 branch April 5, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0