Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Implement integration tests for kubernetes #193

Closed
ChrisRousey opened this issue Mar 22, 2023 · 3 comments · Fixed by #211
Closed

Implement integration tests for kubernetes #193

ChrisRousey opened this issue Mar 22, 2023 · 3 comments · Fixed by #211
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ChrisRousey
Copy link
Contributor

As of now, we have unit tests for testing application functionalities. There are some functionalities, that can't be tested through unit tests, since they require a actual underlying kubernetes instance. These tests should:

  • Test the deployment metrics endpoints
  • Test the deployment health endpoints
  • Test the deployment logs endpooints
@HknLof
Copy link
Contributor

HknLof commented Apr 3, 2023

Usage of Quarkus DevServices for non-mockable calls to Kubernetes as mentioned in the PR #178 . E2E Tests with Kubernetes / minikube will be a separate issue.

@HknLof HknLof added this to the 2023.3 milestone Apr 3, 2023
@ChrisRousey ChrisRousey self-assigned this Apr 19, 2023
ChrisRousey added a commit that referenced this issue Apr 20, 2023
-add dev service config
-remove k8 mock servers

refs: #193
@ChrisRousey ChrisRousey linked a pull request Apr 20, 2023 that will close this issue
@ChrisRousey
Copy link
Contributor Author

@HknLof @olis1996
The reason we were having problems with the @Ignore annotation, is because @Ignore is Junit4 specific, with Junit5 Jupiter the annotation is @Disabled. We use Junit5 (Jupiter) throughout our tests and don't actually have the junit4 dependency.
The io.quarkus:quarkus-test-kubernetes-client brought junit4 with it, which is why we didn't notice. Once we removed the dependency in order to enable the Kubernetes Devservices, it broke those tests.

@HknLof
Copy link
Contributor

HknLof commented Apr 26, 2023

Thanks :)

Can we replace @Ignore with @Disable?

HknLof pushed a commit that referenced this issue Apr 27, 2023
* feat(k8-devservice): initial work for devservices

-add dev service config
-remove k8 mock servers

refs: #193

* feat(k8-devservice): removed unneeded dependency

* feat(k8-devservice): add a test for the actual underlying k8 resources

* Revert "Merge branch 'main' into feat/utilize-k8-devservices"

This reverts commit 2064850, reversing
changes made to 6283538.

* Revert "Revert "Merge branch 'main' into feat/utilize-k8-devservices""

This reverts commit 51a87c3.

* fix: fix incorrect merge from main

* fix: fix failing tests after merging from main
olis1996 pushed a commit that referenced this issue Apr 27, 2023
* feat(k8-devservice): initial work for devservices

-add dev service config
-remove k8 mock servers

refs: #193

* feat(k8-devservice): removed unneeded dependency

* feat(k8-devservice): add a test for the actual underlying k8 resources

* Revert "Merge branch 'main' into feat/utilize-k8-devservices"

This reverts commit 2064850, reversing
changes made to 6283538.

* Revert "Revert "Merge branch 'main' into feat/utilize-k8-devservices""

This reverts commit 51a87c3.

* fix: fix incorrect merge from main

* fix: fix failing tests after merging from main
olis1996 added a commit that referenced this issue May 23, 2023
* feat(api/deployment): implemented an endpoint to get the deployment's status

* [work in progress]

* [wip improvements]

* added logging and removed debugging statement

* fix(ui/streams): Align default topic config (#197)

Our control plane uses the following default values when creating Apache
Kafka topics:
- num.partitions = 3
- replication.factor = 1

This commit aligns the displayed default values in the frontend with the
ones that are actually used in the control plane.

* feat(UI): Add config functionality (#189)

* feat(ui): add configs to ui initial commit

refs: #181

* feat(ui): change imports error

refs: #181

* feat(ui): changed config icon

refs: #181

* feat(ui): fixed minor bugs when using configs

refs: #181

* feat(ui): added functionality to newConfig for kind and labels

refs: #181

* feat(ui): add logic for deployment configs

refs: #181

* feat(ui): added stream config options to configs

refs: #181

* feat(ui): added stream SerDe options to configs

refs: #181

* feat(ui): added stream Connection and topic config options to configs

resfs: #181

* feat(ui): update config spec on changes to streams

refs: #181

* feat(ui): set config spec before updating

refs: #181

* fat(ui): fix show config bug

refs: #181

* feat(ui): add ground work for update config

refs: #181

* feat(ui): added configSelectors to create deployment and stream

refs: #181

* feast(ui): remove whitespaces

refs: #181

* feat(ui): added configSelectors to editDeployment

refs: #181

* feat(ui): added configSelectors to editStream

refs: #181

* feat(ui): updated editConfig header

refs: #181

* feat(ui): fixed error 500 when editing streams and deployments

refs: #181

* feat(ui): fixed edit config errors

refs: #181

* feat(ui): minor fixes to new functionalities

refs: #181

* feat(ui): fixed spec nesting bug

refs: #181

* chore(ui): Apply npx prettier

* chore: Capitalize kind

* chore: Move labels above kind

* feat(ui/configs): Rework layouts of config forms

* feat(ui/configs): Introduce navbar to forms

* chore(ui/configs): Change wording of subtitle

* feat(ui/configs): Add config selector for deployments

* feat(ui/configs): Add config selector for streams

* fix: fixed bug where replication factor wasn't set

refs: #181

* fix: add config depth matching to avoid overwriting explicit stream configs

refs: #181

* feat(configs): document depth mapping

refs: #181

* feat(configs): add extra checks to depth config mapping

refs: #181

* feat(configs): fix typos

refs: #181

* feat(configs): fix typos

refs: #181

* fix: run pre-commit

* fix(ui): Align default values with backend

* chore(ui/configs): Correctly initialize kind selectbox

---------

Co-authored-by: Stefan Sprenger <stefan@datacater.io>

* fix(streams): Do not merge configs into streams when updating streams (#200)

* fix(streams): Avoid merging config into streams when updating streams

When updating a stream object using the endpoint `PUT /streams/:uuid`,
we should not merge referenced config objects into the stream object
before persisting it.

* chore: Clean up comment

* chore(streams): Move deep-copy functionality into Stream class

* chore(streams): Fix typo in function name

* chore(streams): Make pre-commit happy

* chore(streams): Deserialize stream spec before serializing it

* chore(streams): Use copied spec

* feature(ui): add deployment replicas to frontend (#198)

* feat(ui): added deployment replicas

* feat(ui): parse replica amount as integer

* feat(ui): rnu prettier

* feat(ui): minor changes to deployment replica fields

* fix(ui/deployments): Allow to set replicas field to 0

* fix(ui/deployments): Get pipelines before deployment

When editing a deployment, perform the API call for loading the
pipelines before performing the API call for loading the deployment, to
make sure that the dropdown box always shows the associated pipeline.

If the call to `/api/v1/pipelines` is performed last, the associated
pipeline is not shown in the dropdown box.

* fix(ui/configs): Allow to set replicas field to 0

---------

Co-authored-by: Stefan Sprenger <stefan@datacater.io>

* Fix: stream config mapping (#199)

* fix(stream-config-mapping): add config mapping to stream inspect

* fix(stream-config-mapping): add stream config mapping to createDeployment

* fix(stream-config-mapping): map stream config during streamDelete

* fix(stream-config-mapping): use hibernate session as parameter to guarantee same thread

* fix(stream-config-mapping): fix session usage

* fix(stream-config-mapping): add updateEntity to deployment

* fix(stream-config-mapping): update deploymentSpec by value not reference

* fix: remap generic exception

* fix: use deployment settings over config definition

* fix(ui/deployments): Remove replicas from payload if field is empty

* fix(ci): Login to Docker Hub

* feat: prep version bump (#202)

* feat: prep version bump

* feat: bump mem for pythonrunner to 150M

* feat: bump versions to 2023.2

* fix: bump appversion as well

* feat: postgres manifest for datacater

* feat: upgrade postgres default ns manifest

* chore(license): Update change date

* feat(ui/deployments): Allow selecting a deployment replica (#204)

* feat(ui/deployments): Allow selecting a deployment replica

We support running deployments with multiple replicas.

This commit adds support for selecting a specific replica when viewing a
deployment.

The UI shows the health/metrics/logs of the selected
replica.

By default, replica 1 is selected.

* chore(ui/deployments): Let user know if no replica is available

* Create SECURITY.md (#208)

Add a security policy to our codebase, which tells users:

* the releases that we support with security-related updates
* how to submit security issues.

* fix(platform-api): Update application version (#207)

* fix(platform-api): Update application version

Update the application version to `2023.2` at locations that still
reference to the prior release (`2023.1`).

* fix(platform-api): Update application version for redpanda manifest

---------

Co-authored-by: ChrisRousey <104754971+ChrisRousey@users.noreply.github.com>

* feature: create root info endpoint (#206)

* feat(info-endpoint): initial draft for info endpoint

refs: #205

* feat(info-endpoint): refactor and added extra fields

refs: #205

* feat(info-endpoint): reworked information shown

refs: #205

* feat(info-endpoint): re-added some information

refs: #205

* feat(info-endpoint): add test and parse urls

refs: #205

* feat(info-endpoint): update github workflows

refs: #205

* feat(info-endpoint): update naming and defaults

refs: #205

* feat(info-endpoint): added extra tests for info endpoint

* ci: fix missing new line character which caused build to break

* build: update Quarkus to most recent version (#209)

refs: #177

* Feat: support yaml payloads (#210)

* feat(yaml-payload): initial commit for yaml payload

* feat(yaml-payload): added yaml format to response

* feat(yaml-payload): annotate effected endpoints to accept yaml payload

refs: #177

* feat(yaml-payload): add tests to all endpoints that allow yml payloads

* chore: run pre-commit

* feat(yaml-payload): add kubernetes test service

* feat(yaml-payload): move k8 test service up 1 layer

* feat(yaml-payload): support returning info endpoint as yaml

* feat(yaml-payload): added info endpoint yaml test

* feat(yaml-payload): add tests for different payload/return type

* PayloadEditor integration for write operations (#191)

* feat: layout for edit payload before sending

* feat: hooked up the layout (ugly) starting to implement logic

* feat: starting glueing everything together including creation of objects

* feat: move payloadeditor in new / edit sections

* chore(ui): Move button for switching to JSON editor

* chore(ui): Style payload editor

* chore: rebase from remote

* feat: register callbacks for handling submits

* feat: use class field instead of useref, version mismatch

* feat: functionality for NewStream complete

* chore: fix comment

* chore: cleansed new stream functionality

* chore: use underscore instead of hyphen

* feat: integrate payload editor in new stream

* chore: get bindings right for functions

* feat: integrate editor in deployment creation

* feat: add newconfig for payload editor

* feat: add config sync for multi-tab form

* fix: some correactions for loading the payload editor

* feat: payload editor integrated into edit stream

* feat: integrate payloadeditor into editdeployment

* feat: payload editor integrated to edit of pipelines

* feat: integrate payload editor into editconifg + prettier

* fix: some early caught obvious bugs

* fix: bugs from pr review

* fix: display error message from api

---------

Co-authored-by: Stefan Sprenger <stefan@datacater.io>

* fix: class to classNames (#212)

* feat: utilize k8 devservices (#211)

* feat(k8-devservice): initial work for devservices

-add dev service config
-remove k8 mock servers

refs: #193

* feat(k8-devservice): removed unneeded dependency

* feat(k8-devservice): add a test for the actual underlying k8 resources

* Revert "Merge branch 'main' into feat/utilize-k8-devservices"

This reverts commit 2064850, reversing
changes made to 6283538.

* Revert "Revert "Merge branch 'main' into feat/utilize-k8-devservices""

This reverts commit 51a87c3.

* fix: fix incorrect merge from main

* fix: fix failing tests after merging from main

* feat(DeploymentEndpoint): added default values to DataCaterDeploymentStatus and removed unnecessary comments

* feat(DeploymentEndpoint): added tests for deployment status endpoint

* chore: random commit to restart github actions

github had a timeout due to downtime

* fix(DeploymentEndpoint): replaced returning null + catching null with unchecked exception on KubernetesClientException

* fix(DeploymentEndpoint): improved exception handling

* fix(DeploymentEndpoint): added comment explaining why we keep deploymentConditions as is

* chore(DeploymentEndpoint): removed duplicate annotation

---------

Co-authored-by: Stefan Sprenger <stefan@datacater.io>
Co-authored-by: Chris <104754971+ChrisRousey@users.noreply.github.com>
Co-authored-by: Hakan Lofcali <HknLof@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants