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

Juju 3.x Support #608

Merged
merged 26 commits into from
Feb 20, 2024
Merged

Juju 3.x Support #608

merged 26 commits into from
Feb 20, 2024

Commits on Jan 16, 2024

  1. Misc fixes for failing github workflows

    Add separate workflow for testing on Python 3.6 as this
    requires an older Ubuntu release.
    
    Fixup unit tests for compatibility with newer versions of mock.
    
    Drop latest/stable functional test targets - this is actually
    2.9.x of Juju and is already covered by the 2.9 targets and we
    want to avoid suddenly picking up a new Juju version because
    this will break with the new approach to version alignment in the
    Python module for Juju.
    
    Drop 2.8 functional test target - its broken and we don't really
    support this version any longer.
    
    Fixup iptables forwarding issues from LXD containers with a flush
    and re-create of rules.
    
    (cherry picked from commit 9277a94)
    javacruft authored and freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    e45fd7f View commit details
    Browse the repository at this point in the history
  2. pin juju upper constraint to <3.2

    Juju is pinned to <3.0 earlier. This
    patch pins the juju version to <3.2
    so that libjuju 3.1 version is used.
    
    Modified run_on_unit to wait for
    completion and update results based
    on output.
    hemanthnakkina authored and freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    3e7b2a5 View commit details
    Browse the repository at this point in the history
  3. Switch functional testing to Juju 3.1

    Update channel in github workflows to use Juju 3.1.
    
    Drop --no-gui flag usage as this is the default now.
    javacruft authored and freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    1eacbff View commit details
    Browse the repository at this point in the history
  4. Pin Juju < 3.2 for testing

    javacruft authored and freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    496746c View commit details
    Browse the repository at this point in the history
  5. Misc updates for 3.1 compatibility

    Update model configuration default-series to focal.
    
    Drop --classic flag for Juju installation.
    javacruft authored and freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    e7a5c91 View commit details
    Browse the repository at this point in the history
  6. Generate temporary directory under $HOME

    When juju is strictly confined, random temp directories under /tmp
    are not accessible - render any templated bundle files under $HOME
    instead as this should be readable.
    javacruft authored and freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    bb72f5d View commit details
    Browse the repository at this point in the history
  7. Make libjuju an extra dependency.

    python-libjuju is released in lockstep with juju, hence if zaza uses a
    2.9 controller, it should use libjuju-2.9.x, for a 3.1 controller it
    should use libjuju-3.1 and so on.
    
    This change makes libjuju an extra, which means depending on the juju
    controller version will be used the right extra should be passed at
    install time.
    
    For juju-2.9:
    
        pip install zaza[juju-29]
    
    For juju-3.1:
    
        pip install zaza[juju-31]
    freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    5997377 View commit details
    Browse the repository at this point in the history
  8. Add juju-3.2 support

    Summary of changes:
    
    - Add juju-3.2 to the github workflow matrix
    - Add 'juju-32' extra to install juju-3.2.x
    freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    2c03b5e View commit details
    Browse the repository at this point in the history
  9. Move 'extras' to [testenv]

    freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    cab27ec View commit details
    Browse the repository at this point in the history
  10. Set skipsdist to False

    This forces tox to install the zaza python package and honor the
    'extras' defined.
    freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    278c541 View commit details
    Browse the repository at this point in the history
  11. Fix testing matrix

    freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    dcd2264 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    25c5f74 View commit details
    Browse the repository at this point in the history
  13. Depend on 'juju' when no extra is passed.

    By default depend on 'juju' (no pinning), the pinning only comes into
    place when an explicit extra is passed.
    
    This makes the extras effectively nothing more than a pinning alias,
    basically `pip install juju<3.0 zaza` becomes equivalent to `pip install
    zaza[juju-29]`.
    freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    5e138cb View commit details
    Browse the repository at this point in the history
  14. Fix Code becoming integer.

    Value of the Code key in the returned Dict is str in master branch. However
    while trying to get compatible with juju 3.x series it became int. Now it is
    not conforming to the function signature. Also there are usages in some
    tests so it reverted back to str.
    Erhan Sunar authored and freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    5acd3cf View commit details
    Browse the repository at this point in the history
  15. Use _normalise_action_object()

    freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    8b1d54c View commit details
    Browse the repository at this point in the history
  16. Unpin libjuju

    Pinning via constraints is left to downstream consumers.
    freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    e4ccfc2 View commit details
    Browse the repository at this point in the history
  17. Use action_obj.data['status']

    freyes committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    0226e2f View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2024

  1. Move libjuju pinning to a constraints file

    By default libjuju 2.9 will be used, this can overriden by passing the
    PIP_CONSTRAINTS environment variable
    
    Examples:
    
        PIP_CONSTRAINTS=./constraints-juju31.txt tox -e pep8 --recreate
    
    This allows running functional tests with different versions of juju
    freyes committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    de73779 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c42c965 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    28c13b7 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2024

  1. Configuration menu
    Copy the full SHA
    d374a08 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    69ab4fa View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2024

  1. Drop py36 testing from the CI

    The testing runners use Python 3.8 (Focal), hence no need to keep py36
    alive.
    freyes committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    227f3d5 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2024

  1. utilities: Convert juju base into Ubuntu series

    Juju 3.x replaced the `series` status key with a `base` key that
    consists of Distribution type and version number.
    
    To avoid maintenance burden we add a Launchpad module that
    implements functions to look up available Ubuntu series data.
    
    Update the `get_machine_series` helper function to determine
    Ubuntu series from `base` when no `series` key is available.
    
    Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
    fnordahl authored and freyes committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    dfbdbec View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2024

  1. Add constraints-juju-default.txt

    This file aims to hold the default version of juju that it's expected
    charms to be tested with. It helps to serve as a sane default for
    tox.ini
    freyes committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    18c179e View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2024

  1. Run juju-crashdump instead of juju crashdump

    The juju snap can't run programs that are outside the snap due to the
    confinement restrictions
    freyes committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    aec6e76 View commit details
    Browse the repository at this point in the history