-
Notifications
You must be signed in to change notification settings - Fork 171
Add logging for canary auto generation and refactor canarySettings #1078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| self._plugin = load_plugin(raw_settings["language"]) | ||
| self.settings = raw_settings.get("settings", {}) | ||
| self.canary_settings = raw_settings.get("canarySettings", {}) | ||
| if raw_settings.get("canarySettings", False) is False: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A has_canary_settings was added here to avoid having canary_settings being either an object or boolean.
| ) | ||
| bootstrap_file = stack_template_root / CANARY_DEPENDENCY_FILE_NAME | ||
| if dependencies_file.exists(): | ||
| LOG.debug("Writing: %s", bootstrap_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logs for writing files are set at debug level. this is consistent with other write operations in this file.
| return | ||
| LOG.info("Starting Canary Auto-Generation...") | ||
| if self.file_generation_enabled and self.canary_settings == {}: | ||
| LOG.warning( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this log is set at warning level to make the user aware of empty settings resulting in default generation.
Issue #, if available:
Description of changes:
file_generation_enabledfromcanarySettings. If the canarySettings field is provided with an empty object, canaries will be generated withcontract_test_file_names: [input1.json]default. If canarySettings are removed from .rpdk-config, no canary generation will occur.canarySettingsare provided but emptyinfolevel for skipping, starting, and finishing canary autogenerationdebuglevel for loading contract test inputs and writing canary file outputs.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.