Standardize and auto add license headers for SQL files with pre-commit#12071
Standardize and auto add license headers for SQL files with pre-commit#12071DaanHoogland merged 2 commits intoapache:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12071 +/- ##
=========================================
Coverage 17.56% 17.56%
- Complexity 15534 15540 +6
=========================================
Files 5911 5911
Lines 529359 529359
Branches 64655 64655
=========================================
+ Hits 92957 92980 +23
+ Misses 425945 425920 -25
- Partials 10457 10459 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@jbampton a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15759 |
There was a problem hiding this comment.
Pull Request Overview
This PR adds automated license header management for SQL files through pre-commit hooks and corrects a spelling error in an existing license header.
- Adds a new pre-commit hook configuration to automatically insert/standardize Apache license headers for all SQL files
- Fixes a typo in an existing SQL file license header ("compliances" → "compliance")
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .pre-commit-config.yaml | Adds new insert-license hook configuration for SQL files to automatically manage license headers |
| engine/schema/src/main/resources/META-INF/db/schema-307to410.sql | Corrects spelling error in license header from "compliances" to "compliance" |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pearl1594
left a comment
There was a problem hiding this comment.
lgtm
Tested it locally.
- Installed pre-commit tool
python3 -m pip install --user pre-commit
- Cleared the fake.sql file at ~/server/src/test/resources/fake.sql
- Ran the following:
~/.local/bin/pre-commit run insert-license --files server/src/test/resources/fake.sql
Saw the license added to the sql file
* main: (1223 commits) Standardize and auto add license headers for SQL files with pre-commit (apache#12071) pre-commit use colored text in the CI for `pass / fail / skipped` (apache#11977) ui(locales): remove duplicates and fix typos (apache#11872) pre-commit: auto add table of contents with `doctoc` (apache#11679) chore: rename workflow `linter.yml` to `pre-commit.yml` (apache#11647) engine-schema: upgrade path for 4.23.0 (apache#12048) Fixes:apache#7837: Add isolationMethods and vlan to TrafficTypeResponse (apache#8151) Svgs (apache#12051) Update GUI Kubernetes logo (apache#11895) Keeping consistency with other error messages. (apache#11649) enhancement: add instance info as Libvirt metadata (apache#11061) Add empty Provider value in Network/VPC Offering form (apache#11982) merge fix Updating pom.xml version numbers for release 4.23.0.0-SNAPSHOT Updating pom.xml version numbers for release 4.22.1.0-SNAPSHOT UI: fix typo Upload SSL certificate (apache#11869) api/test: fix storage pool update with only id (apache#11897) Updating pom.xml version numbers for release 4.22.0.0 Handle null mountTimeout in RestoreBackupCommand (apache#11944) Fix the config 'powerflex.connect.on.demand' description (apache#11926) ...
Description
This PR...
refs #12070
refs #12069
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
With pre-commit
How did you try to break this feature and the system with this change?