Skip to content

Commit 091fb15

Browse files
Tim Lanetilne
authored andcommitted
Continue past validation errors when not deploying
Signed-off-by: Tim Lane <[email protected]>
1 parent 6ab4a03 commit 091fb15

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

util/update_pcluster_configs.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import logging
1616
import os
1717
import re
18+
import traceback
1819
from abc import ABC, abstractmethod
1920
from urllib.request import urlopen
2021

@@ -53,7 +54,16 @@ def validate_document(args, old_doc, new_doc):
5354
logging.info("Found the following new root keys: %s", new_doc.keys() - old_doc.keys())
5455
logging.info("Checking that the new configuration file includes the old entries.")
5556
if not args.skip_validation:
56-
_assert_document_is_included(old_doc, new_doc)
57+
try:
58+
_assert_document_is_included(old_doc, new_doc)
59+
except Exception:
60+
# If this is a dry run, continue so that other validation
61+
# errors may be found.
62+
if not args.deploy:
63+
logging.warning("Document validation error")
64+
traceback.print_exc()
65+
else:
66+
raise
5767
else:
5868
logging.info(
5969
"Specifying skip-validation flag, skipping assertion on differences. "

0 commit comments

Comments
 (0)