Skip to content

refactor: validate format for PIT restore of SQL DB#248

Open
v-alexmoraru wants to merge 9 commits into
microsoft:mainfrom
v-alexmoraru:v-alexmoraru/point-in-time-restore-sql-db
Open

refactor: validate format for PIT restore of SQL DB#248
v-alexmoraru wants to merge 9 commits into
microsoft:mainfrom
v-alexmoraru:v-alexmoraru/point-in-time-restore-sql-db

Conversation

@v-alexmoraru

@v-alexmoraru v-alexmoraru commented Jun 11, 2026

Copy link
Copy Markdown
Member

Fixes #149.
Validates the point-in-time restore property of SQL databases by ensuring the provided GUIDs and timestamps match the proper regex.

Copilot AI review requested due to automatic review settings June 11, 2026 10:37
@v-alexmoraru v-alexmoraru requested a review from a team as a code owner June 11, 2026 10: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

Note

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

Adds SQLDatabase point-in-time restore support to fab mkdir by validating restore parameters and emitting appropriate errors, with accompanying unit tests.

Changes:

  • Added GUID and ISO8601-with-timezone validation helpers and SQLDatabase restore payload generation.
  • Extended parameter help (get_params_per_item_type) for SQLDatabase restore mode.
  • Added/expanded tests covering GUID/timestamp validation and SQLDatabase restore scenarios.

Reviewed changes

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

File Description
tests/test_utils/test_fab_cmd_mkdir_utils.py Adds tests for GUID/timestamp validators and SQLDatabase restore payload behavior.
src/fabric_cli/utils/fab_cmd_mkdir_utils.py Implements SQLDatabase restore mode payload creation plus GUID/ISO8601 validation helpers.
src/fabric_cli/errors/mkdir.py Adds mkdir-specific error messages for restore mode validation failures.

Comment thread tests/test_utils/test_fab_cmd_mkdir_utils.py Outdated
Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py
Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py
Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py Outdated
Copilot AI review requested due to automatic review settings June 11, 2026 11:02

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 3 out of 3 changed files in this pull request and generated 4 comments.

Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py
Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py Outdated
Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py Outdated
Comment thread tests/test_utils/test_fab_cmd_mkdir_utils.py Outdated
Copilot AI review requested due to automatic review settings June 11, 2026 13:56

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 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread tests/test_utils/test_fab_cmd_mkdir_utils.py
Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py
Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py
Comment thread src/fabric_cli/errors/mkdir.py
@ayeshurun

Copy link
Copy Markdown
Collaborator

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

Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py Outdated
Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py Outdated
Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py
Copilot AI review requested due to automatic review settings June 22, 2026 12:50

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 6 out of 6 changed files in this pull request and generated 6 comments.

Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py Outdated
Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py Outdated
Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py Outdated
Comment thread src/fabric_cli/utils/fab_cmd_mkdir_utils.py Outdated
Comment thread tests/test_utils/test_fab_cmd_mkdir_utils.py Outdated
Comment thread tests/test_utils/test_fab_cmd_mkdir_utils.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 22, 2026 13:01

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 7 out of 7 changed files in this pull request and generated 1 comment.

GUID_PATTERN = re.compile(
r"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
)
GUID_PATTERN_STR = r"([a-f0-9\-]{36})"
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.

[FEATURE] [SQL database] Create SQLDatabase by restoring from another database backup (point-in-time restore)

3 participants