Skip to content

fix: optimize workflow tests#3743

Merged
chronark merged 1 commit intomainfrom
push-klozrxzxukkw
Aug 6, 2025
Merged

fix: optimize workflow tests#3743
chronark merged 1 commit intomainfrom
push-klozrxzxukkw

Conversation

@imeyer
Copy link
Contributor

@imeyer imeyer commented Aug 6, 2025

What does this PR do?

Fixes # (issue)

If there is not an issue for this, please create one first. This is used to tracking purposes and also helps use understand why this PR exists

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

  • Test A
  • Test B

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Contributing Guide
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand areas
  • Ran pnpm build
  • Ran pnpm fmt
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Unkey Docs if changes were necessary

Summary by CodeRabbit

  • Chores
    • Updated test workflows to use self-hosted runners and adjusted test command flags.
    • Removed the container startup step from the Go API test workflow for improved efficiency.

@changeset-bot
Copy link

changeset-bot bot commented Aug 6, 2025

⚠️ No Changeset found

Latest commit: 39a7d97

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Aug 6, 2025

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

Name Status Preview Comments Updated (UTC)
dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 6, 2025 8:43pm
engineering ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 6, 2025 8:43pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 6, 2025

📝 Walkthrough

Walkthrough

Two GitHub Actions workflow files were updated. The "Test Agent Local" workflow now uses a self-hosted runner and modifies its test command flags. The "Test Go API Local" workflow removes a container startup step and proceeds directly to testing after installation, with no changes to exported entities.

Changes

Cohort / File(s) Change Summary
Test Agent Local Workflow
.github/workflows/job_test_agent_local.yaml
Switched runner from ubuntu-latest to self-hosted; removed -cover from go test; added -smallscreen to tparse.
Test Go API Local Workflow
.github/workflows/job_test_go_api_local.yaml
Removed "Run containers" (make up) step; workflow now installs and tests directly in the go directory.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Possibly related PRs

  • ci: disable go test #2865: Both PRs modify GitHub Actions workflows for Go tests, focusing on altering CI job execution, though they target different aspects and files.

Suggested reviewers

  • mcstepp
  • ogzhanolguncu

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch push-klozrxzxukkw

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2025

Thank you for following the naming conventions for pull request titles! 🙏

@vercel vercel bot temporarily deployed to Preview – engineering August 6, 2025 20:43 Inactive
@vercel vercel bot temporarily deployed to Preview – dashboard August 6, 2025 20:43 Inactive
@imeyer imeyer enabled auto-merge August 6, 2025 20:52
@graphite-app
Copy link

graphite-app bot commented Aug 6, 2025

Movie gif. Actor Chow Yun-fat leans out of a doorway casually chewing while giving a cool, confident thumbs-up of approval. (Added via Giphy)

@graphite-app
Copy link

graphite-app bot commented Aug 6, 2025

Graphite Automations

"Post a GIF when PR approved" took an action on this PR • (08/06/25)

1 gif was posted to this PR based on Andreas Thomas's automation.

@chronark chronark disabled auto-merge August 6, 2025 20:58
@chronark chronark merged commit 03b0f18 into main Aug 6, 2025
19 of 20 checks passed
@chronark chronark deleted the push-klozrxzxukkw branch August 6, 2025 20:58
Copy link
Contributor

@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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b629713 and 39a7d97.

📒 Files selected for processing (2)
  • .github/workflows/job_test_agent_local.yaml (2 hunks)
  • .github/workflows/job_test_go_api_local.yaml (0 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/job_test_go_api_local.yaml
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: applies to **/*_test.go : organize go integration tests with real dependencies...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*_test.go : Organize Go integration tests with real dependencies

Applied to files:

  • .github/workflows/job_test_agent_local.yaml
📚 Learning: applies to **/*_test.go : use table-driven tests in go...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*_test.go : Use table-driven tests in Go

Applied to files:

  • .github/workflows/job_test_agent_local.yaml
📚 Learning: applies to **/*_test.go : organize go tests by http status codes...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*_test.go : Organize Go tests by HTTP status codes

Applied to files:

  • .github/workflows/job_test_agent_local.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Test Packages / Test
  • GitHub Check: autofix
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
.github/workflows/job_test_agent_local.yaml (1)

23-23: No coverage integration – safe to drop -cover

A repository‐wide scan shows no Codecov config or coverage‐upload steps in any workflow. The job_test_agent_local.yaml job wasn’t feeding coverage data into PR gates or badge reporting, so removing the -cover flag has no downstream impact.

Likely an incorrect or invalid review comment.

jobs:
test_agent_local:
runs-on: ubuntu-latest
runs-on: self-hosted
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

❓ Verification inconclusive

Specify additional labels for the self-hosted runner

Using only self-hosted leaves GitHub free to pick any self-hosted runner in the org (Linux, macOS, Windows, ARM, etc.). Unless every runner image is maintained with the required Go tool-chain and dependencies, this can make the job flaky or hang indefinitely waiting for a compatible runner.

Add OS/arch labels (e.g. self-hosted, linux, x64) or your specific runner-group label to guarantee a predictable environment:

-    runs-on: self-hosted
+    runs-on: [self-hosted, linux, x64]   # or your <group>-runner label

Specify OS and architecture labels for the self-hosted runner

Using only self-hosted allows GitHub to pick any self-hosted runner (Linux, macOS, Windows, ARM, etc.), which may lead to hangs or missing toolchains. Pin your job to a known environment by adding OS/arch labels or your own runner-group label:

• File: .github/workflows/job_test_agent_local.yaml
• Line: 8

-    runs-on: self-hosted
+    runs-on: [self-hosted, linux, x64]   # or your <group>-runner label
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
runs-on: self-hosted
runs-on: [self-hosted, linux, x64] # or your <group>-runner label
🤖 Prompt for AI Agents
In .github/workflows/job_test_agent_local.yaml at line 8, the runner is
specified only as "self-hosted," which can cause the job to run on any available
self-hosted runner regardless of OS or architecture. To fix this, add specific
OS and architecture labels (e.g., "self-hosted", "linux", "x64") or a custom
runner-group label to the "runs-on" field to ensure the job runs on a known,
compatible environment.

@coderabbitai coderabbitai bot mentioned this pull request Aug 7, 2025
18 tasks
@coderabbitai coderabbitai bot mentioned this pull request Sep 24, 2025
18 tasks
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.

3 participants