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

chore: upgrade training-operator 1.8.0 -> 1.9.0 #15

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

DnPlas
Copy link
Contributor

@DnPlas DnPlas commented Feb 4, 2025

This commit bumps the version of golang and the image version to 1.9.0 to match upstream's Dockerfile.

This commit bumps the version of golang and the image version to 1.9.0 to match
upstream's Dockerfile.
Copy link

@mvlassis mvlassis left a comment

Choose a reason for hiding this comment

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

I tried the integration tests from training-operator, and I get an error which doesn't seem related to the upgrade:

--------------------------------------------------------------- live log call ----------------------------------------------------------------
INFO     charmed_kubeflow_chisme.testing.cos_integration:cos_integration.py:229 found relations [<Relation id=1 grafana-agent-k8s:metrics-endpoint training-operator:metrics-endpoint>] for training-operator:metrics-endpoint
INFO     charmed_kubeflow_chisme.testing.cos_integration:cos_integration.py:375 running cmd `relation-get --format=yaml -r 1 --app - training-operator` on unit training-operator/0
INFO     charmed_kubeflow_chisme.testing.cos_integration:cos_integration.py:452 found endpoints: {'training-operator-workload.kubeflow.svc:8080/metrics'}
INFO     charmed_kubeflow_chisme.testing.cos_integration:cos_integration.py:375 running cmd `curl -m 5 -sS localhost:12345/agent/api/v1/metrics/targets` on unit grafana-agent-k8s/0
FAILED
tests/integration/test_charm.py::test_remove_with_resources_present 
--------------------------------------------------------------- live log call ----------------------------------------------------------------
INFO     httpx:_client.py:1038 HTTP Request: GET https://127.0.0.1:16443/apis/apiextensions.k8s.io/v1/customresourcedefinitions?labelSelector=app.juju.is%2Fcreated-by%3Dtraining-operator "HTTP/1.1 200 OK"
PASSED
tests/integration/test_charm.py::test_upgrade SKIPPED (Due to https://github.com/canonical/training-operator/issues/170)
tests/integration/test_charm.py::test_remove_without_resources SKIPPED (Due to https://github.com/canonical/training-operator/issu...)
------------------------------------------------------------- live log teardown --------------------------------------------------------------
INFO     pytest_operator.plugin:plugin.py:903 Model status:

Model     Controller  Cloud/Region      Version  SLA          Timestamp
kubeflow  uk8sx       my-k8s/localhost  3.6.2    unsupported  14:06:21+02:00

App                Version  Status   Scale  Charm              Channel        Rev  Address         Exposed  Message
grafana-agent-k8s  0.40.4   blocked      1  grafana-agent-k8s  latest/stable  103  10.152.183.240  no       Missing incoming ('requires') relation: metrics-endpoint|logging-provider|tracing-provider|grafana-dashboards-consumer

Unit                  Workload  Agent  Address      Ports  Message
grafana-agent-k8s/0*  blocked   idle   10.1.90.152         Missing incoming ('requires') relation: metrics-endpoint|logging-provider|tracing-provider|grafana-dashboards-consumer


INFO     pytest_operator.plugin:plugin.py:909 Juju error logs:


INFO     pytest_operator.plugin:plugin.py:991 Forgetting model main...


================================================================== FAILURES ==================================================================
____________________________________________________________ test_metrics_enpoint ____________________________________________________________
Traceback (most recent call last):
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/_pytest/runner.py", line 341, in from_call
    result: TResult | None = func()
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/_pytest/runner.py", line 242, in <lambda>
    lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pluggy/_callers.py", line 139, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/_pytest/threadexception.py", line 92, in pytest_runtest_call
    yield from thread_exception_runtest_hook()
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/_pytest/threadexception.py", line 68, in thread_exception_runtest_hook
    yield
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/_pytest/unraisableexception.py", line 95, in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/_pytest/unraisableexception.py", line 70, in unraisable_exception_runtest_hook
    yield
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/_pytest/logging.py", line 846, in pytest_runtest_call
    yield from self._runtest_for(item, "call")
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/_pytest/logging.py", line 829, in _runtest_for
    yield
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/_pytest/capture.py", line 880, in pytest_runtest_call
    return (yield)
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/_pytest/skipping.py", line 257, in pytest_runtest_call
    return (yield)
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/_pytest/runner.py", line 174, in pytest_runtest_call
    item.runtest()
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/_pytest/python.py", line 1627, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pluggy/_callers.py", line 182, in _multicall
    return outcome.get_result()
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pluggy/_result.py", line 100, in get_result
    raise exc.with_traceback(exc.__traceback__)
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/_pytest/python.py", line 159, in pytest_pyfunc_call
    result = testfunction(**testargs)
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/pytest_asyncio/plugin.py", line 529, in inner
    _loop.run_until_complete(task)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/home/ubuntu/training-operator/tests/integration/test_charm.py", line 204, in test_metrics_enpoint
    await assert_metrics_endpoint(app, metrics_port=METRICS_PORT, metrics_path=METRICS_PATH)
  File "/home/ubuntu/training-operator/.tox/charm-integration/lib/python3.8/site-packages/charmed_kubeflow_chisme/testing/cos_integration.py", line 463, in assert_metrics_endpoint
    assert target_data["state"] == "up", f"target for {app.name} is not in {target_data['state']}"
AssertionError: target for training-operator is not in down
------------------------------------------------------------- Captured log call --------------------------------------------------------------
INFO     charmed_kubeflow_chisme.testing.cos_integration:cos_integration.py:229 found relations [<Relation id=1 grafana-agent-k8s:metrics-endpoint training-operator:metrics-endpoint>] for training-operator:metrics-endpoint
INFO     charmed_kubeflow_chisme.testing.cos_integration:cos_integration.py:375 running cmd `relation-get --format=yaml -r 1 --app - training-operator` on unit training-operator/0
INFO     charmed_kubeflow_chisme.testing.cos_integration:cos_integration.py:452 found endpoints: {'training-operator-workload.kubeflow.svc:8080/metrics'}
INFO     charmed_kubeflow_chisme.testing.cos_integration:cos_integration.py:375 running cmd `curl -m 5 -sS localhost:12345/agent/api/v1/metrics/targets` on unit grafana-agent-k8s/0
========================================================== short test summary info ===========================================================
FAILED tests/integration/test_charm.py::test_metrics_enpoint - AssertionError: target for training-operator is not in down
============================================= 1 failed, 7 passed, 2 skipped in 727.14s (0:12:07) =============================================
charm-integration: exit 1 (727.84 seconds) /home/ubuntu/training-operator> pytest -v --tb native --asyncio-mode=auto /home/ubuntu/training-operator/tests/integration/test_charm.py --log-cli-level=INFO -s --model kubeflow --keep-models pid=202813
  charm-integration: FAIL code 1 (727.89=setup[0.05]+cmd[727.84] seconds)
  evaluation failed :( (727.95 seconds)

@mvlassis
Copy link

mvlassis commented Feb 6, 2025

Ok I tried to trace the error, which was already present a few months ago as described in canonical/metacontroller-operator#138. Note that this was on a different repo, but I encountered the same issue here. I updated charmed-kubeflow-chisme to 0.4.4 and the tests pass successfully.

I'm approving the changes, but we should probably pin version >=0.4.4 in requirements.in in the training operator repo, maybe in canonical/training-operator#214

@DnPlas DnPlas merged commit bf1ad8d into main Feb 6, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants