Skip to content

refactor: validate backup retention days on SQL DB#249

Open
v-alexmoraru wants to merge 8 commits into
microsoft:mainfrom
v-alexmoraru:v-alexmoraru/add-backup-retention-days-sql
Open

refactor: validate backup retention days on SQL DB#249
v-alexmoraru wants to merge 8 commits into
microsoft:mainfrom
v-alexmoraru:v-alexmoraru/add-backup-retention-days-sql

Conversation

@v-alexmoraru

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 11, 2026 10:47
@v-alexmoraru v-alexmoraru requested a review from a team as a code owner June 11, 2026 10:47
@v-alexmoraru v-alexmoraru marked this pull request as draft June 11, 2026 10:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds SQLDatabase-specific validation for the properties.backupRetentionDays field when using the fs set command, including a dedicated error message and test coverage.

Changes:

  • Added validate_sql_database_property to enforce backupRetentionDays integer range validation.
  • Integrated SQLDatabase property validation into fs set execution for SQLDatabase items.
  • Added constants and an error message helper, plus unit tests for valid/invalid inputs.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_utils/test_fab_cmd_set_utils.py Adds unit tests covering SQLDatabase backupRetentionDays validation scenarios.
src/fabric_cli/utils/fab_cmd_set_utils.py Implements SQLDatabase-specific validator for backupRetentionDays.
src/fabric_cli/errors/common.py Adds a dedicated error message for invalid backupRetentionDays.
src/fabric_cli/core/fab_constant.py Introduces SQLDatabase validation constants (min/max days and property key).
src/fabric_cli/commands/fs/set/fab_fs_set_item.py Hooks SQLDatabase property validation into the set command execution path.

Comment thread src/fabric_cli/utils/fab_cmd_set_utils.py Outdated
Comment thread tests/test_utils/test_fab_cmd_set_utils.py
@v-alexmoraru v-alexmoraru marked this pull request as ready for review June 17, 2026 05:23
Copilot AI review requested due to automatic review settings June 17, 2026 05:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread src/fabric_cli/utils/fab_cmd_set_utils.py Outdated
Comment thread src/fabric_cli/utils/fab_cmd_set_utils.py Outdated
Comment thread tests/test_utils/test_fab_cmd_set_utils.py
Comment thread tests/test_commands/recordings/test_commands/test_set/class_setup.yaml Outdated
Comment thread tests/test_commands/recordings/test_commands/test_set/class_setup.yaml Outdated
Comment thread tests/test_commands/recordings/test_commands/test_set/class_setup.yaml Outdated
Comment thread tests/test_commands/recordings/test_commands/test_set/class_setup.yaml Outdated
Copilot AI review requested due to automatic review settings June 17, 2026 05:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread src/fabric_cli/utils/fab_cmd_set_utils.py
Comment thread src/fabric_cli/utils/fab_cmd_set_utils.py
Comment thread tests/test_commands/recordings/test_commands/test_set/class_setup.yaml Outdated
Comment thread tests/test_utils/test_fab_cmd_set_utils.py
Comment thread src/fabric_cli/core/fab_constant.py Outdated
Comment thread src/fabric_cli/errors/common.py Outdated
Comment thread src/fabric_cli/utils/fab_cmd_set_utils.py Outdated
Comment thread tests/test_commands/test_set.py
@ayeshurun

Copy link
Copy Markdown
Collaborator

@v-alexmoraru please add PR description and link the issue to it (by adding - Fixed #<issue number>

Copilot AI review requested due to automatic review settings June 22, 2026 11:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 8 comments.

Comment thread src/fabric_cli/utils/fab_cmd_set_utils.py Outdated
Comment thread src/fabric_cli/utils/fab_cmd_set_utils.py
Comment thread src/fabric_cli/utils/fab_cmd_set_utils.py
Comment thread tests/test_commands/test_set.py
Comment thread tests/test_commands/test_set.py
Comment thread tests/test_commands/test_set.py
Comment thread tests/test_commands/test_set.py
Comment thread tests/test_commands/test_set.py
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