Open kloczek opened 2 days ago
We are using extras for optional dependencies. I've added a full so you can do install pip install cfn-lint[full]
This will include all the optional dependencies. Its what we are using to install the packages for our testing.
OK however .. what is the sense adding some dependencies to extras if those dependencies are essential to pass pytest without additional params? 🤔
CloudFormation Lint Version
1.4.2
What operating system are you using?
Linux x86/64
Describe the bug
pytest fails in 6 units
Expected behavior
pytest shuld not fail
Reproduction template
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesinstaller
modulecut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-cfn-lint-1.4.2-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-cfn-lint-1.4.2-2.fc37.x86_64/usr/lib/python3.10/site-packages + /usr/bin/pytest -ra -m 'not network' ============================= test session starts ============================== platform linux -- Python 3.10.14, pytest-8.2.2, pluggy-1.5.0 rootdir: /home/tkloczko/rpmbuild/BUILD/cfn-lint-1.4.2 configfile: pyproject.toml testpaths: test collected 1377 items test/integration/jsonschema/test_cfn_lint_rules.py . [ 0%] test/integration/jsonschema/test_resources_cfn_init.py . [ 0%] test/integration/jsonschema/test_validator_cfn.py ... [ 0%] test/integration/rules/test_rules.py . [ 0%] test/integration/test_data_file_format.py . [ 0%] test/integration/test_directives.py . [ 0%] test/integration/test_formatters.py F. [ 0%] test/integration/test_good_templates.py .. [ 0%] test/integration/test_mandatory_checks.py .. [ 1%] test/integration/test_patches.py . [ 1%] test/integration/test_quickstart_templates.py . [ 1%] test/integration/test_quickstart_templates_non_strict.py .. [ 1%] test/integration/test_schema_files.py ... [ 1%] test/integration/test_transform_ignore.py . [ 1%] test/unit/module/cfn_json/test_cfn_json.py .... [ 1%] test/unit/module/cfn_yaml/test_yaml.py ... [ 2%] test/unit/module/conditions/test_condition.py .... [ 2%] test/unit/module/conditions/test_conditions.py ........... [ 3%] test/unit/module/conditions/test_equals.py .... [ 3%] test/unit/module/config/test_cli_args.py ........... [ 4%] test/unit/module/config/test_config_file_args.py ......... [ 4%] test/unit/module/config/test_config_mixin.py ............. [ 5%] test/unit/module/config/test_logging.py ... [ 6%] test/unit/module/config/test_template_args.py ...... [ 6%] test/unit/module/context/test_conditions.py . [ 6%] test/unit/module/context/test_context.py . [ 6%] test/unit/module/context/test_create_context.py ..... [ 7%] test/unit/module/context/test_mappings.py .... [ 7%] test/unit/module/context/test_parameter.py .............. [ 8%] test/unit/module/context/test_path.py ... [ 8%] test/unit/module/context/test_resource.py ... [ 8%] test/unit/module/context/test_transforms.py ..... [ 9%] test/unit/module/custom_rules/test_custom_rules.py .............. [ 10%] test/unit/module/decode/test_convert_dict.py . [ 10%] test/unit/module/decode/test_decode.py .......... [ 10%] test/unit/module/formatters/test_formatters.py ..FF...F [ 11%] test/unit/module/helpers/test_create_rules.py . [ 11%] test/unit/module/helpers/test_downloads_metadata.py ... [ 11%] test/unit/module/helpers/test_format_json.py . [ 11%] test/unit/module/helpers/test_get_url_content.py ..... [ 12%] test/unit/module/helpers/test_get_url_retrieve.py .. [ 12%] test/unit/module/helpers/test_is_type_compatible.py ......... [ 13%] test/unit/module/helpers/test_load_plugins.py .. [ 13%] test/unit/module/helpers/test_regex_dict.py .... [ 13%] test/unit/module/jsonschema/test_exceptions.py ...... [ 13%] test/unit/module/jsonschema/test_filter.py .... [ 14%] test/unit/module/jsonschema/test_format.py . [ 14%] test/unit/module/jsonschema/test_keywords.py ... [ 14%] test/unit/module/jsonschema/test_keywords_cfn.py .... [ 14%] test/unit/module/jsonschema/test_resolvers_cfn.py ...................... [ 16%] ........................ [ 18%] test/unit/module/jsonschema/test_types.py .. [ 18%] test/unit/module/jsonschema/test_utils.py ... [ 18%] test/unit/module/jsonschema/test_validator.py .......................... [ 20%] ........................................................................ [ 25%] .................................. [ 28%] test/unit/module/jsonschema/test_validator_exceptions.py . [ 28%] test/unit/module/jsonschema/test_validator_resolver.py ... [ 28%] test/unit/module/maintenance/test_update_documentation.py F [ 28%] test/unit/module/maintenance/test_update_iam_policies.py . [ 28%] test/unit/module/override/test_complete.py .. [ 28%] test/unit/module/override/test_exclude.py .. [ 28%] test/unit/module/override/test_include.py . [ 28%] test/unit/module/override/test_required.py .. [ 29%] test/unit/module/rule/test_matching.py .. [ 29%] test/unit/module/rule/test_rule.py ..... [ 29%] test/unit/module/rule/test_rule_child.py ... [ 29%] test/unit/module/rule/test_rules.py ...... [ 30%] test/unit/module/runner/test_cli.py ..... [ 30%] test/unit/module/runner/test_exit_code.py . [ 30%] test/unit/module/runner/test_get_formatter.py ....... [ 31%] test/unit/module/runner/test_rule_configuration.py ... [ 31%] test/unit/module/runner/test_runner.py .. [ 31%] test/unit/module/schema/resolver/test_resolve_cfn_pointer.py . [ 31%] test/unit/module/schema/resolver/test_resolve_from_url.py . [ 31%] test/unit/module/schema/test_manager.py .......... [ 32%] test/unit/module/schema/test_schema.py .. [ 32%] test/unit/module/template/test_getatts.py ..... [ 32%] test/unit/module/template/test_template.py F............................ [ 35%] . [ 35%] test/unit/module/template/transforms/test_language_extensions.py ....... [ 35%] ............... [ 36%] test/unit/module/test_api.py ................ [ 37%] test/unit/module/test_duplicate.py .... [ 38%] test/unit/module/test_null_values.py .. [ 38%] test/unit/module/test_rules_collections.py ................ [ 39%] test/unit/module/test_string_template.py . [ 39%] test/unit/module/transform/test_transform.py ....... [ 40%] test/unit/rules/conditions/test_condition.py ... [ 40%] test/unit/rules/conditions/test_conditions.py . [ 40%] test/unit/rules/conditions/test_equals_is_useful.py ....... [ 40%] test/unit/rules/conditions/test_exists.py ... [ 41%] test/unit/rules/conditions/test_used.py .. [ 41%] test/unit/rules/custom/test_greater_operator.py .. [ 41%] test/unit/rules/custom/test_is_defined.py .. [ 41%] test/unit/rules/custom/test_is_not_defined.py .. [ 41%] test/unit/rules/custom/test_lesser_operator.py .. [ 41%] test/unit/rules/formats/test_format.py ....... [ 42%] test/unit/rules/formats/test_image_id.py ....... [ 42%] test/unit/rules/formats/test_security_group_id.py .... [ 43%] test/unit/rules/formats/test_security_group_name.py ... [ 43%] test/unit/rules/formats/test_vpc_id.py .... [ 43%] test/unit/rules/functions/test_base64.py ..... [ 43%] test/unit/rules/functions/test_basefn.py ... [ 44%] test/unit/rules/functions/test_cidr.py ...... [ 44%] test/unit/rules/functions/test_dynamic_reference.py ............. [ 45%] test/unit/rules/functions/test_dynamic_reference_secrets_manager_path.py . [ 45%] .. [ 45%] test/unit/rules/functions/test_dynamic_reference_secure_string.py .. [ 45%] test/unit/rules/functions/test_dynamic_reference_ssm_path.py ........... [ 46%] [ 46%] test/unit/rules/functions/test_find_in_map.py ........... [ 47%] test/unit/rules/functions/test_for_each.py .. [ 47%] test/unit/rules/functions/test_getatt.py .............. [ 48%] test/unit/rules/functions/test_getatt_format.py ..... [ 49%] test/unit/rules/functions/test_getaz.py .... [ 49%] test/unit/rules/functions/test_if.py ...... [ 49%] test/unit/rules/functions/test_importvalue.py ..... [ 50%] test/unit/rules/functions/test_join.py ......... [ 50%] test/unit/rules/functions/test_length.py ....... [ 51%] test/unit/rules/functions/test_ref.py ....... [ 51%] test/unit/rules/functions/test_relationship_conditions.py .. [ 51%] test/unit/rules/functions/test_select.py ........ [ 52%] test/unit/rules/functions/test_split.py ........ [ 53%] test/unit/rules/functions/test_sub.py .................... [ 54%] test/unit/rules/functions/test_sub_needed.py ... [ 54%] test/unit/rules/functions/test_sub_not_join.py ..... [ 55%] test/unit/rules/functions/test_sub_not_join_cdk.py . [ 55%] test/unit/rules/functions/test_sub_parameters_used.py .. [ 55%] test/unit/rules/functions/test_sub_unneeded.py ... [ 55%] test/unit/rules/functions/test_tojsonstring.py ....... [ 56%] test/unit/rules/jsonschema/test_base.py ... [ 56%] test/unit/rules/jsonschema/test_cfn_lint.py ... [ 56%] test/unit/rules/jsonschema/test_cfn_region_schema.py .. [ 56%] test/unit/rules/jsonschema/test_cfn_schema.py .. [ 56%] test/unit/rules/jsonschema/test_json_schema.py ... [ 57%] test/unit/rules/jsonschema/test_max_properties.py ... [ 57%] test/unit/rules/jsonschema/test_property_names.py ..... [ 57%] test/unit/rules/mappings/test_configuration.py ........ [ 58%] test/unit/rules/mappings/test_used.py .. [ 58%] test/unit/rules/metadata/test_cfn_lint.py .. [ 58%] test/unit/rules/metadata/test_config.py ... [ 58%] test/unit/rules/metadata/test_interface_configuration.py .. [ 58%] test/unit/rules/metadata/test_interface_parameter_exists.py .. [ 58%] test/unit/rules/outputs/test_condition.py ... [ 59%] test/unit/rules/outputs/test_configuration.py ....... [ 59%] test/unit/rules/outputs/test_export.py .... [ 59%] test/unit/rules/outputs/test_importvalue.py ... [ 60%] test/unit/rules/outputs/test_value.py ........ [ 60%] test/unit/rules/parameters/test_allowed_pattern.py . [ 60%] test/unit/rules/parameters/test_allowed_value.py . [ 60%] test/unit/rules/parameters/test_configuration.py ......... [ 61%] test/unit/rules/parameters/test_default.py ... [ 61%] test/unit/rules/parameters/test_dynamic_reference_secret.py .... [ 62%] test/unit/rules/parameters/test_no_echo.py .......... [ 62%] test/unit/rules/parameters/test_used.py ... [ 63%] test/unit/rules/resources/apigateway/test_restapi_openapi.py .... [ 63%] test/unit/rules/resources/backup/test_backup_plan_lifecycle_rule.py .... [ 63%] . [ 63%] test/unit/rules/resources/certificatemanager/test_domainvalidationoptions.py . [ 63%] ...... [ 64%] test/unit/rules/resources/cloudformation/test_nested_stack_parameters.py . [ 64%] . [ 64%] test/unit/rules/resources/cloudfront/test_aliases.py ................... [ 65%] ... [ 65%] test/unit/rules/resources/cloudwatch/test_alarm_aws_namespace_period.py . [ 66%] .... [ 66%] test/unit/rules/resources/codepipeline/test_stageactions.py ...... [ 66%] test/unit/rules/resources/codepipeline/test_stages.py ....... [ 67%] test/unit/rules/resources/dynamodb/test_attribute_mismatch.py .... [ 67%] test/unit/rules/resources/dynamodb/test_table_billingmode_exclusive.py . [ 67%] ... [ 67%] test/unit/rules/resources/dynamodb/test_table_billingmode_provisioned.py . [ 67%] ... [ 68%] test/unit/rules/resources/ec2/test_ebs.py ...... [ 68%] test/unit/rules/resources/ec2/test_rt_association.py .. [ 68%] test/unit/rules/resources/ec2/test_sg_all_to_and_from_ports.py ....... [ 69%] test/unit/rules/resources/ec2/test_sg_protocols_ports_exclusive.py ..... [ 69%] [ 69%] test/unit/rules/resources/ec2/test_sg_protocols_ports_inclusive.py .... [ 69%] test/unit/rules/resources/ecs/test_ecs_fargate.py ..... [ 70%] test/unit/rules/resources/ecs/test_task_definition_essentials.py ...... [ 70%] test/unit/rules/resources/ecs/test_task_definition_log_configuration.py . [ 70%] ... [ 70%] test/unit/rules/resources/elasticache/test_cache_cluster_failover.py .. [ 71%] test/unit/rules/resources/elb/test_certificate.py ... [ 71%] test/unit/rules/resources/elbv2/test_listener_certificate.py ... [ 71%] test/unit/rules/resources/elbv2/test_loadbalancer_application_subnets.py . [ 71%] .... [ 71%] test/unit/rules/resources/events/test_rule_schedule_expression.py ...... [ 72%] ............. [ 73%] test/unit/rules/resources/iam/test_iam_permissions.py ............. [ 74%] test/unit/rules/resources/iam/test_iam_policy_version.py ... [ 74%] test/unit/rules/resources/iam/test_identity_policy.py .... [ 74%] test/unit/rules/resources/iam/test_ref_with_path.py .. [ 74%] test/unit/rules/resources/iam/test_resource_ecr_policy.py . [ 74%] test/unit/rules/resources/iam/test_resource_policy.py ..... [ 75%] test/unit/rules/resources/iam/test_role_arn_pattern.py .... [ 75%] test/unit/rules/resources/lmbd/test_deprecated_runtime_create.py ...... [ 76%] test/unit/rules/resources/lmbd/test_deprecated_runtime_eol.py ...... [ 76%] test/unit/rules/resources/lmbd/test_deprecated_runtime_update.py ..... [ 76%] test/unit/rules/resources/lmbd/test_event_source_mapping_event_source_arn_sqs_exclusive.py . [ 76%] .. [ 77%] test/unit/rules/resources/lmbd/test_event_source_mapping_event_source_arn_stream_inclusive.py . [ 77%] .. [ 77%] test/unit/rules/resources/lmbd/test_events_log_group_name.py .. [ 77%] test/unit/rules/resources/lmbd/test_function_zipfile_runtime_enum.py ... [ 77%] .. [ 77%] test/unit/rules/resources/lmbd/test_function_zipfile_runtime_exists.py . [ 77%] .. [ 77%] test/unit/rules/resources/lmbd/test_snapstart.py .... [ 78%] test/unit/rules/resources/lmbd/test_snapstart_enabled.py .... [ 78%] test/unit/rules/resources/lmbd/test_snapstart_supported.py ........ [ 79%] test/unit/rules/resources/lmbd/test_zip_package_required_properties.py . [ 79%] . [ 79%] test/unit/rules/resources/properties/test_availability_zone.py ......... [ 79%] [ 79%] test/unit/rules/resources/properties/test_availability_zone_cdk.py . [ 80%] test/unit/rules/resources/properties/test_enum.py . [ 80%] test/unit/rules/resources/properties/test_image_id.py ... [ 80%] test/unit/rules/resources/properties/test_number_range.py .... [ 80%] test/unit/rules/resources/properties/test_password.py .. [ 80%] test/unit/rules/resources/properties/test_pattern.py .. [ 80%] test/unit/rules/resources/properties/test_properties.py ... [ 81%] test/unit/rules/resources/properties/test_properties_templated.py .... [ 81%] test/unit/rules/resources/properties/test_read_only.py ...... [ 81%] test/unit/rules/resources/properties/test_string_length.py ............. [ 82%] ......................... [ 84%] test/unit/rules/resources/properties/test_tagging.py ....... [ 85%] test/unit/rules/resources/properties/test_unique_items.py .... [ 85%] test/unit/rules/resources/properties/test_value_primitive_type.py .. [ 85%] test/unit/rules/resources/rds/test_db_cluster_aurora.py .... [ 85%] test/unit/rules/resources/rds/test_db_cluster_engine_version.py ...... [ 86%] test/unit/rules/resources/rds/test_db_cluster_instance_class_enum.py ... [ 86%] .. [ 86%] test/unit/rules/resources/rds/test_db_cluster_monitoring.py ..... [ 87%] test/unit/rules/resources/rds/test_db_cluster_multiaz.py ...... [ 87%] test/unit/rules/resources/rds/test_db_cluster_serverless_exclusive.py .. [ 87%] .... [ 87%] test/unit/rules/resources/rds/test_db_cluster_snapshotidentifier.py ... [ 88%] test/unit/rules/resources/rds/test_db_cluster_sourcedbclusteridentifier.py . [ 88%] .. [ 88%] test/unit/rules/resources/rds/test_db_instance_aurora_exclusive.py ..... [ 88%] .. [ 88%] test/unit/rules/resources/rds/test_db_instance_db_instance_class_enum.py . [ 88%] ......... [ 89%] test/unit/rules/resources/rds/test_db_instance_engine_version.py ....... [ 90%] . [ 90%] test/unit/rules/resources/route53/test_health_check_health_check_config_type_inclusive.py . [ 90%] ... [ 90%] test/unit/rules/resources/route53/test_recordset_alias.py ... [ 90%] test/unit/rules/resources/route53/test_recordset_name.py ....... [ 91%] test/unit/rules/resources/route53/test_recordsets.py .............. [ 92%] test/unit/rules/resources/s3/test_access_control_obsolete.py ... [ 92%] test/unit/rules/resources/s3/test_access_control_ownership.py ....... [ 92%] test/unit/rules/resources/stepfunctions/test_state_machine.py .. [ 93%] test/unit/rules/resources/test_both_update_replace_delete_policy.py .... [ 93%] [ 93%] test/unit/rules/resources/test_cfn_init.py .. [ 93%] test/unit/rules/resources/test_circular_dependency.py .... [ 93%] test/unit/rules/resources/test_condition.py ... [ 93%] test/unit/rules/resources/test_configurations.py . [ 94%] test/unit/rules/resources/test_deletionpolicy.py .... [ 94%] test/unit/rules/resources/test_deletionpolicy_stateful_resources.py .... [ 94%] [ 94%] test/unit/rules/resources/test_dependson.py ........ [ 95%] test/unit/rules/resources/test_dependson_obsolete.py .... [ 95%] test/unit/rules/resources/test_hardcodedarnproperties.py .... [ 95%] test/unit/rules/resources/test_modules.py ..... [ 96%] test/unit/rules/resources/test_previous_generation_instance_type.py .. [ 96%] test/unit/rules/resources/test_primary_identifiers.py .. [ 96%] test/unit/rules/resources/test_retentionperiod.py .... [ 96%] test/unit/rules/resources/test_retentionperiod_rds.py ... [ 96%] test/unit/rules/resources/test_serverless_transform.py .... [ 97%] test/unit/rules/resources/test_type.py ... [ 97%] test/unit/rules/resources/test_unique_names.py .. [ 97%] test/unit/rules/resources/test_updatereplacepolicy.py .... [ 97%] test/unit/rules/resources/updatepolicy/test_configuration.py ....... [ 98%] test/unit/rules/templates/test_base_template.py ...... [ 98%] test/unit/rules/templates/test_description.py .. [ 98%] test/unit/rules/templates/test_limitsize_description.py ...... [ 99%] test/unit/rules/templates/test_limitsize_description_approaching.py .. [ 99%] test/unit/rules/templates/test_limitsize_template.py .. [ 99%] test/unit/rules/templates/test_yaml_template.py . [ 99%] test/unit/rules/test_base_json_schema.py ... [100%] =================================== FAILURES =================================== __________________________ TestFormatters.test_junit ___________________________ self =List of installed modules in build env:
```console Package Version ------------------------- ----------- annotated-types 0.7.0 attrs 23.2.0 aws-sam-translator 1.89.0 boto3 1.34.136 botocore 1.34.136 build 1.2.1 defusedxml 0.7.1 distro 1.9.0 exceptiongroup 1.1.3 importlib_metadata 8.0.0 iniconfig 2.0.0 installer 0.7.0 jmespath 1.0.1 jsonpatch 1.33 jsonpointer 2.4 jsonschema 4.20.0 jsonschema-specifications 2023.12.1 mpmath 1.3.0 networkx 3.3 packaging 24.0 pluggy 1.5.0 pydantic 2.7.4 pydantic_core 2.18.4 pyproject_hooks 1.0.0 pytest 8.2.2 python-dateutil 2.9.0.post0 PyYAML 6.0.1 referencing 0.32.0 regex 2024.5.15 rpds-py 0.18.1 s3transfer 0.10.2 setuptools 69.4.0 sympy 1.12.1 tokenize_rt 5.2.0 tomli 2.0.1 typing_extensions 4.12.2 urllib3 2.2.2 wheel 0.43.0 zipp 3.19.2 ```Please let me know if you need more details or want me to perform some diagnostics.