| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
failure and revert_failure fields in atomdetails is defined as a JSON type,
but its data type is 'text' in mysql, which is limited to 64kbytes.
JSON data type should have the same size as a LONGTEXT.
Closes-Bug: #1959243
Change-Id: I65b6a6d896d3e8aad871dc19b0f8d0eddf48bdd6
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
the JSONType from sqlalchemy_utils is quite brittle as it only does
primitive json.dumps on values. This leads to various sorts of
StorageFailure exceptions in taskflow when, for example, an unserializable
exception bubbles up to the 'failure' field of AtomDetails.
This patch sublclasses the JSONType from sqlalchemy_utils and overrides
two of its methods that do (de)serialization to work via
oslo.serialization functions. They deal with such occurencies much
better, for example, by providing 'str' as a fallback default.
Change-Id: I3b9e9498b155199a4e707006a0cf22cda0567c06
Related-Bug: #1935957
|
| |/
|
|
|
|
|
|
|
|
| |
meta field in flowdetails is defined as a JSON data type, but its data
type is 'text' in mysql, which is limited to 64kbytes. JSON data type
should have the same size as a LONGTEXT.
Closes-Bug: #1926304
Change-Id: I9f89badfc697f0f26245ca7f4c22d62e220be5f9
|
| |
|
|
|
|
|
|
| |
create_index and create_foreign_key were using long-deprecated argument
names which were finally removed as of 1.5.0:
https://alembic.sqlalchemy.org/en/latest/changelog.html#change-da0bea3199b905783ddbd0cde968beec
Change-Id: I03405e3d0daf085d0849a6e3effc65ec05ceb7a1
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.
We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.
Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]
[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328
Change-Id: Ie7c18f2f1b6294e3d19c36112d35f4472ce77e7b
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With a lot of possible retries using mysql sa.Text for result field
atomdetails table is not enough.
Updated 'results' column type to LONGTEXT in mysql backend case.
PosgreSQL seems not to be affected as postgres text type is not
having length limitation.
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: I4e44e3288ae49d85c5b5ce8ff26ba83f3b9d2c7b
Closes-bug: #1838015
|
| |
|
|
|
|
|
|
| |
python3.0 has deprecated LOG.warn
https://docs.python.org/3/library/logging.html#logging.warning
Closes-Bug: #1650843
Change-Id: Ib8473cbdb84547f385e619fe08ed723b1ee7bcdb
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
Instead of implementing a similar version to what the
upgrade function does, just use it directly instead.
Change-Id: I61a3c9f09c6e0724f2b55951989171ef4aaafe0c
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 868dd8485456ce78a396b687ec7744dc365f06be added a
migration script that caused there to be two heads (starting
points) of migrations which would cause alembic to be unable
to do the initial schema creation (and upgrade).
So this fixes that by correctly making one head only and
not skipping tests for a database if it can not be
upgraded for whatever reason (which was silencing the
test failures).
Closes-bug: #1528683
Change-Id: Id571072eec1dc3b6cbb9e868854f6db0b271e5f8
|
| | |
| |
| |
| | |
Change-Id: Ie01ea85e74f1daed6bfa5158c0faa476d06873ba
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
When a atom is reverted it can be useful to retain the
result of that 'revert' method being called, so that it
can be later analyzed (or used for various purposes) so
adjust the storage, and actions to enable it to be stored.
Change-Id: I38a9a5f3bf7550e924468bb4a86652cb8beb306c
|
| |/
|
|
|
|
|
|
|
|
|
| |
Since this module contains more than the logbook
class and really is a our generic models that are used
to hold the runtime structure it is more appropriate to
place it under a models module and deprecate the usage
of the old module by placing a warning there (so that
when it is imported that warning is triggered).
Change-Id: I79def5ee08f560d38f2c9dcefd0b33becc2a4d36
|
| |
|
|
|
|
|
|
| |
The column updated_at does not update its value after the refactoring
made in 687ec913790653f79badc8f5d656c86792e94271.
Closes-Bug: #1457309
Change-Id: Iff45f386b5dc8efc3fe82ca3b1e961a0c23d7ac7
|
| |
|
|
| |
Change-Id: I25686df6a05bf69a89b9b6be169db72eab89d32a
|
| |
|
|
|
|
|
|
|
|
| |
Instead of having constants for lengths that aren't shared among
the table master schema and the upgrade scripts move the constants
that exist in the schema upgrade scripts (which are used to arrive
at the master schema) to use the same constants the master table
schema module uses.
Change-Id: I312760ee329ebd3161c09b316d55afe129ff2d09
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can just simplify the usage of an sqlalchemy if we just use
(we already have our own ORM like objects anyway) sqlalchemy core
in the first place and have a very tiny layer that converts back and
forth from our very limited object model that we use in our
persistence layer.
This change makes that adjustment, which makes it easier to read
and understand the actions the sqlalchemy backend is doing when
saving, reading and updating data, and avoids yet another layer
that isn't useful for our purposes anyway.
Change-Id: I911c509f65e7845aee86fed1622eaa56970741f2
|
| |
|
|
|
|
|
|
| |
Prefer the non-deprecated 'oslo_serialization' instead of
the namespaced 'oslo.serialization' wherever it was previously
used.
Change-Id: I652cf0b56e28d727c59fe0c060949bb2bd920d11
|
| |
|
|
|
|
|
|
| |
Prefer the non-deprecated 'oslo_utils' instead of
the namespaced 'oslo.utils' wherever it was previously
used.
Change-Id: I9a78150ef5266e1ff22147278162fe3cfe1b2e3f
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The reflection module is now part of oslo.utils so we should
remove our local version and use that version instead; this
also goes for the uuidutils module which is now part of
oslo.utils as well so we no longer need our local version
copied from the incubator...
Note that one reflection method `find_subclasses` which was to
specific to taskflow is now moved to the misc utility module
instead of its prior home in the reflection module.
Change-Id: I069881c80b0b2916cc0c414992b80171f7eeb79f
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Instead of copying modules from the incubator into taskflow
we can now directly use these same modules from supported
libraries instead so this moves the usage of everything except
uuidutils which wasn't moved over to using those newly published
libraries.
Part of blueprint integrate-and-use-oslo-utils-serialization
Change-Id: I1183bda96e1ddb062d9cab91990186f0f56f0a0e
|
| |
|
|
|
|
|
| |
* H305 imports not grouped correctly
* H307 like imports should be grouped together
Change-Id: If1dd9c89f65ede6959865a885777cb08c263eca0
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Convert the various functions that take a task detail into
ones that take atom details (since this is now the generic
type they should take).
- Don't expose the detail type strings as part of the atom
detail api, leave those as private hidden strings and provide
conversion functions from string<->class instead.
- Have the logbook objects contain the following new methods
to reduce the dependence on persistence_utils to do the same.
- to_dict() which converts the current object into a dict
- from_dict() which converts the provided dict into a object
- merge() which merges a incoming objects data with the current
objects
- Have the persistence backends + storage + action engine use these
new methods instead of there current usage.
- Don't compare to logbook.RETRY_DETAIL or logbook.TASK_DETAIL since
python has the isinstance function just use it (ideally we should
fix the code so that this isn't even needed, usage of isinstance
means something is not designed/structured right).
- In storage tests we can't assume that failures will be non-lossy
since under certain backends when a failure is stored information
about the internally held exc_info is lost, so take this into
account when testing by using matches() where applicable.
Change-Id: Ie8a274cfd4cb4e64e87c355dc99d466d74a4e82c
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
According to policy change in HACKING:
http://docs.openstack.org/developer/hacking/#openstack-licensing
empty files should no longer contain copyright notices.
Change-Id: I1f825add9036623ef626b48c66206ac2b452c592
Partial-Bug: #1262424
|
| | |
| |
| |
| | |
Change-Id: Ib0f065b02e053ca6dd176eb8d6a75cf71e0982d0
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add atom intentions: REVERT, EXECUTE, RETRY and IGNORE. Intentions
will be used by action engine to schedule tasks correctly.
Add intention to task detail and extend storage to work with atom
intentions.
Add alembic migration to add intentions column to database.
Change-Id: I79c9bb5f11861658dbfedfd64ef93eb92b29cb2d
|
| |/
|
|
|
|
|
|
| |
- Store AtomType in TaskDetail (TASK_DETAIL or RETRY_DETAIL)
- Extend storage to work with retries
- Add alembic migration for database
Change-Id: I07896d4b79ebe5de33f65e00a3bd32af543a09b4
|
| |
|
|
|
|
|
|
|
| |
Remove line containing
comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4
Change-Id: I7581cc88b8de433d5609ed06c6570b0b45c13573
Closes-Bug:#1229324
|
| |
|
|
|
|
|
|
| |
* Added missing period for doc strings
* Correct syntax errors
* Remove H402 from flake8 ignore list
Change-Id: Ia8592bf99378e3658d6cca2ceb148bf9eb0b5de8
|
| |
|
|
|
|
|
|
|
|
|
| |
Use import of exc instead exception.
Mutability tracking is changed in SQLAlchemy 0.8,
but it seems that sqlalchmy.types.MutableType is not needed
in classes Json and Failure from models.
Closes-bug: 1206669
Change-Id: Ib13c2575ead495b22ed5624e68e044e2f4927201
|
| |
|
|
|
|
|
|
|
|
|
| |
Match the requirements for taskflow with
the openstack requirements (note the upstream
requirements are missing 'futures' and 'networkx')
and update the new hacking violations that were
detected due to the hacking requirement version
bump.
Change-Id: I8d1326cf2a8b1ea062f5e9aacd0c4f8261c6531a
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* save task failures to sqlalchemy backend and restore them
from there;
* for any wrapped exception use common WrappedFailre exception
type, which makes it easier to handle particular exception types;
* several minor improvements.
Affects-db: this change adds db migration that looses exception
information for saved task details.
Change-Id: I575282002e6999646bbf51f492b82a7e3525787a
|
| |
|
|
|
|
|
|
|
|
|
| |
Remove further reference to oslo-incubator database
layer which itself uses oslo.config and remove its
dependencies and resync with oslo-incubator after
applying these changes.
Implements blueprint eliminate-oslo-cfg
Change-Id: Ie1ee7affae75c60833c012c921e50d7b14026101
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of having a pretty restrictive module
based api for saving logbook objects it is much
more friendly and extensible to move toward a more
ceilometer-influenced engine and connection based
storage backend using stevedore to do the backend
loading instead of a custom registration/fetching
mechanism. This allows us to provide a base object
oriented backend api that can be easily inherited
from to allow for customized & pluggable backend
storage modules.
Implements blueprint stevedore-based-backends
Implements blueprint ceilometer-influenced-backends
Change-Id: Ib5868d3d9018b7aa1a3354858dcb90ca1a04055d
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Simplify the exposed api to reduce race conditions
which could occur if we allowed flow details, task
details and log books to be deleted at different
times; reduce this down to just being able to save and
delete from logbooks (and only save/update for flow
and task details to) to reduce the problem cases.
2. Introduce a alembic migration with a proper schema so that
the initial database can be created in the first place,
adjust its exposed fields and relations to be defined
by said schema.
3. Use oslo db models instead of our own.
Change-Id: I78bbedf87d506d3f39157198638937c933235b7b
|
|
|
In order to rework some of the persistence layer I would
like to move around some of the files first, keeping job
specifics in a jobs folder. Having some of the items which
are root level taskflow items (flow, task) be at the root
of the hiearchy. Also for now until the celery work is
commited move that, since it doesn't make sense in backends
anyway.
Change-Id: If6c149710b40f70d4ec69ee8e523defe8f5e766d
|