Skip to content

Commit

Permalink
Disable validation of infrastructure documents in upgrade mode (#3266) (
Browse files Browse the repository at this point in the history
  • Loading branch information
sbbroot authored Oct 10, 2022
1 parent 6cc2eaf commit 8d3db1a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cli/src/commands/Upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def process_input_docs(self) -> ManifestHandler:
input_mhandler.update_docs(doc_merger.run())

# Validate input documents
with SchemaValidator(input_mhandler.docs[0].provider, input_mhandler.docs) as schema_validator:
docs = [doc for doc in input_mhandler.docs if not doc['kind'].startswith('infrastructure')]
with SchemaValidator(input_mhandler.docs[0].provider, docs) as schema_validator:
schema_validator.run()

return input_mhandler
Expand Down
2 changes: 1 addition & 1 deletion cli/src/schema/SchemaValidator.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def validate_document(self, doc, schema):
except Exception as e:
self.logger.error(f'Failed validating: {doc.kind}')
self.logger.error(e)
raise Exception('Schema validation error, see the error above.')
raise Exception('Schema validation error, see the error above.') from e

def run_for_individual_documents(self):
for doc in self.validation_docs:
Expand Down
1 change: 1 addition & 0 deletions docs/changelogs/CHANGELOG-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [#3238](https://github.com/epiphany-platform/epiphany/issues/3238) - Make OpenSearch Dashboards user configurable
- [#3241](https://github.com/epiphany-platform/epiphany/issues/3241) - Simplify APT commands flow in download-requirements.py
- [#3260](https://github.com/epiphany-platform/epiphany/issues/3260) - Remove registry-image doc support in download-requirements.py
- [#3266](https://github.com/epiphany-platform/epiphany/issues/3266) - Disable validation of infrastructure documents in upgrade mode

### Fixed

Expand Down

0 comments on commit 8d3db1a

Please sign in to comment.