diff --git a/bin/generate_labels.py b/bin/generate_labels.py index 7a950a87..72b2cc3f 100644 --- a/bin/generate_labels.py +++ b/bin/generate_labels.py @@ -41,7 +41,9 @@ class GithubAPI: "containers": "containers", "iaas:gcp": "cloud", "iaas:aws": "cloud", - "iaas:azure": "cloud" + "iaas:azure": "cloud", + "office-365": "cloud", + "google-workspace":"cloud" } maintainers = { @@ -52,7 +54,9 @@ class GithubAPI: "iaas:gcp": ["patel-bhavin"], "iaas:aws": ["patel-bhavin"], "iaas:azure": ["patel-bhavin"], - "azure-ad": ["patel-bhavin"] + "azure-ad": ["patel-bhavin"], + "google-workspace": ["patel-bhavin"], + "office-365": ["patel-bhavin"] } def __init__(self, token): diff --git a/bin/validate/validate.py b/bin/validate/validate.py index cae209ac..72c8a6f9 100644 --- a/bin/validate/validate.py +++ b/bin/validate/validate.py @@ -64,9 +64,11 @@ class Validator: executor = t.get("executor", {}) deps = t.get("dependencies", []) - commands = [executor.get("command"), executor.get("cleanup_command"), executor.get("steps")] - commands += [d.get("get_prereq_command") for d in deps] - commands += [d.get("prereq_command") for d in deps] + if executor: + commands = [executor.get("command"), executor.get("cleanup_command"), executor.get("steps")] + if deps: + commands += [d.get("get_prereq_command") for d in deps] + commands += [d.get("prereq_command") for d in deps] commands = filter(lambda x: x is not None, commands) if not any([variable in c for c in commands]): @@ -107,13 +109,16 @@ class Validator: if isinstance(error, BaseError): print(f"\n\t{error}\n") elif isinstance(error, ValidationError): - if (context := error.context) and len(context) > 0: - print("\n\tIt failed because of one of the following reasons:") - messages = '\n\t\t'.join([c.message for c in context]) - print(f"\n\t\t{messages}") + if "auto_generated_guid" in error.json_path: + print(f"\n\tGUIDs are auto generated. You can remove {error.json_path}\n") else: - print(f"\n\t{error}\n") - print(f"\nThe JSON Path is {error.json_path}") + if (context := error.context) and len(context) > 0: + print("\n\tIt failed because of one of the following reasons:") + messages = '\n\t\t'.join([c.message for c in context]) + print(f"\n\t\t{messages}") + else: + print(f"\n\t{error}\n") + print(f"\nThe JSON Path is {error.json_path}\n") else: print(f"\n\t{error}\n")