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

CI: failed to run katib-controller integration tests #119

Closed
NohaIhab opened this issue Aug 17, 2023 · 2 comments · Fixed by #120
Closed

CI: failed to run katib-controller integration tests #119

NohaIhab opened this issue Aug 17, 2023 · 2 comments · Fixed by #120
Labels
bug Something isn't working

Comments

@NohaIhab
Copy link
Contributor

logs:

Run sg microk8s -c "tox -e controller-integration"
  sg microk8s -c "tox -e controller-integration"
  shell: /usr/bin/bash -e {0}
  env:
    CONTROLLER_NAME: github-pr-e977c-microk8s
ROOT: HandledError| provided environments not found in configuration file: ['controller-integration']

came up in this run

@NohaIhab NohaIhab added the bug Something isn't working label Aug 17, 2023
@phoevos
Copy link
Contributor

phoevos commented Aug 17, 2023

So it looks like this run uses the latest tox 4.9.0 released yesterday. The release introduces the following change:

Disallow command line environments which are not explicitly specified in the config file

This breaks our CI, which attempts to use the controller-integration testenv:

sg microk8s -c "tox -e ${{ matrix.charm }}-integration"

controller-integration is not included in the envlist, however, but rather katib-controller-integration is:

envlist = fmt, lint, unit, integration, {katib-controller,katib-db-manager}-{lint,unit,integration}

Previously, this would not matter, since explicitly specifying the environment would bypass the envlist and the proper command would be set here (pattern matching works properly because both "controller" and "integration" are in the provided environment name):

katib-operators/tox.ini

Lines 19 to 26 in a9c7609

controller: CHARM = controller
db-manager: CHARM = db-manager
ui: CHARM = ui
unit: TYPE = unit
lint: TYPE = lint
integration: TYPE = integration
commands =
tox -c charms/katib-{env:CHARM} -e {env:TYPE}

Solution

Following the latest tox release we will have to provide the correct environment name (i.e. katib-controller-integration) in the charm matrix (this should have always been the case, really):

matrix:
charm:
- controller

@phoevos
Copy link
Contributor

phoevos commented Aug 17, 2023

Note, we will have to check whether other parts of this or other repositories are potentially affected by this change.


EDIT: Following a quick search around Github, it doesn't look like any of our other repos are affected, since we usually don't include the app prefix (e.g. katib) in the tox envlist.

phoevos added a commit that referenced this issue Aug 17, 2023
Provide the full tox environment name (i.e.
`katib-controller-integration`) when running the controller integration
tests through the CI to ensure the workflow works with the latest tox
release (i.e. 4.9.0).

Closes #119

Signed-off-by: Phoevos Kalemkeris <[email protected]>
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.

2 participants