esunar / test4

GNU General Public License v3.0
0 stars 0 forks source link

Unclear and inexplicable linting error "found undefined alias 'operations-openstack-mandatory-release'". #187

Open esunar opened 1 year ago

esunar commented 1 year ago

Running juju lint on an Openstack model (status) json output, outputs the following error message: $ juju-lint -c /snap/juju-lint/current/contrib/openstack-focal-ovn.yaml \ -t openstack \ ./tests/juju-lint/juju-status-openstack.json \

tests/juju-lint/openstack-$(date +%Y%m%d-%H%M).txt 2>&1

$ cat openstack-20220919-1254.txt

Traceback (most recent call last):
File "/snap/juju-lint/62/bin/juju-lint", line 8, in
sys.exit(main())
File "/snap/juju-lint/current/lib/python3.8/site-packages/jujulint/cli.py", line 193, in main
cli.audit_file(cli.manual_file, cloud_type=cli.cloud_type)
File "/snap/juju-lint/current/lib/python3.8/site-packages/jujulint/cli.py", line 124, in audit_file
linter.read_rules() File "/snap/juju-lint/current/lib/python3.8/site-packages/jujulint/lint.py", line 126, in read_rules self.lint_rules = self._process_includes_in_rules(raw_rules_txt) File "/snap/juju-lint/current/lib/python3.8/site-packages/jujulint/lint.py", line 1277, in _process_includes_in_rules return yaml.safe_load("\n".join(collector)) File "/snap/juju-lint/current/lib/python3.8/site-packages/yaml/init.py", line 125, in safe_load return load(stream, SafeLoader) File "/snap/juju-lint/current/lib/python3.8/site-packages/yaml/init.py", line 81, in load return loader.get_single_data() File "/snap/juju-lint/current/lib/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data node = self.get_single_node() File "/snap/juju-lint/current/lib/python3.8/site-packages/yaml/composer.py", line 36, in get_single_node document = self.compose_document() File "/snap/juju-lint/current/lib/python3.8/site-packages/yaml/composer.py", line 55, in compose_document node = self.compose_node(None, None) File "/snap/juju-lint/current/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/snap/juju-lint/current/lib/python3.8/site-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/snap/juju-lint/current/lib/python3.8/site-packages/yaml/composer.py", line 82, in compose_node node = self.compose_sequence_node(anchor) File "/snap/juju-lint/current/lib/python3.8/site-packages/yaml/composer.py", line 111, in compose_sequence_node node.value.append(self.compose_node(node, index)) File "/snap/juju-lint/current/lib/python3.8/site-packages/yaml/composer.py", line 68, in compose_node raise ComposerError(None, None, "found undefined alias %r" yaml.composer.ComposerError: found undefined alias 'operations-openstack-mandatory-release' in "", line 256, column 5:

It's unclear where the alias 'operations-openstack-mandatory-release' is defined as it's not defined in the deployment bundle.


Imported from Launchpad using lp2gh.

esunar commented 1 year ago

(by nicknjihian) subscribed ~field-high

esunar commented 1 year ago

(by billy-olsen) Unsubscribing field-high as this project is not eligible for field sla.

esunar commented 1 year ago

(by gabrielcocenza) Hi, thanks for pointing this issue.

We already fixed this problem in the edge channel and will be on stable on our next release.

We are deprecating those rules and it's indicate to use the "fcb" ones. In your case I guess it's recommend using fcb-ussuri-focal.yaml or fcb-yoga-focal.yaml