Tf-example-usage#75
Draft
EspenAlbert wants to merge 53 commits into
Draft
Conversation
…ation - Added abstract base class ColorCoderABC for defining node creation and naming. - Implemented ColorCoderSimple to provide specific color coding for resource types. - Updated write_graph function to accept output directory instead of path. - Enhanced tf_resource_usage to generate and save example graph using the new color coder.
- Introduced abstract base class ColorCoderABC to standardize node creation and naming. - Updated ColorCoder to inherit from ColorCoderABC. - Modified write_graph function to support multiple output formats. - Adjusted tf_resource_usage to utilize the new write_graph functionality for saving example graphs.
- Introduced module_grouping_dir method in TfExtSettings for dynamic path generation. - Enhanced SimpleGraph class with methods to add root nodes and retrieve all nodes. - Updated to_dot_graph method for improved graph representation in tf_resource_usage. - Integrated module grouping command in the Typer application.
- Introduced is_default_set property in TFVar class to check if default value is set. - Updated parse_atlas_schema_from_settings function to streamline schema caching logic. - Added provider_cache_file_path method in TfExtSettings for better cache file management. - Implemented ResolvedListVar class to handle list-type variables in variable resolution. - Enhanced resolve_vars method to support list variable resolution and improved error handling for missing variables. - Updated tests to include scenarios for reading list variables.
- Introduced SkipEdgeReason enum to manage edge skipping logic. - Updated ModuleConfig2 to validate force edges and include additional edge handling methods. - Enhanced create_module_graph function to utilize new edge skipping logic. - Improved module_tree function to support color coding for resource types. - Refactored tf_module_grouping to integrate updated module configuration and graph generation logic.
- Introduced provider_name and resource_name functions for extracting provider and resource names from resource types. - Enhanced TfExtSettings with provider_base_repo_path and resource_markdown_path properties for improved path management. - Updated tf_resource_usage to gather example usage and generate resource markdown with full examples option. - Added Provider enum and related functions for managing provider URLs and documentation paths.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #75 +/- ##
==========================================
- Coverage 52.61% 52.18% -0.43%
==========================================
Files 97 103 +6
Lines 10952 12356 +1404
Branches 1383 1562 +179
==========================================
+ Hits 5762 6448 +686
- Misses 5006 5688 +682
- Partials 184 220 +36 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…dd corresponding tests
… hint for color_coder in add_unused_nodes_to_graph
…n_tf_configs for better error handling and support the --destroy-after-apply flag
…pdate tests accordingly
- Refactored all imports of ask_shell in the atlas-init repo to use the correct public submodules (ask_shell.shell, ask_shell.console, ask_shell.ask, etc.) - Fixed all import errors for run_and_wait, new_task, and related symbols - Validated by running the full test suite; all import errors resolved
…nd skip due to terminal issue
…related function calls - Refactored all instances of ask_shell imports to utilize the correct public submodules (ask_shell.shell, ask_shell.console, ask_shell.ask, etc.). - Updated function calls to align with the new import structure, ensuring compatibility with the public API. - Validated changes by running the full test suite; all tests passed successfully.
…nary and update related calls - Modified validate_tf_workspace to include a new parameter for specifying the Terraform binary. - Updated calls to validate_tf_workspace in tf_ws to pass the appropriate binary string based on the run configuration. - Refactored shell command calls to use the updated public API for better consistency.
…mports - Deleted the local implementation of markdown_table_lines from go_test_summary.py. - Updated gen_readme.py to import markdown_table_lines from zero_3rdparty.str_utils instead of the local definition. - Cleaned up unused type variable T in go_test_summary.py.
…compatibility - Replaced instances of asyncio.shell.run with asyncio.run in ci_tests.py and go_test_summary.py to align with the updated asyncio API. - Ensured that the changes maintain the functionality of collecting test rows and generating reports.
…onment - Updated the test_detail_md function in go_test_summary.py to group test results by environment, enhancing the clarity of the output. - Added environment-specific sections for error tables and timelines, improving the overall structure of the test summary report.
- Introduced a new property in TestRow to calculate pass rates considering known failures. - Updated ErrorRowColumns to include a new column for "Pass Rate Known Failure". - Enhanced the as_row method to display relevant pass rates based on known failures, improving the test summary report's detail and accuracy.
…raph parameters - Added a field validator to TfExtSettings to handle empty string values for repo_path_atlas_provider and tf_cli_config_file. - Updated the tf_dep_graph function to accept new parameters for repo_path and tf_cli_config_file, improving flexibility in configuration. - Adjusted the instantiation of TfExtSettings to utilize the new parameters, ensuring proper settings retrieval.
The pass_rates, pass_rates_known_failure properties and as_row method were incorrectly using all environment runs as the denominator while only counting passes from the current environment in the numerator.
…ogs_test_data.py and test_go_sdk.py - Removed unnecessary whitespace in debug_logs_test_data.py for better code clarity. - Reformatted the API path assignment in test_go_sdk.py to enhance readability by breaking it into multiple lines.
- Updated the MongoDB Atlas provider version in the Terraform lock file from `1.37.0` to `2.4.0`, ensuring compatibility with the latest features and fixes.
- Replaced occurrences of `utc_datetime` and `utc_datetime_ms` with `UtcDatetime` and `UtcDatetimeMs` in `go_test_run.py` and `go_test_tf_error.py` to ensure consistent usage of the updated datetime types across the codebase.
…the codebase - Replaced `parse_payload` with `parse.parse_payload` in multiple files to standardize the usage of the parsing function. - Updated various instances of `dump` to use `dump.dump_as_str` for consistent serialization across the codebase. - Adjusted imports from `model_lib` to reflect the new structure, enhancing code clarity and maintainability.
- Adjusted imports from `model_lib` to reflect the new structure, replacing `parse_model` and `parse_payload` with their respective imports from `model_lib.serialize`. - Modified parsing methods in `cfn_parameter_finder.py` and `mongo_utils.py` for consistency and clarity. - Updated the `add_to_clipboard` function in `run.py` to use `subprocess.run` instead of `subprocess.shell.run` for improved security and compatibility.
- Introduced tests for deregistering and deactivating alert configurations in AWS. - Added a new API call function with error handling and logging for better traceability. - Implemented environment variable checks for API key retrieval to ensure secure access.
- Changed the assignment of spec_path to check for an empty Path object instead of a falsy value. - Updated the parsing method in parse_codegen_config to use allow_duplicate_anchors for improved YAML handling.
…e const, and known missing ops
…er handling - Introduced a new function to extract path parameters from OpenAPI specifications. - Updated the `extract_endpoint_attributes` function to utilize the new path parameter extraction logic. - Adjusted tests to verify correct handling of path parameters in API endpoint attributes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.