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

publish_docs workflow fails to automatically publish docs on release #1968

Closed
NevilleS opened this issue Dec 1, 2022 · 3 comments · Fixed by #1971
Closed

publish_docs workflow fails to automatically publish docs on release #1968

NevilleS opened this issue Dec 1, 2022 · 3 comments · Fixed by #1971
Labels
bug Something isn't working

Comments

@NevilleS
Copy link
Contributor

NevilleS commented Dec 1, 2022

Bug Description

For the last two releases, the automated publish_docs workflow has failed with the error:

ERROR    -  Error reading page 'cli.md': module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

For examples, see https://github.com/ethyca/fides/actions/workflows/publish_docs.yaml?query=event%3Arelease++

Steps to Reproduce

  1. Publish a new release tag

...which is unfortunate, of course! Troubleshooting this will be tricky.

Expected behavior

Should automatically publish new docs!

Screenshots

image

In the detailed traceback, it's actually throwing some errors related to loading some of the fides config code... which we know is getting particularly messy right now:

Traceback (most recent call last):
  File "/home/runner/.local/bin/mkdocs", line 8, in <module>
    sys.exit(cli())
  File "/home/runner/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/runner/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/runner/.local/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/runner/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/runner/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/runner/.local/lib/python3.8/site-packages/mkdocs/__main__.py", line 277, in gh_deploy_command
    build.build(cfg, dirty=not clean)
  File "/home/runner/.local/lib/python3.8/site-packages/mkdocs/commands/build.py", line 308, in build
    _populate_page(file.page, config, files, dirty)
  File "/home/runner/.local/lib/python3.8/site-packages/mkdocs/commands/build.py", line [181](https://github.com/ethyca/fides/actions/runs/3587695073/jobs/6038317063#step:11:182), in _populate_page
    page.render(config, files)
  File "/home/runner/.local/lib/python3.8/site-packages/mkdocs/structure/pages.py", line 270, in render
    self.content = md.convert(self.markdown)
  File "/home/runner/.local/lib/python3.8/site-packages/markdown/core.py", line 261, in convert
    self.lines = prep.run(self.lines)
  File "/home/runner/.local/lib/python3.8/site-packages/mkdocs_click/_extension.py", line 48, in run
    return list(
  File "/home/runner/.local/lib/python3.8/site-packages/mkdocs_click/_processing.py", line 35, in replace_blocks
    yield from replace(**options)
  File "/home/runner/.local/lib/python3.8/site-packages/mkdocs_click/_extension.py", line 52, in <lambda>
    replace=lambda **options: replace_command_docs(has_attr_list=self._has_attr_list, **options),
  File "/home/runner/.local/lib/python3.8/site-packages/mkdocs_click/_extension.py", line 28, in replace_command_docs
    command_obj = load_command(module, command)
  File "/home/runner/.local/lib/python3.8/site-packages/mkdocs_click/_loader.py", line 15, in load_command
    command = _load_obj(module, attribute)
  File "/home/runner/.local/lib/python3.8/site-packages/mkdocs_click/_loader.py", line 25, in _load_obj
    mod = importlib.import_module(module)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line [219](https://github.com/ethyca/fides/actions/runs/3587695073/jobs/6038317063#step:11:220), in _call_with_frames_removed
  File "/home/runner/work/fides/fides/src/fides/__init__.py", line 2, in <module>
    from fides.ctl.core.config import get_config
  File "/home/runner/work/fides/fides/src/fides/ctl/core/config/__init__.py", line 12, in <module>
    from fideslib.core.config import load_toml
  File "/home/runner/.local/lib/python3.8/site-packages/fideslib/core/config.py", line 19, in <module>
    from fideslib.exceptions import MissingConfig
  File "/home/runner/.local/lib/python3.8/site-packages/fideslib/exceptions.py", line 3, in <module>
    from fastapi import HTTPException, status
  File "/home/runner/.local/lib/python3.8/site-packages/fastapi/__init__.py", line 7, in <module>
    from .applications import FastAPI as FastAPI
  File "/home/runner/.local/lib/python3.8/site-packages/fastapi/applications.py", line 15, in <module>
    from fastapi import routing
  File "/home/runner/.local/lib/python3.8/site-packages/fastapi/routing.py", line 23, in <module>
    from fastapi.dependencies.models import Dependant
  File "/home/runner/.local/lib/python3.8/site-packages/fastapi/dependencies/models.py", line 3, in <module>
    from fastapi.security.base import SecurityBase
  File "/home/runner/.local/lib/python3.8/site-packages/fastapi/security/__init__.py", line 1, in <module>
    from .api_key import APIKeyCookie as APIKeyCookie
  File "/home/runner/.local/lib/python3.8/site-packages/fastapi/security/api_key.py", line 3, in <module>
    from fastapi.openapi.models import APIKey, APIKeyIn
  File "/home/runner/.local/lib/python3.8/site-packages/fastapi/openapi/models.py", line 8, in <module>
    import email_validator  # type: ignore
  File "/home/runner/.local/lib/python3.8/site-packages/email_validator/__init__.py", line 6, in <module>
    import dns.resolver
  File "/home/runner/.local/lib/python3.8/site-packages/dns/resolver.py", line 38, in <module>
    import dns.query
  File "/home/runner/.local/lib/python3.8/site-packages/dns/query.py", line 42, in <module>
    import requests
  File "/usr/lib/python3/dist-packages/requests/__init__.py", line 95, in <module>
    from urllib3.contrib import pyopenssl
  File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
    import OpenSSL.SSL
  File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in <module>
    class X509StoreFlags(object):
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
    CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
Error: Process completed with exit code 1.

Environment

This happens only in the GitHub Actions workflow

@NevilleS NevilleS added the bug Something isn't working label Dec 1, 2022
@SteveDMurphy
Copy link
Contributor

@seanpreston something for us to look at maybe 👍🏽

@sanders41
Copy link
Contributor

@SteveDMurphy I'm not sure if this will fix things or not but maybe #1971. I'm thinking maybe 3.10 has a newer openssl version that doesn't have this issue.

@SteveDMurphy
Copy link
Contributor

Thanks @sanders41 ! I'd love to test this out if we can, but it might just have to be seen in the next release... If I get some time I might try and reproduce the issue within the cls repo to see it in action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants