- Notifications
You must be signed in to change notification settings - Fork37
Usage of external testgres.os_ops and testgres.common#289
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
dmitry-lipetsk wants to merge27 commits intopostgrespro:masterChoose a base branch fromdmitry-lipetsk:D20250816_001--external_os_ops_v001
base:master
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Open
Changes from1 commit
Commits
Show all changes
27 commits Select commitHold shift + click to select a range
be36713 [prepare] rename: testgres -> src
dmitry-lipetska36f485 Using an testgres.os_ops
dmitry-lipetsk594fdb5 setup.py is corrected [install_requires: testgres.os_ops]
dmitry-lipetsk4170212 cleanup
dmitry-lipetsk0d5d30f cleanup (__init__.py, pg_probackup2)
dmitry-lipetsk54082f8 [rollback] src/__init__.py is restored
dmitry-lipetskdd1c2a2 flake8
dmitry-lipetsk674026d tests/requirements.txt is added
dmitry-lipetsk1a70df7 Usage of testgres.os_ops from postgrespro is begun
dmitry-lipetsk36acc38 GITHUB_TESTGRES_TOKEN_RO is used
dmitry-lipetsk5937003 setup.py is updated [secret]
dmitry-lipetskcce238a cleanup
dmitry-lipetsk801ae9a Merge branch 'master' into D20250816_001--external_os_ops_v001
dmitry-lipetske58698a testgres.os_ops is open now
dmitry-lipetsk7f3c512 requirements.txt is updated
dmitry-lipetsk2266d99 cleanup [garbage]
dmitry-lipetske7dc9f3 [CI] Docker files are updated (git)
dmitry-lipetsk611943d [CI] Docker file for Ubuntu 24.04 is fixed.
dmitry-lipetskebe8a08 [CI] Docker file for Ubuntu 24.04 is fixed [one more time]
dmitry-lipetskf13d4ae A problem with documentation is fixed [Sphinx]
dmitry-lipetsk6b408fb fix: testgres/exceptions.py is deleted (again)
dmitry-lipetskde73028 req: testgres.os_ops>=0.0.2,<1.0.0
dmitry-lipetsk5d3ec71 Merge branch 'master' into D20250816_001--external_os_ops_v001
dmitry-lipetsk3084635 Merge branch 'master' into D20250816_001--external_os_ops_v001
dmitry-lipetsk4219763 dockerfiles: git is not required to get python packages
dmitry-lipetsk2b44d99 Merge branch 'master' into D20250816_001--external_os_ops_v001
dmitry-lipetska1037aa Merge branch 'master' into D20250816_001--external_os_ops_v001
dmitry-lipetskFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Merge branch 'master' into D20250816_001--external_os_ops_v001
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit801ae9ae1dbb450b46531faba9d172d53e1de07b
There are no files selected for viewing
2 changes: 1 addition & 1 deletionsetup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
113 changes: 113 additions & 0 deletionstestgres/exceptions.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| # coding: utf-8 | ||
| import six | ||
| class TestgresException(Exception): | ||
| pass | ||
| class PortForException(TestgresException): | ||
| pass | ||
| @six.python_2_unicode_compatible | ||
| class ExecUtilException(TestgresException): | ||
| def __init__(self, message=None, command=None, exit_code=0, out=None, error=None): | ||
| super(ExecUtilException, self).__init__(message) | ||
| self.message = message | ||
| self.command = command | ||
| self.exit_code = exit_code | ||
| self.out = out | ||
| self.error = error | ||
| def __str__(self): | ||
| msg = [] | ||
| if self.message: | ||
| msg.append(self.message) | ||
| if self.command: | ||
| command_s = ' '.join(self.command) if isinstance(self.command, list) else self.command | ||
| msg.append(u'Command: {}'.format(command_s)) | ||
| if self.exit_code: | ||
| msg.append(u'Exit code: {}'.format(self.exit_code)) | ||
| if self.error: | ||
| msg.append(u'---- Error:\n{}'.format(self.error)) | ||
| if self.out: | ||
| msg.append(u'---- Out:\n{}'.format(self.out)) | ||
| return self.convert_and_join(msg) | ||
| @staticmethod | ||
| def convert_and_join(msg_list): | ||
| # Convert each byte element in the list to str | ||
| str_list = [six.text_type(item, 'utf-8') if isinstance(item, bytes) else six.text_type(item) for item in | ||
| msg_list] | ||
| # Join the list into a single string with the specified delimiter | ||
| return six.text_type('\n').join(str_list) | ||
| @six.python_2_unicode_compatible | ||
| class QueryException(TestgresException): | ||
| def __init__(self, message=None, query=None): | ||
| super(QueryException, self).__init__(message) | ||
| self.message = message | ||
| self.query = query | ||
| def __str__(self): | ||
| msg = [] | ||
| if self.message: | ||
| msg.append(self.message) | ||
| if self.query: | ||
| msg.append(u'Query: {}'.format(self.query)) | ||
| return six.text_type('\n').join(msg) | ||
| class TimeoutException(QueryException): | ||
| pass | ||
| class CatchUpException(QueryException): | ||
| pass | ||
| @six.python_2_unicode_compatible | ||
| class StartNodeException(TestgresException): | ||
| def __init__(self, message=None, files=None): | ||
| super(StartNodeException, self).__init__(message) | ||
| self.message = message | ||
| self.files = files | ||
| def __str__(self): | ||
| msg = [] | ||
| if self.message: | ||
| msg.append(self.message) | ||
| for f, lines in self.files or []: | ||
| msg.append(u'{}\n----\n{}\n'.format(f, lines)) | ||
| return six.text_type('\n').join(msg) | ||
| class InitNodeException(TestgresException): | ||
| pass | ||
| class BackupException(TestgresException): | ||
| pass | ||
| class InvalidOperationException(TestgresException): | ||
| pass |
You are viewing a condensed version of this merge commit. You can view thefull changes here.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.