Commit Graph

768 Commits

Author SHA1 Message Date
Ghanshyam Mann b94abb44d9 Fix tox4 error and use python >=3.8
tox.ini started failing with tox4 which had some
incompatible changes. One of them is to allow
external command to run by adding them into allowlist_externals
and make passenv in new lines.

Fixing tox.ini for tox4 changes.

Minimal python version is now 3.8

Other minor fixes:
* Use devstack-alt-member in tests instead of devstack-alt, as
  the later is having admin role now.
* Fix some of the functional tests not working anymore with the
  latest mistral changes.
* Removing standard actions tests as they are not standard anymore (they
  are in mistral-extra)

Change-Id: Ic0620135c286855dd4befb52eb55522b605eb863
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
2023-01-20 01:02:46 +01:00
OpenStack Release Bot b1e94317ad Update master for stable/zed
Add file to the reno documentation build to show release notes for
stable/zed.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.

Sem-Ver: feature
Change-Id: I81c50e407ea8a742efc3a0999fd989c8d0c82be6
2022-09-23 16:27:17 +00:00
OpenStack Release Bot 8b9f313e3b Update master for stable/yoga
Add file to the reno documentation build to show release notes for
stable/yoga.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/yoga.

Sem-Ver: feature
Change-Id: I1d2680785ace0ba50ec17de3e37ea304edcb06bc
2022-03-04 17:18:38 +00:00
Zuul 608ec45cef Merge "Allow enforcing usage of "raw" definitions" 2021-08-04 00:31:41 +00:00
Takashi Kajinami ab54cb9ae5 Allow enforcing usage of "raw" definitions
Since the chage 72a6bc1ad1 was merged,
mistralclient tries to determine if the value passed in is a definition
file path name or file URI, or the actual definition.
However this behavior causes problem when the client is used in server
side and results in allowing access to server files or any contents
in internal servers.

This change introduces the new enforce_raw_definitions variable to
disable that fallback behavior and ensure that client treats input
as raw contents.

Related-Bug: #1931558
Change-Id: I47931bdf8bbccb940d4c98c47f16a6eef27c026a
2021-07-16 01:02:19 +09:00
Zuul 609f4f48a9 Merge "[community goal] Update contributor documentation" 2021-07-15 04:28:26 +00:00
Ghanshyam Mann ffa67c1e64 [community goal] Update contributor documentation
This patch updates/adds the contributor documentation to follow
the guidelines of the Ussuri cycle community goal[1].

[1] https://governance.openstack.org/tc/goals/selected/ussuri/project-ptl-and-contrib-docs.html

Story: #2007236
Task: #38537
Change-Id: I01c5a3a5def5baa215413cea25fc5fda41fea2b6
2021-05-31 20:33:28 +00:00
James Slagle 18fff747b5 Remove tripleo job from mistralclient
TripleO no longer depends on Mistral for deployment as of Wallaby. We
can remove the TripleO CI coverage for mistralclient.

Signed-off-by: James Slagle <jslagle@redhat.com>
Change-Id: Ia31f9dbf540e6a8aea35fdfd0bd0bbad166127e3
2021-05-06 11:34:56 -04:00
zhangboye dba9c08593 Use py3 as the default runtime for tox
Moving on py3 as the default runtime for tox to avoid to update
this at each new cycle.

Change-Id: Iad3d93fdd779704e1cd99ff947994a32ba9240d1
2021-04-20 16:05:23 +08:00
OpenStack Release Bot 87e3a7bd2c Add Python3 xena unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for xena.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I84a6e2ced7031b54cbbea0ffcd82961bc3ce3383
2021-03-19 18:09:42 +00:00
OpenStack Release Bot f1e217ab93 Update master for stable/wallaby
Add file to the reno documentation build to show release notes for
stable/wallaby.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/wallaby.

Sem-Ver: feature
Change-Id: I5281b365b0316291f92d70d50f75c29ed00af9ba
2021-03-19 18:09:38 +00:00
wu.shiming 63e20bff29 Drop lower-constraints job
Lower-constraints is not a requirement of the OpenStack Python PTI
[0] and there currently is a discussion on the mailing list [1]
about dropping the test, with the oslo team already having done
so [2].

The new dependency resolver in pip fails due to incompatible
dependency versions in our lower-constraints file, meaning that
we were never providing any real guarantees with it.

To unblock the CI, I am disabling lower-constraints job for now,
with the option to reenable it in case we fix the constraints,
and based on the outcome of the mailing list discussions and
consensus.

[0]. https://governance.openstack.org/tc/reference/pti/python.html
[1]. http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019672.html
[2]. http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019659.html

Change-Id: Icb16bad2fc18abe1d9a783d25e844a8c02a3f321
2021-01-15 17:18:48 +08:00
zhangboye 20a10f0fb5 remove unicode from code
Change-Id: Iaaf58b009ea6abea1e7fb32cd87c6aac6e18ac85
2021-01-03 17:07:20 +08:00
wu.shiming 0b2fa40318 Update TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
-https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file
This allows to use lower-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

Change-Id: I0912f7a3007b9b870712fdb74679008de9984328
2020-12-10 06:45:47 +00:00
Renat Akhmerov 577308f785 Add unit tests for dynamic actions CLI commands
Change-Id: Ibb53ce70d425497ed45d478b03cfe4aaef13ce00
2020-12-09 15:26:56 +07:00
Renat Akhmerov d82a040de1 Add unit tests for code sources CLI commands
Change-Id: Ie0bf4c056291631d4b5e12910cbc1bbb918d4ad2
2020-12-09 15:26:56 +07:00
Renat Akhmerov fc6f779b26 Add support for code sources and dynamic actions
* Adjust low-constraints.txt to fix more rigorous dependency check
  introduced in pip 20.3.0
  (http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019285.html)

Depends-On: Ib5a53f1f1a185f0395ffae1ab0c401633fcdd0fc

Change-Id: I28f5e2e201a0f1a2090ed6aff450f22a4fe846fe
2020-12-09 15:26:44 +07:00
Renat Akhmerov 668712eba2 Fix functional action CLI test
* After the action provider refactoring one CLI test in the client
  fails because, in fact, there was a non-backwards compatible
  change made during the refactoring: we can't use IDs of actions
  to find them anymore. It was a trade-off that we had to agree on
  in order to implement action providers. So the failing tests
  has now been rewritten to work with name istead of ID.

Change-Id: Ic58b7bb5ec6a38df2c2e538f16b24be48e286e8c
2020-12-07 11:34:45 +07:00
wu.shiming 152fc795fa requirements: Drop os-testr
We've switched to stestr.

Change-Id: Ic0abc92c2457ed23d91a03457063005d6cec5c83
2020-09-22 12:07:11 +08:00
wu.shiming 4f1aee33ac Remove install unnecessary packages
The docs and releasenotes requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.

Change-Id: I1e08629fff320bf80475661eec22aec9d9affec2
2020-09-14 14:03:02 +08:00
OpenStack Release Bot 3632e1a200 Add Python3 wallaby unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for wallaby.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I8d41dd4f1fa6aca777f042aa406bb78a3591cc17
2020-09-11 14:18:02 +00:00
OpenStack Release Bot c2b74347ba Update master for stable/victoria
Add file to the reno documentation build to show release notes for
stable/victoria.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.

Change-Id: I7d96327a19b829f80900674418509bfb613c7f11
Sem-Ver: feature
2020-09-11 14:18:00 +00:00
Ghanshyam Mann 471e37df02 [goal] Migrate testing to ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Fixing:
- bug#1886298
Bump the lower constraints for required deps which added python3.8 support
in their later version.

Story: #2007865
Task: #40196

Closes-Bug: #1886298

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal>

Change-Id: I643f1f2d97b10cd8b878ea632ef57fcafeb229bf
2020-09-05 16:50:28 +00:00
Hervé Beraud f77c1d23fb drop mock from lower-constraints
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we don't need it
in lower-constraints.

These changes will help us to drop `mock` from openstack/requirements

Change-Id: Idbbcf7dadd3019dd79e50aace55f308cde1eed2e
2020-06-09 11:57:42 +02:00
Andreas Jaeger 4da655bbbd Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Set openstackdocs_auto_version to not auto-version the documents.
Set openstackdocs_auto_name to use 'project' as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

Depends-On: https://review.opendev.org/729744
Change-Id: I5ddb26cadb0b7db435c385271b36c6538830a142
2020-05-20 21:53:26 +02:00
Zuul b092ae861b Merge "Remove all usage of six library" 2020-05-13 07:04:59 +00:00
Ghanshyam Mann d316d57ab7 Fix hacking min version to 3.0.1
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.

Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.

To avoid similar gate break in future, we need to bump the hacking min
version.

- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html

Change-Id: Ifa4d40fdfb026dd93e990a226d3c77e1ad292af5
2020-05-12 19:33:38 -05:00
jacky06 880c952e49 Remove all usage of six library
Convert all code to not require six library and instead
use python 3.x logic.

Change-Id: Ifbf5a9beb79f46940bf4e7647a0b6fda99a187fc
2020-05-12 16:10:18 +08:00
ali 72a72eb31c added support statistics only for report execution API
-added statistics-only option for `execution-get-report`
  command, which will only return statistics of an execution.

 -modified "print_statistics":
  *in case of statistics-only,there is no need to print execution
   tree.
  *print a new field "estimated time".

Implements: blueprint mistral-executions-report-return-statistics-only
Depends-on: I7038d6d2a48f9f0455545f6be8dce33a48b25e1c
Change-Id: I77f9120ea1f1d4469772f67be334921fe4f7862f
Signed-off-by: ali <ali.abdelal@nokia.com>
2020-05-06 06:39:57 +00:00
Zuul fed6cd7716 Merge "Bump default tox env from py37 to py38" 2020-04-27 05:27:16 +00:00
Sean McGinnis b43202c893
Bump default tox env from py37 to py38
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.

This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.

Change-Id: I815832f2766531b9c32bd006bbabc2c96cd11b42
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:55 -05:00
Sean McGinnis 8afece2666
Add py38 package metadata
Now that we are running the Victoria tests that include a
voting py38, we can now add the Python 3.8 metadata to the
package information to reflect that support.

Change-Id: I8a804bd00975ce3f4a47351c3e19263b5b6fc652
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 08:23:17 -05:00
Sean McGinnis c72fd3c32f
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Ia6c5910a2e37d5f53e194f4cefdf57dae4dde5b2
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 11:58:46 -05:00
OpenStack Release Bot b7a5ad13e0 Add Python3 victoria unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for victoria.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I7ef1e598cfa2651eab668ae672201d2873c1090a
2020-04-13 11:24:41 +00:00
OpenStack Release Bot baf70ecb4b Update master for stable/ussuri
Add file to the reno documentation build to show release notes for
stable/ussuri.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.

Change-Id: I91f2519403d90397434d04b1be03a04608f00118
Sem-Ver: feature
2020-04-11 18:44:55 +00:00
Zuul 0f09c1e8cb Merge "Cleanup py27 support" 2020-04-07 08:57:30 +00:00
ali 67560c9ee7 fixed compatibility issues between mistral and client
removed the namespace field from the action formatter to fix
compatibility issues between the client and older versions
of mistral.

now the action-list command takes the namespace
(with --namespace) as an argument and returns a list of the
actions in that namespace.

the command without --namespace would return the actions
of the default namespace ''.

fixed issues with execution-list command, the field "nulls"
is removed if its empty

Change-Id: Ibf64ff8d841ea1192b410902589b0c690b0b2fca
Signed-off-by: ali <ali.abdelal@nokia.com>
2020-04-05 13:50:19 +00:00
Andreas Jaeger 1037400faa Cleanup py27 support
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Update classifiers
- Update requirements, no need for python_version anymore
- Remove html_last_updated_fmt from conf.py, this is not needed with
  openstackdocstheme anymore

Change-Id: I5d63389fbc4588700e09b06db85b52e7aab4a219
2020-04-04 17:00:08 +02:00
Eyal 7acca6deff Fix preinstalled workflows tests
The 'std' prefix was removed from the workflow name
make sure it passes on both cases.

Change-Id: I072fad4bf88cb078a0ae9d911c6ed06764f66036
2020-02-27 08:24:59 +02:00
Renat Akhmerov dc827496ad Add "duration" to task executions printed by CLI commands
* Added "started_at" and "finished_at" to task executions' printout.
* Added "duration" to task executions that's calculated as a delta
  between "finished_at" and "started_at".
* Removed "updated_at" from task executions printout since it doesn't
  carry any relevant info for a user, "finished_at" makes more sense.

Change-Id: Ie0bd01135548bc9fb5137368a1933d7b8b3c11e5
2020-02-10 12:05:46 +07:00
Renat Akhmerov 084b6d57ce Add "duration" to workflow executions printed by CLI commands
* It's convenient to see duration of an execution right away w/o
  having to calculate it ourselves.
* Minor style changes according to the Mistral Coding Guidelines.

Change-Id: Ibfe806d1f1fcebb9ca0459c82daded308677de44
2020-02-07 16:03:28 +07:00
Alex Schultz 5171cdd63a Create client for interactive shell
The client allows you to run an interactive mode that doesn't exit
between calls and reuses the client which is handy for end users.
Currently the code doesn't actually create a workflow engine client in
the interactive mode so all the mistral actions fail. We should create a
client if the client doesn't pass any args to the shell because that
enters interactive mode.

Change-Id: I8b4c56277f0f172da712f777c4c856dba6fa0b0b
Closes-Bug: #1861357
2020-01-29 16:53:52 -07:00
ali 23270d272a Add new CLI commands for sub-executions new API endpoints
*2 new CLI commands were added:

   - execution-get-sub-executions
       returns the sub-executions of a given execution id

   - task-get-sub-executions
       returns the sub-executions of a given task-execution id

 both commands have the options
  --errors_only: returns only the error routes
               - default is False
  --max_depth: the max depth for the returned executions
             - if a negative value is given, then the API will return
               all sub-executions
             - default is -1

Change-Id: Ifcd25cfdbfb99613ff1bdccf8b94b3929f02a71d
Implements: blueprint mistral-execution-origin
Signed-off-by: ali <ali.abdelal@nokia.com>
2020-01-28 07:14:47 +00:00
ali e1e75d61eb Add namespace support for actions to client
When creating an action-definition user can use the option --namespace
 to create the action in that specific namespace, if it was not provided
 the action will be created in the default namespace.
 default namespace is ''.

 *Added --namespace to action commands,
 *Added --namespace option to run-action

Depends-On: I07862e30adf28404ec70a473571a9213e53d8a08
Implements: blueprint create-and-run-workflows-within-a-namespace

Change-Id: I18dbd9faee06c3cd2209f7e579eeb2e1a24c88d9
2020-01-13 06:56:05 +00:00
Zuul 165a3b3455 Merge "Update hacking and fix warning" 2020-01-09 10:10:46 +00:00
Zuul a5c9fa9b53 Merge "[ussuri][goal] Drop python 2.7 support and testing" 2020-01-09 09:51:55 +00:00
Eyal ad16ffcd61 Update hacking and fix warning
Change-Id: I2e0d84e37bf6522e9b29bd01b6dbd3a8663283ba
2020-01-07 15:09:30 +02:00
Sharat Sharma f5b15b6f6b Add script for unit test coverage job
This patch will allow to run a non voting coverage job
which will detect any changes in the code coverage for
each commit on review.

Change-Id: Ie2bb1b23bb49f0f3b1a149b8e086c2a943f77508
Closes-Bug: 1655016
2020-01-01 13:01:28 +02:00
Ghanshyam Mann 8703da4bdc [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

python-mistralclient is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: Ia2e548105f06dfdd2dbabd425002ea1d4fe57f53
2019-12-15 01:15:05 +00:00
Zuul b1e8bd1943 Merge "fix the mistralclient set endpoint_type invaild" 2019-12-06 19:58:04 +00:00