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

Bug #1990144 reported by Nicholas Njihia
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juju Lint
Fix Released
Medium
Gabriel Cocenza

Bug Description

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 <module>
    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 "<unicode string>", line 256, column 5:
      - *operations-openstack-mandatory- ...

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

Related branches

Revision history for this message
Nicholas Njihia (nicknjihian) wrote :

subscribed ~field-high

Revision history for this message
Billy Olsen (billy-olsen) wrote :

Unsubscribing field-high as this project is not eligible for field sla.

Revision history for this message
Gabriel Cocenza (gabrielcocenza) wrote :

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

Changed in juju-lint:
status: New → Fix Committed
milestone: none → 1.0.4
assignee: nobody → Gabriel Angelo Sgarbi Cocenza (gabrielcocenza)
importance: Undecided → Medium
Changed in juju-lint:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.