Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

YACHT-1133: deleted partition_id from dataset/list restore #101

Merged
merged 3 commits into from
Dec 10, 2018

Conversation

marek-tabor
Copy link
Contributor

Potential solution. Need to be tested on dev.

@marek-tabor marek-tabor requested a review from a team December 4, 2018 12:32
radkomateusz
radkomateusz previously approved these changes Dec 4, 2018
@marek-tabor
Copy link
Contributor Author

marek-tabor commented Dec 4, 2018

Do not merge, needs to fix tests

@@ -111,24 +111,6 @@ def test_should_not_create_restore_items_for_deleted_backups(self):
# then
self.assertEqual(generated_restore_items, [[restore_item]])

def test_should_create_restore_item_for_partition(
Copy link
Contributor

Choose a reason for hiding this comment

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

I would left this tests, but edit what it expects.

We still use partitionId in source table, only we don't specified them for target. (it is how it was done in BackupCreator class - I believe we should do the same for restore also).

@@ -196,15 +178,13 @@ def __prepare_tables_which_should_be_returned_by_max_partition_days_query():
project_id=PROJECT_TO_RESTORE,
dataset_id=DATASET_TO_RESTORE,
table_id='tbl1',
date=datetime(2017, 12, 6),
partition_id='20171206'
Copy link
Contributor

Choose a reason for hiding this comment

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

after change, your tests doesn't generate partitions in datastore.

In my opinion it should, we still want to test how our application works for partitioned table.

@marek-tabor
Copy link
Contributor Author

I deployed this commit on dev, then created copy jobs that restore partitioned table and it looks like it works without any errors.

@coveralls
Copy link

coveralls commented Dec 8, 2018

Pull Request Test Coverage Report for Build 928

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 8 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.3%) to 83.142%

Files with Coverage Reduction New Missed Lines %
src/slo/backup_quality/quality_sli_handler.py 2 0.0%
src/backup/after_backup_action_handler.py 6 88.71%
Totals Coverage Status
Change from base Build 912: -0.3%
Covered Lines: 2540
Relevant Lines: 3055

💛 - Coveralls

@przemyslaw-jasinski przemyslaw-jasinski merged commit 2f416da into master Dec 10, 2018
@przemyslaw-jasinski przemyslaw-jasinski deleted the YACHT-1133 branch December 10, 2018 17:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants