armada/armada/exceptions/manifest_exceptions.py
anthony.bellino cb57588968 Fix for get manifest
In some use cases, some site level docs are only included in specific
manifests. This is so sites can call out what they want deployed, however
currently Armada is checking for all documents to exist and leads
to an invalid manifest exception.

This PS removes the '.build_charts_deps()' and 'build_chart_groups()' calls
in 'get_manifest()' so that only chart documents, and chart group documents
are built after finding them within 'build_armada_manfiest()' and
'build_chart_group()'. 'build_armada_manifest()' will now throw the
related 'Could not find chart group... exception' for related chart
and chart group issues.  Additional subclass exceptions were added along
with adding traceback to capture the chained exceptions.

Change-Id: Idc8a75b290ac0afb1e177203535b012d589b708f
2018-09-14 15:27:03 +00:00

65 lines
1.9 KiB
Python

# Copyright 2017 The Armada Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from armada.exceptions import base_exception as base
class ManifestException(base.ArmadaBaseException):
"""
An exception occurred while attempting to build an Armada manifest. The
exception will return with details as to why.
**Troubleshoot:**
*Coming Soon*
"""
message = 'An error occurred while generating the manifest: %(details)s.'
class BuildChartException(ManifestException):
"""
An exception occurred while attempting to build the chart for an
Armada manifest. The exception will return with details as to why.
**Troubleshoot:**
*Coming Soon*
"""
message = 'An error occurred while trying to build chart: %(details)s.'
class BuildChartGroupException(ManifestException):
"""
An exception occurred while attempting to build the chart group for an
Armada manifest. The exception will return with details as to why.
**Troubleshoot:**
*Coming Soon*
"""
message = 'An error occurred while building chart group: %(details)s.'
class ChartDependencyException(ManifestException):
"""
An exception occurred while attempting to build a chart dependency for an
Armada manifest. The exception will return with details as to why.
**Troubleshoot:**
*Coming Soon*
"""
message = 'An error occurred while building a dependency chart: ' \
'%(details)s.'