-
Notifications
You must be signed in to change notification settings - Fork 673
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
Test and use rules to components mapping #10693
Commits on Jun 13, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 766503d - Browse repository at this point
Copy the full SHA 766503dView commit details -
If a rule isn't part of any component, the build will fail. The enforcement will be efficient for the `linux_os` benchmark.
Configuration menu - View commit details
-
Copy full SHA for 4ef6a60 - Browse repository at this point
Copy the full SHA 4ef6a60View commit details -
Add a simple test for component consistency
Also introduces a `ssg.components` module to the project which can be used later in other tools and build system to work with component files data. This commit adds a simple test case `test_components.py` which tests that - components don't map to rules that don't exist - all rules are mapped to at least 1 component - the rule is assigned to component according to templates or template parameters
Configuration menu - View commit details
-
Copy full SHA for 2dacfff - Browse repository at this point
Copy the full SHA 2dacfffView commit details -
Add test for component based on platforms
This test checks if a rule is mapped to component if it uses a package platform or other platforms that can be easily used to determine to which component the rule should belong to.
Configuration menu - View commit details
-
Copy full SHA for 06c2448 - Browse repository at this point
Copy the full SHA 06c2448View commit details -
Configuration menu - View commit details
-
Copy full SHA for 699a453 - Browse repository at this point
Copy the full SHA 699a453View commit details -
Configuration menu - View commit details
-
Copy full SHA for e2fcfbe - Browse repository at this point
Copy the full SHA e2fcfbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5569fc7 - Browse repository at this point
Copy the full SHA 5569fc7View commit details -
This commit extracts method `__process_rule` to reduce the code complexity of the original method, as suggested by CodeClimate.
Configuration menu - View commit details
-
Copy full SHA for 32aa53b - Browse repository at this point
Copy the full SHA 32aa53bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 06726fb - Browse repository at this point
Copy the full SHA 06726fbView commit details -
Reduce complexity of main function
This aims to address the CodeClimate code complexity problem in the `main()`.
Configuration menu - View commit details
-
Copy full SHA for 1487959 - Browse repository at this point
Copy the full SHA 1487959View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c21ea0 - Browse repository at this point
Copy the full SHA 1c21ea0View commit details -
CodeClimate emits a warning if there is too many return statements in a single function.
Configuration menu - View commit details
-
Copy full SHA for caeb48d - Browse repository at this point
Copy the full SHA caeb48dView commit details -
Use ssg.components module in _load_components
This change reduces code duplication.
Configuration menu - View commit details
-
Copy full SHA for f442dd4 - Browse repository at this point
Copy the full SHA f442dd4View commit details -
Allow products to specify the components directory
Products can decide to use components or they can define their own set of components. Products specify a path to the directory with component files by the `components_root` key in the `product.yml`. This allows products like OCP to use components.
Configuration menu - View commit details
-
Copy full SHA for a13ed04 - Browse repository at this point
Copy the full SHA a13ed04View commit details -
Extract function get_rule_to_components_mapping and move it to the ssg.components module in order to simplify the BuildLoader class.
Configuration menu - View commit details
-
Copy full SHA for 3a0b1eb - Browse repository at this point
Copy the full SHA 3a0b1ebView commit details -
Simplify function test_platform
The reason is to avoid code duplication.
Configuration menu - View commit details
-
Copy full SHA for a6c8c87 - Browse repository at this point
Copy the full SHA a6c8c87View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6211e68 - Browse repository at this point
Copy the full SHA 6211e68View commit details -
Configuration menu - View commit details
-
Copy full SHA for aef1955 - Browse repository at this point
Copy the full SHA aef1955View commit details -
Configuration menu - View commit details
-
Copy full SHA for daa860f - Browse repository at this point
Copy the full SHA daa860fView commit details -
Add components to resolved rules
This change will add the mapping of a rule to component to the resolved rules. Developers that build the content will be able to see all components that the given rule is assigned to in the resolved rule yamls.
Configuration menu - View commit details
-
Copy full SHA for 4c97b55 - Browse repository at this point
Copy the full SHA 4c97b55View commit details -
This will prevent everyone from running the script without its parameters.
Configuration menu - View commit details
-
Copy full SHA for 9649fc9 - Browse repository at this point
Copy the full SHA 9649fc9View commit details -
Create template testing plugins
This will allow developers to add additional tests for component mapping when a component assignement will be depending on the template used in the rule.
Configuration menu - View commit details
-
Copy full SHA for 052e0c1 - Browse repository at this point
Copy the full SHA 052e0c1View commit details -
If this this behavior cannot be overridden using the world "must" or "shall" would be better. This applies to all the reasons in this file.
Configuration menu - View commit details
-
Copy full SHA for c7fbf85 - Browse repository at this point
Copy the full SHA c7fbf85View commit details -
Addressing: loader.process_directory_tree(subdir) File "/__w/content/content/ssg/build_yaml.py", line 1265, in process_directory_tree self._load_group_process_and_recurse(start_dir) File "/__w/content/content/ssg/build_yaml.py", line 1259, in _load_group_process_and_recurse self._process_rules() File "/__w/content/content/ssg/build_yaml.py", line 1383, in _process_rules if not self._process_rule(rule): File "/__w/content/content/ssg/build_yaml.py", line 1372, in _process_rule rule.components = self.rule_to_components[rule.id_] TypeError: 'NoneType' object has no attribute '__getitem__'
Configuration menu - View commit details
-
Copy full SHA for f424f0d - Browse repository at this point
Copy the full SHA f424f0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0156763 - Browse repository at this point
Copy the full SHA 0156763View commit details -
Avoid code duplication in ssg/components.py. The mapping functions are similar, they differ only in attribute and the type of the dicitionary values. By unifying the code into a single private function we can avoid this duplication.
Configuration menu - View commit details
-
Copy full SHA for 4cdee0c - Browse repository at this point
Copy the full SHA 4cdee0cView commit details
Commits on Jun 14, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 5d20bde - Browse repository at this point
Copy the full SHA 5d20bdeView commit details