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

[9.0][MIG] auto_backup #526

Merged
merged 88 commits into from
Nov 18, 2016
Merged

[9.0][MIG] auto_backup #526

merged 88 commits into from
Nov 18, 2016

Conversation

lasley
Copy link
Contributor

@lasley lasley commented Aug 23, 2016

This migrates auto_backup to v9

Note this was mostly unchanged except for two self.ensure_ones in db_backup.py

Yenthe666 and others added 30 commits November 25, 2015 11:00
Added all the new fields and sentences. This will be the template for
translations.
Full translation of the module to Dutch
Add Chinese translations to the module. Written by talway.
Changed some translations
Thanks to Martin Schmid!
could'nt > couldn't
Flemish translations are identical to Dutch.
Used to open  fp = open(file_path,'wb') a few lines before it was needed. This shouldn't be too much of a problem but opening and closing it right after eachother keeps the session open for less time and there are less chances on failure.
[FIX] Flake8
[RM] useless files
[FIX] schedule_backup method
[IMP] IT translation
[IMP] tests
[FIX] Contributors
@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-

Choose a reason for hiding this comment

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

Arenot yml test files deprecated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are they? I would admittedly be very happy about that. Where'd you see this?

Choose a reason for hiding this comment

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

Not sure where: I will try to track down...

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this? odoo/odoo#6287 (comment) YAML is not listed

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Awesome well that just made me incredibly happy - I hate the YML tests. I'll move this to Python

Copy link
Member

Choose a reason for hiding this comment

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

@pedrobaeza do you have any pointer about the fact they are removed in v10? or deprecated in v9? May be we should discuss it at the OCA... I think it's a bit late to require no YAML test anymore in v9 given the OCA is already late on that v9 transition...

Copy link
Member

Choose a reason for hiding this comment

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

You can see in the comment above (odoo/odoo#6287 (comment)) the removal part. About deprecation, I don't remember where it was said, but it has been stated several times.

I see no point in discussing this: if the author of the PR agrees to change the test, perfect. If not, better YML test than nothing. In v10 we will need to change them. It's not a blocking point.

Copy link
Member

Choose a reason for hiding this comment

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

@pedrobaeza well if we still accept YML tests on 9.0 that's fine for me. The contrary would have annoyed me cause it would have slowed migration a bit too much... On the contrary, 9.0 to 10.0 migration should be pretty straightforward so it will be easier to bite the bullet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case we're talking maybe a ten minute conversion too, so really not too much skin off my back even if I didn't already want to see YML die in a fire 😄

Just to note though, this isn't a test - it's the cron and message data.

@lasley
Copy link
Contributor Author

lasley commented Aug 23, 2016

FYI I'll be adding more tests as well

@pedrobaeza pedrobaeza mentioned this pull request Aug 23, 2016
59 tasks
@lasley lasley force-pushed the release/9.0/auto_backup branch 5 times, most recently from 8c0b479 to 6cd224d Compare August 26, 2016 22:04
* compute_name
* check_folder
* action_sftp_test_connection
* action_backup - sftp
* action_backup_all
* sftp_connection
* filename
@lasley lasley force-pushed the release/9.0/auto_backup branch from 6cd224d to f6b77ce Compare August 26, 2016 22:07
@lasley
Copy link
Contributor Author

lasley commented Aug 26, 2016

Alright comments handled and test coverage raised. Methods still missing coverage, but I figure they're probably fine given it was all pre-existing code:

  • backup_log
  • cleanup
  • cleanup_log

Copy link
Contributor

@ivantodorovich ivantodorovich left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@max3903 max3903 merged commit 2798d45 into OCA:9.0 Nov 18, 2016
@lasley lasley deleted the release/9.0/auto_backup branch November 18, 2016 20:27
lasley added a commit to LasLabs/server-tools that referenced this pull request Nov 18, 2016
* Update english pot file

Added all the new fields and sentences. This will be the template for
translations.

* Dutch translations

Full translation of the module to Dutch

* Chinese translations

Add Chinese translations to the module. Written by talway.

* Changes chinese translation

Changed some translations

* Full German translations

Thanks to Martin Schmid!

* Typo fix

could'nt > couldn't

* Flemish translations

Flemish translations are identical to Dutch.

* Open FTP session on the last moment possible

Used to open  fp = open(file_path,'wb') a few lines before it was needed. This shouldn't be too much of a problem but opening and closing it right after eachother keeps the session open for less time and there are less chances on failure.

* Porting module to OCA 8.0

* [FIX] module

* [FIX] bug logger --> _logger call
[FIX] Flake8
[RM] useless files

* [FIX] Readme.rst

* [FIX] defaults value

* [FIX] rebased commit

* [RM] description index.html

* [RF] porting to new api
[FIX] schedule_backup method
[IMP] IT translation
[IMP] tests

* [FIX] test

* [FIX] flake8

* [IMP] deps in travis.yml
[FIX] flake8

* [FIX] flake8 and pylint

* [FIX] name of file

* [FIX] autoremove method
[FIX] Contributors

* [FIX] mail.tempale seems not work in cron task, replaced  with direct call of mail.mail

* [FIX] Readme

* [FIX] review remarks

* [FIX] handled ssl hosts
[FIX] Flake8

* [FIX] handled ssl hosts
[FIX] Flake8

* [FIX]  fixed, last review remarks

* [FIX] travis lint check

* [FIX] backup only local db , beacause xmlrpc call of dump cause memory leak

* [RM] useless field

* [FIX] check_dd method
[ADD] test case improved

* [auto_backup] Refactor.

- Follow template README.
- Remove HTML README.
- Move models to models folder.
- Model and view file names follow guidelines.
- Unused methods cleanup.
- Remove unneeded `.pot` file.
- Fix permissons.
- Follow PEP8 in names everywhere.
- Set more descriptive field names.
- Disable backups for other databases, for security.
- Remove db name from generated file, for easier cleanup.
- EAFP logic everywhere.
- More descriptive name.
- Data files moved to YAML, with cleaner ir.cron record creation.
- Add permissions for db.backup model.
- Icons.
- Update tests with new format.
- Storage method is a selectable, for easier extensibility.
- Instead of custom mailing, it just has a mail thread where you can subscribe.
- Should fix almost all comments in OCA#203.

* Update english pot file

Added all the new fields and sentences. This will be the template for
translations.

* Dutch translations

Full translation of the module to Dutch

* Chinese translations

Add Chinese translations to the module. Written by talway.

* Changes chinese translation

Changed some translations

* Full German translations

Thanks to Martin Schmid!

* Typo fix

could'nt > couldn't

* Flemish translations

Flemish translations are identical to Dutch.

* Open FTP session on the last moment possible

Used to open  fp = open(file_path,'wb') a few lines before it was needed. This shouldn't be too much of a problem but opening and closing it right after eachother keeps the session open for less time and there are less chances on failure.

* Porting module to OCA 8.0

* [FIX] module

* [FIX] bug logger --> _logger call
[FIX] Flake8
[RM] useless files

* [FIX] Readme.rst

* [FIX] defaults value

* [FIX] rebased commit

* [RM] description index.html

* [RF] porting to new api
[FIX] schedule_backup method
[IMP] IT translation
[IMP] tests

* [FIX] test

* [FIX] flake8

* [IMP] deps in travis.yml
[FIX] flake8

* [FIX] flake8 and pylint

* [FIX] name of file

* [FIX] autoremove method
[FIX] Contributors

* [FIX] mail.tempale seems not work in cron task, replaced  with direct call of mail.mail

* [FIX] Readme

* [FIX] review remarks

* [FIX] handled ssl hosts
[FIX] Flake8

* [FIX] handled ssl hosts
[FIX] Flake8

* [FIX]  fixed, last review remarks

* [FIX] travis lint check

* [FIX] backup only local db , beacause xmlrpc call of dump cause memory leak

* [RM] useless field

* [FIX] check_dd method
[ADD] test case improved

* [auto_backup] Refactor.

- Follow template README.
- Remove HTML README.
- Move models to models folder.
- Model and view file names follow guidelines.
- Unused methods cleanup.
- Remove unneeded `.pot` file.
- Fix permissons.
- Follow PEP8 in names everywhere.
- Set more descriptive field names.
- Disable backups for other databases, for security.
- Remove db name from generated file, for easier cleanup.
- EAFP logic everywhere.
- More descriptive name.
- Data files moved to YAML, with cleaner ir.cron record creation.
- Add permissions for db.backup model.
- Icons.
- Update tests with new format.
- Storage method is a selectable, for easier extensibility.
- Instead of custom mailing, it just has a mail thread where you can subscribe.
- Should fix almost all comments in OCA#203.

* Reduce headers.

This respects the upstream license choice (GPL/AGPL) but reduces
verbosity.

It would be ideal to have everything under AGPL though.

* Fix view format.

* Add shortcut to execute backups from the "More" menu.

* Avoid duplicated backups.

* Make sure you don't backup inside the filestore folder.

The filestore is saved in the backup, so if you save the backup in the
filestore, you'd end up with a huge backup that includes itself and the
universe may collapse.

* [FIX] This was removing all databases.

* FIX License type

* OCA Transbot updated translations from Transifex

* OCA Transbot updated translations from Transifex

* OCA Transbot updated translations from Transifex

* [FIX] auto_backup: bad reference to field sftp_private_key (OCA#423)

Bump module version to 8.0.1.0.1

* [FIX] auto_backup: Empty dump using sftp backup option (OCA#432)

* [FIX] logger db_backup for pysftp (OCA#419)

* OCA Transbot updated translations from Transifex

* OCA Transbot updated translations from Transifex

* OCA Transbot updated translations from Transifex

* OCA Transbot updated translations from Transifex

* [FIX] remove en.po that was erroneously created by transbot

* [MIG] auto_backup: Migrate to v9
* Add self.ensure_ones
* Add test coverage

* [ADD] auto_backup: Test coverage
* compute_name
* check_folder
* action_sftp_test_connection
* action_backup - sftp
* action_backup_all
* sftp_connection
* filename
@lmignon
Copy link
Contributor

lmignon commented Nov 24, 2016

@max3903 @lasley @pedrobaeza This merge must be reverted. The commit history is not preserved!
#619

@lasley lasley restored the release/9.0/auto_backup branch November 24, 2016 15:04
@lasley lasley deleted the release/9.0/auto_backup branch November 24, 2016 15:14
lasley added a commit to LasLabs/server-tools that referenced this pull request Nov 24, 2016
lasley added a commit to LasLabs/server-tools that referenced this pull request Nov 24, 2016
* Update english pot file

Added all the new fields and sentences. This will be the template for
translations.

* Dutch translations

Full translation of the module to Dutch

* Chinese translations

Add Chinese translations to the module. Written by talway.

* Changes chinese translation

Changed some translations

* Full German translations

Thanks to Martin Schmid!

* Typo fix

could'nt > couldn't

* Flemish translations

Flemish translations are identical to Dutch.

* Open FTP session on the last moment possible

Used to open  fp = open(file_path,'wb') a few lines before it was needed. This shouldn't be too much of a problem but opening and closing it right after eachother keeps the session open for less time and there are less chances on failure.

* Porting module to OCA 8.0

* [FIX] module

* [FIX] bug logger --> _logger call
[FIX] Flake8
[RM] useless files

* [FIX] Readme.rst

* [FIX] defaults value

* [FIX] rebased commit

* [RM] description index.html

* [RF] porting to new api
[FIX] schedule_backup method
[IMP] IT translation
[IMP] tests

* [FIX] test

* [FIX] flake8

* [IMP] deps in travis.yml
[FIX] flake8

* [FIX] flake8 and pylint

* [FIX] name of file

* [FIX] autoremove method
[FIX] Contributors

* [FIX] mail.tempale seems not work in cron task, replaced  with direct call of mail.mail

* [FIX] Readme

* [FIX] review remarks

* [FIX] handled ssl hosts
[FIX] Flake8

* [FIX] handled ssl hosts
[FIX] Flake8

* [FIX]  fixed, last review remarks

* [FIX] travis lint check

* [FIX] backup only local db , beacause xmlrpc call of dump cause memory leak

* [RM] useless field

* [FIX] check_dd method
[ADD] test case improved

* [auto_backup] Refactor.

- Follow template README.
- Remove HTML README.
- Move models to models folder.
- Model and view file names follow guidelines.
- Unused methods cleanup.
- Remove unneeded `.pot` file.
- Fix permissons.
- Follow PEP8 in names everywhere.
- Set more descriptive field names.
- Disable backups for other databases, for security.
- Remove db name from generated file, for easier cleanup.
- EAFP logic everywhere.
- More descriptive name.
- Data files moved to YAML, with cleaner ir.cron record creation.
- Add permissions for db.backup model.
- Icons.
- Update tests with new format.
- Storage method is a selectable, for easier extensibility.
- Instead of custom mailing, it just has a mail thread where you can subscribe.
- Should fix almost all comments in OCA#203.

* Update english pot file

Added all the new fields and sentences. This will be the template for
translations.

* Dutch translations

Full translation of the module to Dutch

* Chinese translations

Add Chinese translations to the module. Written by talway.

* Changes chinese translation

Changed some translations

* Full German translations

Thanks to Martin Schmid!

* Typo fix

could'nt > couldn't

* Flemish translations

Flemish translations are identical to Dutch.

* Open FTP session on the last moment possible

Used to open  fp = open(file_path,'wb') a few lines before it was needed. This shouldn't be too much of a problem but opening and closing it right after eachother keeps the session open for less time and there are less chances on failure.

* Porting module to OCA 8.0

* [FIX] module

* [FIX] bug logger --> _logger call
[FIX] Flake8
[RM] useless files

* [FIX] Readme.rst

* [FIX] defaults value

* [FIX] rebased commit

* [RM] description index.html

* [RF] porting to new api
[FIX] schedule_backup method
[IMP] IT translation
[IMP] tests

* [FIX] test

* [FIX] flake8

* [IMP] deps in travis.yml
[FIX] flake8

* [FIX] flake8 and pylint

* [FIX] name of file

* [FIX] autoremove method
[FIX] Contributors

* [FIX] mail.tempale seems not work in cron task, replaced  with direct call of mail.mail

* [FIX] Readme

* [FIX] review remarks

* [FIX] handled ssl hosts
[FIX] Flake8

* [FIX] handled ssl hosts
[FIX] Flake8

* [FIX]  fixed, last review remarks

* [FIX] travis lint check

* [FIX] backup only local db , beacause xmlrpc call of dump cause memory leak

* [RM] useless field

* [FIX] check_dd method
[ADD] test case improved

* [auto_backup] Refactor.

- Follow template README.
- Remove HTML README.
- Move models to models folder.
- Model and view file names follow guidelines.
- Unused methods cleanup.
- Remove unneeded `.pot` file.
- Fix permissons.
- Follow PEP8 in names everywhere.
- Set more descriptive field names.
- Disable backups for other databases, for security.
- Remove db name from generated file, for easier cleanup.
- EAFP logic everywhere.
- More descriptive name.
- Data files moved to YAML, with cleaner ir.cron record creation.
- Add permissions for db.backup model.
- Icons.
- Update tests with new format.
- Storage method is a selectable, for easier extensibility.
- Instead of custom mailing, it just has a mail thread where you can subscribe.
- Should fix almost all comments in OCA#203.

* Reduce headers.

This respects the upstream license choice (GPL/AGPL) but reduces
verbosity.

It would be ideal to have everything under AGPL though.

* Fix view format.

* Add shortcut to execute backups from the "More" menu.

* Avoid duplicated backups.

* Make sure you don't backup inside the filestore folder.

The filestore is saved in the backup, so if you save the backup in the
filestore, you'd end up with a huge backup that includes itself and the
universe may collapse.

* [FIX] This was removing all databases.

* FIX License type

* OCA Transbot updated translations from Transifex

* OCA Transbot updated translations from Transifex

* OCA Transbot updated translations from Transifex

* [FIX] auto_backup: bad reference to field sftp_private_key (OCA#423)

Bump module version to 8.0.1.0.1

* [FIX] auto_backup: Empty dump using sftp backup option (OCA#432)

* [FIX] logger db_backup for pysftp (OCA#419)

* OCA Transbot updated translations from Transifex

* OCA Transbot updated translations from Transifex

* OCA Transbot updated translations from Transifex

* OCA Transbot updated translations from Transifex

* [FIX] remove en.po that was erroneously created by transbot

* [MIG] auto_backup: Migrate to v9
* Add self.ensure_ones
* Add test coverage

* [ADD] auto_backup: Test coverage
* compute_name
* check_folder
* action_sftp_test_connection
* action_backup - sftp
* action_backup_all
* sftp_connection
* filename
lasley added a commit to LasLabs/server-tools that referenced this pull request Nov 24, 2016
max3903 pushed a commit that referenced this pull request Nov 25, 2016
@max3903
Copy link
Member

max3903 commented Nov 25, 2016

@lmignon Done

lasley added a commit to LasLabs/server-tools that referenced this pull request Dec 7, 2016
SiesslPhillip pushed a commit to grueneerde/OCA-server-tools that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-tools (12.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.