-
Notifications
You must be signed in to change notification settings - Fork 4
Feature/create deployment status endpoint #203
Conversation
Go with
No this is not sufficient. This might change with K8s versions, leading to non-stable API's for our users. Fabric8 upgrades lead to model changes if needed by the supported Kubernetes version.
An interesting test would be testing the payload. Especially, what is returned, if no replicas are created yet?
Not sure what the manual test are from my current reading the following issue is present. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good progress 👍🏼 I left some comments with opinionated approaches that should help with the failing test
platform-api/src/main/java/io/datacater/core/deployment/DeploymentEndpoint.java
Outdated
Show resolved
Hide resolved
platform-api/src/main/java/io/datacater/core/deployment/K8Deployment.java
Outdated
Show resolved
Hide resolved
platform-api/src/test/java/io/datacater/core/deployment/DatacaterDeploymentEndpointTest.java
Outdated
Show resolved
Hide resolved
Using the datacater web ui I create a deployment and copy its UUID. In the SwaggerUI I send a GET request to the deployments/{uuid}/status using the copied UUID. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this issue :)
In general, this looks good to me. I left two small comments that should be addressed before merging the PR into main
.
platform-api/src/main/java/io/datacater/core/deployment/DeploymentEndpoint.java
Outdated
Show resolved
Hide resolved
platform-api/src/main/java/io/datacater/core/deployment/DataCaterDeploymentStatus.java
Outdated
Show resolved
Hide resolved
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 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>
…#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
* 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): 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
* 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
* 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
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 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>
* 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
Kudos, SonarCloud Quality Gate passed! |
…Status and removed unnecessary comments
I removed the commented out code + TODO comments, implemented tests for the status endpoint and added default values for the deployment status as follows: additionalProperties = {}, Please let me know what you think, especially about the implementation of the default values with optionals. Is that a good approach? |
Kudos, SonarCloud Quality Gate passed! |
github had a timeout due to downtime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on ths PR, thank you. I do have two small comments though that i didn't see yesterday since the PR was a bit cluttered before you updated from main.
platform-api/src/main/java/io/datacater/core/deployment/DeploymentEndpoint.java
Outdated
Show resolved
Hide resolved
platform-api/src/main/java/io/datacater/core/deployment/DataCaterDeploymentStatus.java
Show resolved
Hide resolved
… unchecked exception on KubernetesClientException
Thanks, the PR looks good. The last bit would be to have an DataCater internal representation for |
platform-api/src/main/java/io/datacater/core/deployment/K8Deployment.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the great work! I like it a lot. I left one comment, which you might want to address before merging the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing this over the finish line!
platform-api/src/main/java/io/datacater/core/deployment/DeploymentEndpoint.java
Outdated
Show resolved
Hide resolved
1aac0fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for resolving the minor issue, let's merge this into main! :)
Kudos, SonarCloud Quality Gate passed! |
An API endpoint has been implemented to get a deployment's status in kubernetes.
I have a few remaining questions regarding the implementation:
deployments/by-name/{deploymentName}/status
, since quarkus would not be able to differentiate it fromdeployments/{uuid}/status
without theby-name
part. Would that implementation be okay or is there a better way that I don't see right now?io.fabric8.kubernetes.api.model.apps.DeploymentStatus
sufficient as "consistent internal representation across different k8s versions"?testGetDeploymentStatusByValidUuid()
test does not pass and I don't understand why. InsidetestCreateDeployment()
a deployment is created. That deployment's uuid is being used to GET it in the next testtestGetDeployment()
. But for a reason I don't understand thetestGetDeploymentStatusByValidUuid()
returns a 404 although manual tests work just fine