From 82581d205aa1c3f5320007238b09457d13aee1ad Mon Sep 17 00:00:00 2001 From: Felipe Monteiro Date: Thu, 16 Aug 2018 22:28:54 +0100 Subject: [PATCH] Rollback to revision 0 instead of clearing Deckhand DB Now that Deckhand supports rolling back to revision 0 with https://review.openstack.org/#/c/592725/ it is preferrable to exercise this functionality instead of deleting all revisions in Deckhand's database, so that previous revision history isn't lost. Deckhand is fast-forwarded to 0b5aa2e98a1ab5ab8a58c9dec3c1f88ef00d17a9 which contains the commit required for SY to be able to make use of this new change in Deckhand's client, as well as to align with Promenade's Deckhand fast-forward of Deckhand in https://review.openstack.org/#/c/604459/ Depends-On: https://review.openstack.org/#/c/592725/ Change-Id: Iebbfeb5e6c74b3e2f09b2137ec14482cc8fa4f44 --- images/airflow/requirements.txt | 3 +-- src/bin/shipyard_airflow/requirements.txt | 3 ++- .../control/helpers/configdocs_helper.py | 10 ++++------ src/bin/shipyard_airflow/test-requirements.txt | 5 ----- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/images/airflow/requirements.txt b/images/airflow/requirements.txt index 23fa3deb..57299038 100644 --- a/images/airflow/requirements.txt +++ b/images/airflow/requirements.txt @@ -23,7 +23,6 @@ python-openstackclient==3.16.1 kubernetes>=6.0.0 # Dependencies for other UCP components -git+https://git.openstack.org/openstack/airship-deckhand@d1701774266069dda6eab9e70c7851da7e97919a#egg=deckhand +git+https://git.openstack.org/openstack/airship-deckhand@0b5aa2e98a1ab5ab8a58c9dec3c1f88ef00d17a9#egg=deckhand git+https://git.openstack.org/openstack/airship-drydock.git@b1d24ad254c04cdbb4dc4e06f2bfe92c266aad70#egg=drydock_provisioner&subdirectory=python git+https://git.openstack.org/openstack/airship-armada.git@90618f549c1f6d7741b11dc5c4898f3c6d536895#egg=armada - diff --git a/src/bin/shipyard_airflow/requirements.txt b/src/bin/shipyard_airflow/requirements.txt index 1cc3d9ff..0d108909 100644 --- a/src/bin/shipyard_airflow/requirements.txt +++ b/src/bin/shipyard_airflow/requirements.txt @@ -36,5 +36,6 @@ ulid==1.1 uwsgi==2.0.17 # Dependencies for other UCP components -git+https://git.openstack.org/openstack/airship-deckhand@d1701774266069dda6eab9e70c7851da7e97919a#egg=deckhand +git+https://git.openstack.org/openstack/airship-deckhand@0b5aa2e98a1ab5ab8a58c9dec3c1f88ef00d17a9#egg=deckhand git+https://git.openstack.org/openstack/airship-drydock.git@b1d24ad254c04cdbb4dc4e06f2bfe92c266aad70#egg=drydock_provisioner&subdirectory=python +git+https://git.openstack.org/openstack/airship-armada.git@90618f549c1f6d7741b11dc5c4898f3c6d536895#egg=armada diff --git a/src/bin/shipyard_airflow/shipyard_airflow/control/helpers/configdocs_helper.py b/src/bin/shipyard_airflow/shipyard_airflow/control/helpers/configdocs_helper.py index 4998288c..df6850a3 100644 --- a/src/bin/shipyard_airflow/shipyard_airflow/control/helpers/configdocs_helper.py +++ b/src/bin/shipyard_airflow/shipyard_airflow/control/helpers/configdocs_helper.py @@ -156,12 +156,10 @@ class ConfigdocsHelper(object): if committed_rev: committed_rev_id = committed_rev['id'] if committed_rev_id is None: - # TODO (bryan-strassner) use rollback to 0 if/when that - # is implemented in deckhand. - # reset_to_empty has side effect of deleting history - # from deckhand although it is only the corner case - # where no commit has ever been done. - self.deckhand.reset_to_empty() + # Simulate rolling back to a blank revision history, which + # creates an empty revision with no documents, while still + # retaining the previous revision history. + self.deckhand.rollback(0) else: self.deckhand.rollback(committed_rev_id) return True diff --git a/src/bin/shipyard_airflow/test-requirements.txt b/src/bin/shipyard_airflow/test-requirements.txt index 3d2e6400..0e8884d6 100644 --- a/src/bin/shipyard_airflow/test-requirements.txt +++ b/src/bin/shipyard_airflow/test-requirements.txt @@ -5,15 +5,10 @@ responses==0.8.1 testfixtures==5.1.1 apache-airflow[crypto,celery,postgres,hive,hdfs,jdbc]==1.10.0 -# Testing - Client libraries for UCP components -git+https://git.openstack.org/openstack/airship-deckhand@d1701774266069dda6eab9e70c7851da7e97919a#egg=deckhand -git+https://git.openstack.org/openstack/airship-drydock.git@b1d24ad254c04cdbb4dc4e06f2bfe92c266aad70#egg=drydock_provisioner&subdirectory=python -git+https://git.openstack.org/openstack/airship-armada.git@90618f549c1f6d7741b11dc5c4898f3c6d536895#egg=armada # TODO(bryan-strassner) Pin to version for airflow when added to the # requirements.txt in the airflow images directory git+https://git.openstack.org/openstack/airship-promenade.git@master#egg=promenade - # Linting flake8==3.3.0