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

reduce duplication of rock image testing code across our repositories #783

Open
ca-scribner opened this issue Dec 6, 2023 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@ca-scribner
Copy link
Contributor

Why it needs to get done

Our reusable rock workflows execute tests to assert our images perform as expected. These are defined in a tox.ini that is put in every rock subdirectory (mlserver-sklearn, mlserver-xgboost). Some of these tests also use near-duplicate python scripts (mlserver-sklearn, mlserver-xgboost).

These files are not easy to read and also largely duplicated - we should think on a more maintainable way to test these rocks

What needs to get done

Research needed to decide the best way forward. Maybe we can refactor the tox.ini file so there's just one per repo? This may take some effort to do for the integration test environment because that env pulls and runs the integration tests of the charm that uses these images.

wrt test_rock.py, that file is nearly duplicated - the only thing that changes in that file is which files we look for in the rock. This could be replaced by a generic script (kept centrally, like in chisme or elsewhere) that accepted a --file path/to/file/in/rock argument

When is the task considered done

Reduced duplication, ideally removing the copy/pasted tox.ini and test_rock.py files

@ca-scribner ca-scribner added the enhancement New feature or request label Dec 6, 2023
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-5121.

This message was autogenerated

@orfeas-k
Copy link
Contributor

This could be tackled in parallel with #785.

@ca-scribner
Copy link
Contributor Author

This is similar to #817

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Labeled
Development

No branches or pull requests

2 participants