Skip to content

Conversation

@GrigoriyPA
Copy link
Collaborator

Changelog entry

Forbidden change of external data source type if it has dependencies

Changelog category

  • Bugfix

Description for reviewers

Bugfix ticket: https://st.yandex-team.ru/YQ-4857

@GrigoriyPA GrigoriyPA requested review from a team as code owners November 3, 2025 16:14
@github-actions github-actions bot added the bugfix label Nov 3, 2025
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

2025-11-03 16:14:27 UTC Pre-commit check linux-x86_64-release-asan for e9d69b6 has started.
2025-11-03 16:14:50 UTC Artifacts will be uploaded here
2025-11-03 16:16:13 UTC ya make is running...
🟡 2025-11-03 18:13:18 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
15532 14968 0 244 294 26

🟢 2025-11-03 18:13:25 UTC Build successful.
🟢 2025-11-03 18:13:48 UTC ydbd size 3.8 GiB changed* by +9.7 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 802fb8a merge: e9d69b6 diff diff %
ydbd size 4 068 675 512 Bytes 4 068 685 416 Bytes +9.7 KiB +0.000%
ydbd stripped size 1 510 375 912 Bytes 1 510 378 920 Bytes +2.9 KiB +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link
Contributor

Copilot AI 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 pull request refactors the external data source creation and alteration logic, and adds validation to prevent changing the source type when the data source is in use. The main changes include:

  • Refactored CreateExternalDataSource to use modern C++ patterns (MakeIntrusive instead of new, direct assignment instead of CopyFrom)
  • Added validation to prevent changing external data source type when it's referenced by other entities
  • Improved code formatting and namespace organization
  • Added comprehensive test coverage for the new validation logic

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
ydb/core/tx/schemeshard/schemeshard__operation_common_external_data_source.cpp Refactored CreateExternalDataSource function to use MakeIntrusive and direct assignment for protobuf fields
ydb/core/tx/schemeshard/schemeshard__operation_alter_external_data_source.cpp Added validation to prevent source type changes when data source is in use; improved code formatting and namespace organization
ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp Added tests for source type change validation and CREATE OR REPLACE functionality
ydb/core/kqp/gateway/kqp_metadata_loader.cpp Added type mismatch validation between external table and data source; improved code comments

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

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

🟢 2025-11-03 16:17:11 UTC The validation of the Pull Request description is successful.

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

2025-11-03 16:17:39 UTC Pre-commit check linux-x86_64-relwithdebinfo for e9d69b6 has started.
2025-11-03 16:17:55 UTC Artifacts will be uploaded here
2025-11-03 16:19:22 UTC ya make is running...
🟡 2025-11-03 17:54:42 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
39125 36303 0 1 2791 30

2025-11-03 17:54:54 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-11-03 18:07:40 UTC Tests successful.

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
57 (only retried tests) 41 0 0 0 16

🟢 2025-11-03 18:07:43 UTC Build successful.
🟢 2025-11-03 18:08:01 UTC ydbd size 2.3 GiB changed* by +10.1 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 802fb8a merge: e9d69b6 diff diff %
ydbd size 2 429 287 080 Bytes 2 429 297 400 Bytes +10.1 KiB +0.000%
ydbd stripped size 516 135 944 Bytes 516 141 000 Bytes +4.9 KiB +0.001%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

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.

1 participant