Skip to content

chore(packages): drop duplicate test targets - #3352

Merged
myasnikovdaniil merged 2 commits into
mainfrom
fix/mariadb-makefile-duplicate-test
Jul 20, 2026
Merged

myasnikovdaniil merged 2 commits into
mainfrom
fix/mariadb-makefile-duplicate-test

Conversation

@lexfrei

@lexfrei Aleksei Sviridkin (lexfrei) commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

Three package Makefiles — apps/mariadb, apps/kafka and extra/monitoring — declared an identical test target twice, so every invocation printed:

Makefile:19: warning: overriding commands for target `test'
Makefile:7: warning: ignoring old commands for target `test'

Make names the lines in that warning itself: it was already running the second recipe and discarding the first, so the earlier declaration was dead in each case and removing it changes nothing but the noise. All six recipes were helm unittest ..

Which copy is dead is not the same across the three, so this is not a mechanical edit. In monitoring the .PHONY: test line sits above the dead recipe rather than the live one; since .PHONY applies to the target name wherever it is declared, the declaration stays and only the recipe beneath it goes.

Default goals are unaffected: hack/package.mk sets .DEFAULT_GOAL=help and is included ahead of any target in these files, so test was never selected by first-target-wins. Confirmed with make -p --dry-run before and after, and each package's tests still run — 11, 35 and 9 respectively, with no warnings left.

Release note

NONE

Summary by CodeRabbit

  • Chores
    • Streamlined build workflows for MariaDB, Kafka, and Monitoring applications.
    • Removed redundant test target definitions while preserving the existing Helm unit test capability.
    • Other generation, update, and image-building workflows remain unchanged.

The package Makefile declared an identical `test` target twice, so
every invocation printed "overriding commands for target 'test'" and
"ignoring old commands". Make already ran the second recipe and
discarded the first, so removing the first is behaviour-preserving.

Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
@github-actions github-actions Bot added area/database Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse) kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt labels Jul 19, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request cleans up the build configuration for the MariaDB package by removing a duplicate 'test' target definition. This change resolves warnings generated during the build process where the Makefile was overriding commands, ensuring a cleaner output without impacting the existing test functionality.

Highlights

  • Cleanup of duplicate target: Removed the redundant 'test' target declaration in the MariaDB Makefile to eliminate build-time warnings.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment Gemini (@gemini-code-assist) Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@github-actions github-actions Bot added the size/XS This PR changes 0-9 lines, ignoring generated files label Jul 19, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request removes the test target from the packages/apps/mariadb/Makefile, which previously executed helm unittest .. I have no feedback to provide on this change.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Early or duplicate helm unittest . targets are removed from the MariaDB, Kafka, and monitoring Makefiles. Remaining generation, update, image, CRD, values, and effective test targets are preserved.

Changes

Makefile test target cleanup

Layer / File(s) Summary
Consolidate Helm test targets
packages/apps/mariadb/Makefile, packages/apps/kafka/Makefile, packages/extra/monitoring/Makefile
Removes early or duplicate Helm unit test target definitions while preserving the remaining build and test workflows.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: androndo, kvaps, lllamnyp

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing duplicate test targets from package Makefiles.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mariadb-makefile-duplicate-test

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.

Three package Makefiles declared an identical `test` target twice, so
every invocation printed "overriding commands for target 'test'" and
"ignoring old commands". Make names the lines in that warning: it was
already running the second recipe and discarding the first, so the first
declaration was dead in each case and removing it changes nothing but
the noise.

Which copy is dead is not the same in all three, so the edit is not
mechanical. In monitoring the `.PHONY: test` line sits above the dead
recipe rather than the live one; `.PHONY` applies to the target name
wherever it is declared, so the declaration stays and only the recipe
under it goes.

Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
@lexfrei Aleksei Sviridkin (lexfrei) changed the title chore(mariadb): drop the duplicate test target chore(packages): drop duplicate test targets Jul 19, 2026
@github-actions github-actions Bot added the area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review label Jul 19, 2026

@myasnikovdaniil myasnikovdaniil 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.

LGTM — the dead copy was correctly identified in all three files, and make's own diagnostics prove it.

Business context: three package Makefiles declared test twice, printing "overriding commands for target" on every run; make executed the second copy and discarded the first.

Verified per file

Make names the lines itself. On origin/main:

kafka       Makefile:12: overriding recipe for target 'test' / Makefile:5:  ignoring old recipe
mariadb     Makefile:19: overriding recipe for target 'test' / Makefile:7:  ignoring old recipe
monitoring  Makefile:17: overriding recipe for target 'test' / Makefile:10: ignoring old recipe

Last definition wins, so in all three the live copy is the later one and the dead copy is the earlier one — and that is what this PR deletes in each case:

  • packages/apps/kafka/Makefile — dead 4-5, live 11-12; deletes 4-6.
  • packages/apps/mariadb/Makefile — dead 6-7, live 18-19; deletes 6-8.
  • packages/extra/monitoring/Makefile — dead 9-10, live 16-17; deletes 9-10, and correctly retains the .PHONY: test at line 8.

I reconstructed each edit locally and confirmed the result is byte-identical to the PR's blobs.

The live recipe is unchanged. Before and after, all three run helm unittest . with exit 0; the only delta is that the override warnings are gone. As it happens all six recipes were identical, so deleting the live copy instead would also have been harmless — there was no way to get this wrong behaviourally, which is worth knowing but does not detract from the change.

No package drops out of test coverage. hack/helm-unit-tests.sh:22 gates inclusion on make -C "$dir" -n test exit code; measured after the change, all three still gate exit 0. Suites pass: kafka 35, monitoring 9, mariadb 15 on current main.

The default goal is unaffected — .DEFAULT_GOAL = help before and after in all three; removing the first target does not shift it.

Follow-up (non-blocking, wording only)

The PR body says "which copy is dead is not the same across the three". That is imprecise in a way that could mislead the next reader about make's semantics: the dead copy is the first in all three files. What actually differs between them is where .PHONY: test sits relative to the duplicate pair. Worth a small wording fix; no code change.

Note on the test-count difference

The body cites mariadb at 11 tests where main now shows 15. Not a discrepancy — it was accurate at the branch point, and main has since gained tests/startup_probe_test.yaml (+4) via #3344.

@myasnikovdaniil
myasnikovdaniil merged commit 2830ad9 into main Jul 20, 2026
16 checks passed
@myasnikovdaniil
myasnikovdaniil deleted the fix/mariadb-makefile-duplicate-test branch July 20, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/database Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse) area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt 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