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

Test data access code against a live database #1811

Closed
krancour opened this issue Feb 10, 2022 · 4 comments
Closed

Test data access code against a live database #1811

krancour opened this issue Feb 10, 2022 · 4 comments

Comments

@krancour
Copy link
Contributor

krancour commented Feb 10, 2022

⚠️ Important: This issue is currently reserved as a potential Google Summer of Code project. No one should do any work on this without first being formally paired with our project for GSoC'22.

Brigade is composed of many components. Among them, the API server could be considered the platform's brain and central nervous system. The API implements a clean abstraction over underlying services such as our database (MongoDB), our messaging system (Artemis), and our workload execution substrate (Kubernetes). All other Brigade components accomplish most of their work through API calls.

Where integration with the database is concerned, API server code is currently unit-tested against mock implementations of MongoDB client interfaces. These tests have been adequate for asserting that queries and statements are constructed properly (look like we think they should) and that mock query and statement results can be unmarshaled without error into domain types, but this approach cannot assert that DB queries and statement are logically correct and actually achieve the desired results, since a live database would be required to accomplish that. We do also have a suite of integration tests that run against a live instance of Brigade (database and all), but they are closer to end-to-end tests, so they do not isolate data access code. They may detect issues from time to time, but they're a poor way of pinpointing the root cause.

Given the importance of the data access code, we would like to develop a new suite of integration tests directly targeted at that code. These new tests should run against a live (and disposable) MongoDB database and assert that all queries and statements achieve the desired results. If the new suite of tests exposes bugs in the existing data access code, correcting those bugs is within the scope of this project as well.

No significant prior knowledge of Brigade or its codebase is required to work on this issue since the work is highly localized to a few discrete packages. The successful candidate will have strong Go and git skills and at least a working knowledge of Docker, since containers are likely the easiest way to quickly stand up and tear down a disposable test database. Prior knowledge of MongoDB would be an asset, but it is entirely possible that a successful candidate will be able to learn MongoDB as they go.

The expected outcome of this GSoC project is the new test suite merged into Brigade's main branch and fully integrated into our CI/CD processes.

This is estimated to be a low difficulty project that a qualified candidate can complete with roughly 175 hours of effort.

@krancour krancour pinned this issue Feb 16, 2022
@brigadecore brigadecore deleted a comment from attreyee-muk Feb 28, 2022
@brigadecore brigadecore deleted a comment from attreyee-muk Feb 28, 2022
@brigadecore brigadecore deleted a comment from attreyee-muk Feb 28, 2022
@brigadecore brigadecore deleted a comment from attreyee-muk Feb 28, 2022
@brigadecore brigadecore deleted a comment from attreyee-muk Feb 28, 2022
@meetguogengli
Copy link

Hey, @krancour I would like to contribute to this issue since GSOC is approaching and the CNCF is one of the orgs I want to apply for. Can you please help me get started so that I can get familiar with the codebase and other things about the project

@krancour
Copy link
Contributor Author

krancour commented Apr 8, 2022

@meetguogengli please find me on the Kubernetes slack if you've got specific questions.

@meetguogengli
Copy link

Hi @krancour, I just added you on slack. Can you see my message?

@krancour
Copy link
Contributor Author

This has not been selected as a GSOC project, so I am going to decompose this epic-sized issue into much smaller ones and then close this one.

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

No branches or pull requests

2 participants