Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

column order validation feature#125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
npc-code wants to merge2 commits intogithub:main
base:main
Choose a base branch
Loading
fromnpc-code:column_order_validation

Conversation

@npc-code
Copy link

The purpose of this feature is to prevent alterations to existing tables that would insert new columns before existing ones.

KUSTO_ENABLE_COLUMN_VALIDATION must be set totrue in order for this check to come into play. This preserves the current default behavior to prevent existing workflows from being unexpectedly disrupted.

When set:

  • column order is checked
  • if the column order does not pass the validation check, the deployment is blocked

Included are unit tests, documentation, etc.

CopilotAI review requested due to automatic review settingsOctober 27, 2025 18:37
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces an optional column order validation feature that prevents new columns from being inserted before existing columns in Kusto table definitions, which can cause update policy failures. The feature is disabled by default and can be enabled via theKUSTO_ENABLE_COLUMN_VALIDATION environment variable or programmatically.

Key Changes:

  • AddedValidationSettings class to manage feature flags with environment variable support
  • ImplementedColumnOrderValidator to detect when existing columns appear after new columns in table definitions
  • ModifiedDatabaseChanges.GenerateChanges to optionally apply validation and block deployments with violations

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
README.mdDocuments the column order validation feature, configuration options, and example scenarios
KustoSchemaTools/Validation/ValidationResult.csNew class representing validation success/failure with error messages and severity levels
KustoSchemaTools/Validation/ColumnOrderValidator.csCore validation logic that checks column ordering rules
KustoSchemaTools/Configuration/ValidationSettings.csConfiguration class with environment variable parsing for feature flags
KustoSchemaTools/Changes/DatabaseChanges.csUpdated to accept validation settings and apply column order checks to table changes
KustoSchemaTools.Tests/Parser/KustoClusterHandlerTests.csFixed null forgiving operator usage in test
KustoSchemaTools.Tests/Validation/ColumnOrderValidatorTests.csComprehensive unit tests for column order validation logic
KustoSchemaTools.Tests/Configuration/ValidationSettingsTests.csTests for configuration parsing and environment variable handling
KustoSchemaTools.Tests/Changes/DatabaseChangesValidationFlagTests.csTests verifying validation is only applied when enabled
KustoSchemaTools.Tests/Changes/DatabaseChangesColumnValidationTests.csIntegration tests for validation behavior with various table scenarios

💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.

@ianwinsemius
Copy link

There have been a couple of incidents related to the order of columns in Kusto not lining up correctly that have been able to merge in warehouse-config. Being able to validate the order of columns prior to merging would potentially prevent future incidents like this. It became clear that the intent of this update wasn't obvious during a discussionearlier.

Ref:
https://github.com/github/availability/issues/4583
https://github.com/github/availability/issues/4128

…emoved redundant validation check at writer level
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@whitleykeithwhitleykeithwhitleykeith approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@npc-code@ianwinsemius@whitleykeith

[8]ページ先頭

©2009-2025 Movatter.jp