Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/clp-rust-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@ name: "clp-rust-checks"

on:
pull_request:
paths: &monitored_paths
- ".cargo/**"
- "Cargo.lock"
- "Cargo.toml"
- ".github/workflows/clp-rust-checks.yaml"
- "components/clp-rust-utils/**"
- "components/log-ingestor/**"
- "taskfile.yaml"
- "taskfiles/**"
push:
paths: *monitored_paths
Comment on lines 14 to +15
Copy link
Contributor

@coderabbitai coderabbitai bot Oct 22, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix actionlint failure on the push trigger.
Actionlint 1.7.8 rejects paths: *monitored_paths because it resolves to an alias node instead of a sequence, so the workflow currently fails validation. Please expand the list inline (or otherwise restructure without aliases) for the push trigger so that paths is a literal sequence.

🧰 Tools
🪛 actionlint (1.7.8)

15-15: "paths" section must be sequence node but got alias node with "" tag

(syntax-check)

🤖 Prompt for AI Agents
In .github/workflows/clp-rust-checks.yaml around lines 14 to 15, the push
trigger currently uses an alias reference "paths: *monitored_paths" which
actionlint rejects because it expects a literal sequence; replace the alias with
an inline literal sequence of the monitored paths (i.e., copy the actual list
items from the monitored_paths anchor into the push.paths section) or otherwise
restructure so push.paths is a plain YAML sequence node rather than an alias.

Copy link
Member

Choose a reason for hiding this comment

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

it's a bug (outdated type annotation) in actionlint then, since GH has added YAML anchor support. see rhysd/actionlint#133 which tracks the bug

Copy link
Contributor

Choose a reason for hiding this comment

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

@junhaoliao Thanks, and agreed with @junhaoliao. GitHub Actions now supports YAML anchors and aliases in workflows, so the alias used for push.paths is valid; this is a limitation in actionlint rather than a workflow issue. (docs.github.com)

I’ll treat the previous actionlint note as a tooling false positive and not request changes. If you’d still like to quiet the noise until actionlint catches up, here’s a safe, temporary inline alternative for push only (functionally identical):

on:
  pull_request:
    paths: &monitored_paths
      - ".cargo/**"
      - "Cargo.lock"
      - "Cargo.toml"
      - ".github/workflows/clp-rust-checks.yaml"
      - "components/clp-rust-utils/**"
      - "components/log-ingestor/**"
      - "taskfile.yaml"
      - "taskfiles/**"
  push:
    paths:
      - ".cargo/**"
      - "Cargo.lock"
      - "Cargo.toml"
      - ".github/workflows/clp-rust-checks.yaml"
      - "components/clp-rust-utils/**"
      - "components/log-ingestor/**"
      - "taskfile.yaml"
      - "taskfiles/**"

Otherwise, I’m good to keep the anchor as-is and ignore the linter’s complaint for this case. Also noting that actionlint 1.7.8 is the latest as of October 11, 2025 and doesn’t mention explicit anchor handling in its release notes, which likely explains the current behavior. (github.com)


✏️ Learnings added
Learnt from: junhaoliao
PR: y-scope/clp#1466
File: .github/workflows/clp-rust-checks.yaml:14-15
Timestamp: 2025-10-22T21:14:12.178Z
Learning: Repository y-scope/clp: In GitHub Actions workflows (e.g., .github/workflows/clp-rust-checks.yaml), YAML anchors/aliases are acceptable and preferred to avoid duplication; if actionlint flags an alias node (e.g., on push.paths) as an error, treat it as a tool limitation and do not require inlining unless the team asks to silence the warning.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: junhaoliao
PR: y-scope/clp#0
File: :0-0
Timestamp: 2025-10-22T21:02:31.068Z
Learning: Repository y-scope/clp: Maintain deterministic CI/builds for Rust; add a check to verify Cargo.lock is in sync with Cargo.toml without updating dependencies (non-mutating verification in clp-rust-checks workflow).

schedule:
# Run daily at 00:15 UTC (the 15 is to avoid periods of high load)
- cron: "15 0 * * *"
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading