canonical / admission-webhook-operator

Admission Webhook Operator
Apache License 2.0
1 stars 4 forks source link

Integration CI "passes" even if charm goes to `Error` #17

Open ca-scribner opened 2 years ago

ca-scribner commented 2 years ago

16 has integration tests that "pass" in github even though they show Error in the logs. It is expected that these tests should fail because the PR enables k8s 1.22 while the workload (still v1.4 at time of running) uses a resource that was deprecated in k8s 1.22.

I think this happens sometimes in other repos as well, possibly in kubeflow dashboards or profiles.

ca-scribner commented 2 years ago

I think this may be caused by both of this bug and this bug

agathanatasha commented 2 years ago

I am quite sure this is a libjuju bug CI run that should had failed: https://github.com/canonical/admission-webhook-operator/runs/7309685046?check_suite_focus=true#step:5:292

steps to reproduce

  1. setup microk8s to use 1.22/stable
  2. deploy admission webhook juju deploy admission-webhook --channel=1.4/stable
  3. start python interpreter
    >>> from juju import jasyncio
    >>> from juju.model import Model
    >>> async def connect_current_model():
    ...     model = Model()
    ...     try:
    ...         # connect to the current model with the current user, per the Juju CLI
    ...         await model.connect()
    ...         print('There are {} applications'.format(len(model.applications)))
    ...         return model
    ...     except:
    ...         print("Failed to connect")
    ... 
    >>> current_model = jasyncio.run(connect_current_model())
    >>> current_model.state.applications['admission-webhook'].status
    'active'
    >>> current_model.state.units['admission-webhook/0'].agent_status
    'idle'
    >>> current_model.state.units['admission-webhook/0'].workload_status
    'active'