Skip to content

Add nil-input regression coverage for filterIndexes - #7317

Open
wangyusheng1985 wants to merge 3 commits into
pipe-cd:masterfrom
wangyusheng1985:repo-agent/b2b777e3-auto
Open

Add nil-input regression coverage for filterIndexes#7317
wangyusheng1985 wants to merge 3 commits into
pipe-cd:masterfrom
wangyusheng1985:repo-agent/b2b777e3-auto

Conversation

@wangyusheng1985

Copy link
Copy Markdown

Summary

  • Add regression coverage for filterIndexes with nil input.
  • Keep production behavior unchanged.

Validation

  • gofmt -w pkg/app/ops/firestoreindexensurer/indexes_test.go
  • go test ./pkg/app/ops/firestoreindexensurer -run '^TestFilterIndexes$' -count=1
  • git diff --check

Does this PR introduce a user-facing change?:

  • How are users affected by this change: No user-facing change; this only adds unit-test coverage.
  • Is this breaking change: No.
  • How to migrate (if breaking change): Not applicable.

Copilot AI lite review requested due to automatic review settings September 2, 2026 10:12
@netlify

netlify Bot commented Sep 2, 2026

Copy link
Copy Markdown

Deploy Preview for pipecd-site canceled.

Name Link
🔨 Latest commit ef2d8bd
🔍 Latest deploy log https://app.netlify.com/projects/pipecd-site/deploys/6a9bd4ec47e01a0008857281

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

👋 Hi @wangyusheng1985, welcome to PipeCD and thanks for opening your first pull request!

We’re really happy to have you here

Before your PR gets merged, please check a few important things below.


Helpful resources


DCO Sign-off

All commits must include a Signed-off-by line to comply with the Developer Certificate of Origin (DCO).

In case you forget to sign-off your commit(s), follow these steps:

For the last commit:

git commit --amend --signoff
git push --force-with-lease

For multiple commits:

git rebase --signoff origin/master
git push --force-with-lease

Run checks locally

Before pushing updates, please run:

make check

This runs the same checks as CI and helps catch issues early.


💬 Need help?

If anything is unclear, feel free to ask in this PR or join us on the CNCF Slack in the #pipecd channel.
You can get your Slack invite from: https://communityinviter.com/apps/cloud-native/cncf

Thanks for contributing to PipeCD! ❤️

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is limited to a small, clear unit-test addition that matches the current filterIndexes behavior and does not affect production code.

Pull request overview

Adds a focused regression test to ensure filterIndexes correctly handles a nil indexes input without panicking and preserves the current behavior (returning nil when given nil).

Changes:

  • Add a new TestFilterIndexes table-driven case covering indexes == nil with non-empty excludes.
File summaries
File Description
pkg/app/ops/firestoreindexensurer/indexes_test.go Adds regression test coverage for filterIndexes when indexes is nil.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@wangyusheng1985
wangyusheng1985 marked this pull request as ready for review September 3, 2026 11:56
@wangyusheng1985
wangyusheng1985 requested a review from a team as a code owner September 3, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants