In all honesty, the warnings that were output about unsafe yaml.load
while running unit tests in Shipyard were just kind of annoying.
They always made me think there was a unit test failure for a split
second. This patch set updates yaml.load to yaml.safe_load in the
configdocs helper unit tests. The unit tests themselves are
effectively unchanged, but now there are no warnings returned.
Change-Id: I65a5d55fbe9eb690ad534a5b7df882762bf5a9fb
This PS adds funtionality to Shipyard to validate the existence of
the Pegleg-generated "deployment-version" document (Pegleg change id:
I7919b02d70c9797f689cdad85066d3953b978901) when a user runs create
configdocs. This validation only checks the presence of the document
(by name and schema) and does not care about the document's other
contents.
The severity of a failed validation is configurable through the
"validations" config section in shipyard.conf. The default severity
is "Skip", meaning the validation is not ran at all.
Note that with the default configuration of new validation, Shipyard
functionality should be unchanged.
Change-Id: I754617de81f628a24232e890b12b157ba6731c25
Adds an option to create configdocs as an empty colleciton. This is done
as an explicit flag (--empty-collection) on the command as opposed to
using empty files to prevent accidental emtpy file loads leading to
frustration.
Since this introduced a new flag value for the CLI, the CLIs using flag
values were updated to use the standard is_flag=True instead of the
flag_value=True or some other value when a boolean flag is expected.
Minor updates to CLI tests due to moving to responses 0.10.2
Depends-On: https://review.openstack.org/#/c/614421/
Change-Id: I489b0e1183335cbfbaa2014c1458a84dadf6bb0b
- Adds a query parameter 'cleartext-secrets' to get full raw documents.
- Adds CLI flag to get full raw documents.
Change-Id: If38974c8433c8360cc47ae1273720ad76e87a6fd
The goal of this commit is to reduce the average time spent retrieving
validations from Deckhand. Currently, wait times when committing
configdocs can be significant due to unnecessary API calls. This change
reduces the number of API calls during this process by utilizing the
`/revisions/{{revision_id}}/validations/detail` endpoint exposed by
Deckhand. During testing, this introduced a 71% decrease in cumulative
time for committing configdocs. Note, this commit does not introduce
usage of the official Deckhand client, which will be addressed in a
future change.
Change-Id: I3c86fca6bae1a5a2f74963a87b2198c1705cf3a6
Before this change check_intermidiate_commit return False if revision
has site-action-failure tag only.
Co-Authored-by: Bryan Strassner <bryan.strassner@gmail.com>
Co-Authored-by: Serge Kovaleff <sk607s@att.com>
Change-Id: I8524f599741dab743df9e1a2638b25e04c87da7c
Adds better info to the error returne when retreiving the validations
from another Airship component. Adds tests to cover the success and
failure flows of this same logic
Change-Id: Id7fb389a3905f3e0659d4a7eec0e0658e00f3f28
This is a follow-up patch set for [0] to address the comments
to break up the get_configdocs_status method into smaller
methods.
Also made a minor update to the check_reformat_versions method
based on comments in [0]
[0] https://review.gerrithub.io/#/c/att-comdev/shipyard/+/409839/
Change-Id: Id13fcaa25e48cc2f4267a08db1ccb4561b260197
Adds the validation of the existence of a deployment
configuration and a deployment strategy document to
the checks before submitting a site action for
processing.
Change-Id: I61bf67759bd919dcc31208370cb1be5a777baf54
Allows comparison between Deckhand revisions with valid revision tags,
i.e. buffer, committed, last-site-action and successful-site-action.
This patch set updates the relevant Shipyard API, API client, CLI as
well as document.
Change-Id: Ia9a519d82fe8bf80f89945e678a0b02f6ec43baa
Shipyard retrieval of configdocs and renderedconfigdocs to
support two new revisions, i.e. 'last-site-action' and
'successful-site-action'.
1) --last-site-action for the documents associated with the last
'successful or failed site action
2) --successful-site-action for the documents associated with the
last successful site action
This patch set updates the relevant Shipyard API, API client, CLI
as well as document for the new options.
Change-Id: I60fefa25147ad8e367bc3d1c8d45d4d08a5ee3f1
Refactor Shipyard to be better able to leverage common
packages and conform with the target UCP standard layout.
This change supports the same tox entrypoints at
the root level, but the preferred approach is to use make
targets defined in the Makefile such as 'make tests' and
'make lint'
The previous tox.ini has moved and been
tailored to the specifics of each subproject at
src/bin/*/tox.ini
Autotmatic generation of the policy and configuration
files has been removed from the sphinx build for now
but these files will be automatically generated locally
into the docs source by using a 'make docs' command.
This may need to be revisited later to re-enable the
automatic generation of these files such that readthedocs
would still support the project layout.
Change-Id: Ifdc1cd4cf35fb3c5923414c677b781a60a9bae42