Skip to content

fix: cancel event workflow#2284

Merged
asyncapi-bot merged 1 commit intoasyncapi:masterfrom
Shurtu-gal:fix/workflow
Feb 11, 2026
Merged

fix: cancel event workflow#2284
asyncapi-bot merged 1 commit intoasyncapi:masterfrom
Shurtu-gal:fix/workflow

Conversation

@Shurtu-gal
Copy link
Contributor

@Shurtu-gal Shurtu-gal commented Feb 11, 2026

Description

Related issue(s)

Summary by CodeRabbit

  • Chores
    • Enhanced GitHub Actions workflow dependency caching to improve build pipeline efficiency.

Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>
@sonarqubecloud
Copy link

@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

A GitHub Actions workflow file is updated to enable Node.js dependency caching by adding a cache-dependency-path parameter pointing to **/package-lock.json, allowing the workflow to cache dependencies across runs.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow Configuration
.github/workflows/cancel-event.yml
Added cache-dependency-path: '**/package-lock.json' to the Setup Node.js step to enable dependency caching based on package lock files.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A rabbit hops through workflows swift,
Adding caches—what a gift!
Lock files cached with careful grace,
Actions run at faster pace! 🏃‍♂️✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: cancel event workflow' directly relates to the changeset, which adds caching configuration to the GitHub Actions cancel-event workflow to fix the failing YAML validation issue.
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

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/cancel-event.yml:
- Around line 19-22: The actions/setup-node@v6 step currently sets
cache-dependency-path but omits the required cache parameter, so add cache:
'npm' to that same step to enable dependency caching (keep
cache-dependency-path: '**/package-lock.json' and the existing uses:
'actions/setup-node@v6' intact); this ensures setup-node actually uses the
package-lock.json path for caching.
🧹 Nitpick comments (1)
.github/workflows/cancel-event.yml (1)

17-18: Outdated action versions.

actions/checkout@v2 (Line 18) and actions/github-script@v4 (Line 27) are significantly outdated. Current versions are v4 and v7 respectively. Older versions may lack security patches and run on deprecated Node.js runtimes. Consider upgrading when convenient.

Comment on lines 19 to 22
- name: Setup Node.js
uses: actions/setup-node@v6
with:
cache-dependency-path: '**/package-lock.json'
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

actions/setup-node@v6 cache-dependency-path parameter documentation

💡 Result:

In actions/setup-node@v6, cache-dependency-path is an input used to tell the action which dependency/lockfile(s) to hash when generating the cache key (e.g., package-lock.json, yarn.lock, etc.). It only works when cache is set. It also supports wildcards or a list of file names (for multiple lockfiles, such as in monorepos). Default is empty (''). [1]

The official docs/examples show usage like:

  • Single lockfile in a subdirectory (monorepo example): cache-dependency-path: subdir/package-lock.json [1]
  • Background/announcement of the feature (monorepo/pnpm): “Use the optional cache-dependency-path field to specify the path to dependency file(s).” [2]

Sources: [1] [2]


Add the cache parameter to enable Node.js dependency caching.

The cache-dependency-path parameter in actions/setup-node only works when cache is explicitly set. Without it, the path specification has no effect. To enable caching, add:

Proposed fix
       - name: Setup Node.js
         uses: actions/setup-node@v6
         with:
+          cache: 'npm'
           cache-dependency-path: '**/package-lock.json'
🤖 Prompt for AI Agents
In @.github/workflows/cancel-event.yml around lines 19 - 22, The
actions/setup-node@v6 step currently sets cache-dependency-path but omits the
required cache parameter, so add cache: 'npm' to that same step to enable
dependency caching (keep cache-dependency-path: '**/package-lock.json' and the
existing uses: 'actions/setup-node@v6' intact); this ensures setup-node actually
uses the package-lock.json path for caching.

@derberg
Copy link
Member

derberg commented Feb 11, 2026

/rtm

@asyncapi-bot asyncapi-bot merged commit f90dbbe into asyncapi:master Feb 11, 2026
24 checks passed
@Shurtu-gal Shurtu-gal deleted the fix/workflow branch February 11, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants