Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent dropping of critical system views, functions, and procedures #3480

Open
wants to merge 9 commits into
base: BABEL_5_X_DEV
Choose a base branch
from

Conversation

roshan0708
Copy link
Contributor

Description

This commit introduces restrictions to prevent the dropping of essential system views, functions, and procedures within the dbo schema for both TSQL and PSQL dialects:

  • sp_addlinkedserver
  • syspolicy_configuration
  • syspolicy_system_health_state
  • fn_syspolicy_is_automation_enabled

Generalized the restriction mechanism for handling all kinds of objects.

Issues Resolved

JIRA-5145, JIRA-5146

Test Scenarios Covered

  • Use case based - y

  • Boundary conditions -

  • Arbitrary inputs -

  • Negative test cases -

  • Minor version upgrade tests -

  • Major version upgrade tests -

  • Performance tests -

  • Tooling impact -

  • Client tests -

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

This commit introduces restrictions to prevent the dropping of
essential system views, functions, and procedures within the dbo schema
for both TSQL and PSQL dialects:
- sp_addlinkedserver
- syspolicy_configuration
- syspolicy_system_health_state
- fn_syspolicy_is_automation_enabled

Generalized the restriction mechanism for handling all kinds of objects.

Task: JIRA-5145, JIRA-5146
Signed-off-by: Roshan Kanwar <rskanwar@amazon.com>
@roshan0708 roshan0708 requested a review from sumitj824 February 10, 2025 07:46
@coveralls
Copy link
Collaborator

coveralls commented Feb 10, 2025

Pull Request Test Coverage Report for Build 13258679741

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 33 of 37 (89.19%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 75.006%

Changes Missing Coverage Covered Lines Changed/Added Lines %
contrib/babelfishpg_tsql/src/pl_handler.c 5 6 83.33%
contrib/babelfishpg_tsql/src/pl_funcs-2.c 28 31 90.32%
Totals Coverage Status
Change from base Build 13203692462: 0.03%
Covered Lines: 47109
Relevant Lines: 62807

💛 - Coveralls

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.

3 participants