Skip to content
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

Fix debian Github action job #7760

Merged
merged 1 commit into from
Oct 18, 2021

Conversation

ggbecker
Copy link
Member

@ggbecker ggbecker commented Oct 18, 2021

Description:

  • Add pyyaml package to pip package list and use a specific version of it that is known to work.

Rationale:

  • Older version of pyyaml can cause the following issue:
Traceback (most recent call last):
  File "/__w/content/content/build-scripts/compile_all.py", line 136, in <module>
    main()
  File "/__w/content/content/build-scripts/compile_all.py", line 132, in main
    save_everything(args.resolved_base, loader, profiles_by_id.values())
  File "/__w/content/content/build-scripts/compile_all.py", line 108, in save_everything
    loader.save_all_entities(base_dir)
  File "/__w/content/content/ssg/build_yaml.py", line 1703, in save_all_entities
    self.save_entities(self.all_rules.values(), destdir)
  File "/__w/content/content/ssg/build_yaml.py", line 1721, in save_entities
    entity.dump_yaml(dest_filename)
  File "/__w/content/content/ssg/build_yaml.py", line 330, in dump_yaml
    yaml.dump(to_dump, f, indent=4, sort_keys=False)
  File "/usr/lib/python3/dist-packages/yaml/__init__.py", line 200, in dump
    return dump_all([data], stream, Dumper=Dumper, **kwds)
TypeError: dump_all() got an unexpected keyword argument 'sort_keys'

Related to #7715 (PR was not up to date with master and the issue went unnoticed)

@mdedonno1337 FYI

@ggbecker ggbecker added the Debian Debian product related. label Oct 18, 2021
@ggbecker ggbecker added this to the 0.1.59 milestone Oct 18, 2021
@ggbecker
Copy link
Member Author

ggbecker commented Oct 18, 2021

@mdedonno1337 this seems to work just fine. I'm merging this (Forgot I cannot self-merge, let's ping someone else). If you don't agree with the fixed version for the pyyaml package we can change it later, but at least we'll keep the job passing now.

@yuumasato @jan-cerny can you guys please merge this one? Thanks

@mdedonno1337
Copy link
Contributor

OK for me.
I will keep an eye on this and try with the version 6.
Thanks!

Copy link
Member

@Mab879 Mab879 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Mab879 Mab879 merged commit b177d47 into ComplianceAsCode:master Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Debian Debian product related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants