Skip to content

MPT-17883: add mpt tool make commands#27

Merged
d3rky merged 1 commit intomainfrom
MPT-17883-add-mpt-tool-make-commands
Feb 11, 2026
Merged

MPT-17883: add mpt tool make commands#27
d3rky merged 1 commit intomainfrom
MPT-17883-add-mpt-tool-make-commands

Conversation

@svazquezco
Copy link
Contributor

@svazquezco svazquezco commented Feb 10, 2026

Closes MPT-17883

  • Refactored Makefile into a modular structure with dynamic help generation via awk
  • Set .DEFAULT_GOAL to help for better developer experience
  • Added .editorconfig rules for Makefile-specific formatting (tab indentation)
  • Created make/common.mk with docker-compose shortcuts for development workflows (bash, build, check, check-all, down, format, run, shell, test)
  • Created make/external_tools.mk with code review target (coderabbit review --prompt-only)
  • Created make/migrations.mk with migration command targets (migrate-check, migrate-data, migrate-schema, migrate-list, migrate-new-data, migrate-new-schema)
  • Created make/repo.mk as placeholder for repository-specific targets
  • Updated README.md with documentation on modular Makefile structure and new migration commands section

@svazquezco svazquezco requested a review from a team as a code owner February 10, 2026 12:24
@svazquezco svazquezco requested review from alephsur and d3rky February 10, 2026 12:24
@coderabbitai
Copy link

coderabbitai bot commented Feb 10, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR restructures the build system by converting the Makefile from a monolithic file with explicit targets into a modular architecture. Common development tasks and migrations are moved into separate make/*.mk files, with a dynamic help system replacing static target listings.

Changes

Cohort / File(s) Summary
Editor Configuration
.editorconfig
Added Makefile-specific indentation style (tab) to override global space indentation.
Main Build File
Makefile
Refactored to load modular targets from make/*.mk files dynamically and replaced explicit target listings with dynamic help generation via awk. Removed individual target implementations in favor of modular includes.
Modular Make Targets
make/common.mk, make/external_tools.mk, make/migrations.mk, make/repo.mk
Created new modular makefile structure: common.mk provides docker-compose-based development targets (build, test, check, bash, shell, format); external_tools.mk adds code review target; migrations.mk introduces six migration management targets; repo.mk serves as extensibility placeholder.
Documentation
README.md
Updated to explain the new modular Makefile structure with "How the Makefile works" section and documented six migration commands (migrate-check, migrate-data, migrate-schema, migrate-list, migrate-new-data, migrate-new-schema).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Jira Issue Key In Title ✅ Passed The PR title contains exactly one Jira issue key 'MPT-17883' in the correct MPT-XXXX format at the beginning.
Test Coverage Required ✅ Passed The PR modifies only build automation files (Makefile, make/*.mk), configuration files (.editorconfig), and documentation (README.md). No application source code files were modified.
Single Commit Required ✅ Passed The PR contains exactly one commit (267f3e0: 'feat: add migrate make commands') with all changes consolidated into this single commit.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


No actionable comments were generated in the recent review. 🎉


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 `@make/migrations.mk`:
- Around line 15-21: Update the help comment parameter name to match the README
by replacing the inconsistent "name=<order_id>" text with "name=<migration_id>"
for both targets; specifically edit the make targets migrate-new-data and
migrate-new-schema so their descriptive comments use name=<migration_id> to
align with the README and clarify that the make variable is the migration_id
passed to $(RUN_MIGRATE).
🧹 Nitpick comments (2)
.editorconfig (1)

16-17: Consider extending the pattern to include *.mk files.

The [Makefile] section only matches a file literally named Makefile. Since this PR introduces multiple .mk files under make/ (e.g., common.mk, migrations.mk, external_tools.mk), they won't inherit the tab indentation setting.

Proposed fix to cover all Makefile-related files
-[Makefile]
+[{Makefile,*.mk}]
 indent_style = tab
README.md (1)

24-24: Format make help as inline code for consistency.

The command reference should use backticks for consistent formatting with the rest of the documentation.

Proposed fix
-Common development workflows are wrapped in the `makefile`. Run make help to see the list of available commands
+Common development workflows are wrapped in the `Makefile`. Run `make help` to see the list of available commands.

@svazquezco svazquezco force-pushed the MPT-17883-add-mpt-tool-make-commands branch 2 times, most recently from e2e8eb1 to 7c6bf32 Compare February 10, 2026 12:35
@svazquezco svazquezco force-pushed the MPT-17883-add-mpt-tool-make-commands branch from 7c6bf32 to ab4c5ab Compare February 11, 2026 09:37
@svazquezco svazquezco force-pushed the MPT-17883-add-mpt-tool-make-commands branch from ab4c5ab to 267f3e0 Compare February 11, 2026 14:08
@sonarqubecloud
Copy link

@d3rky d3rky merged commit 1ce2e83 into main Feb 11, 2026
4 checks passed
@d3rky d3rky deleted the MPT-17883-add-mpt-tool-make-commands branch February 11, 2026 14:15
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.

2 participants