Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

enhance: strip k8s scheduling details from app objects #2460

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

njhale
Copy link
Member

@njhale njhale commented Jan 25, 2024

Hide k8s scheduling details from end-users by removing the
scheduling status field from the Apps API. The scheduling status field
of AppInstances is preserved as an internal implementation detail.

Addresses #2457 for runtime.

@njhale njhale marked this pull request as draft January 25, 2024 19:40
@njhale njhale force-pushed the enhance-strip-scheduling-field branch 3 times, most recently from 928608c to ccf37c2 Compare January 26, 2024 04:34
@njhale njhale marked this pull request as ready for review January 26, 2024 04:36
@njhale njhale marked this pull request as draft January 29, 2024 14:38
@njhale njhale force-pushed the enhance-strip-scheduling-field branch 7 times, most recently from c88c8bd to 72bf177 Compare January 30, 2024 03:12
@njhale njhale marked this pull request as ready for review January 30, 2024 03:12
Copy link
Contributor

@keyallis keyallis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of comments about non functional changes to comments but otherwise LGTM, test failure seem to be unrelated

Comment on lines +76 to +53
// AppToAppInstance converts an App to a [v1.AppInstance] and returns the result.
func AppToAppInstance(in *App) *v1.AppInstance {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth mentioning in the comment on this function that it drops some fields, or maybe explicitly name them

Comment on lines +32 to +34
// Ensure that AppInstanceStatus fields not surfaced by AppStatus are preserved.
// Note: This is necessary because obj has been translated from an apiv1.App before being passed to this method,
// and since the AppStatus is a subset of the AppInstanceStatus, the App
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like maybe this comment got cut short

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, I'll update.

pkg/apis/api.acorn.io/v1/app.go Outdated Show resolved Hide resolved
pkg/cli/run_test.go Outdated Show resolved Hide resolved
@njhale njhale force-pushed the enhance-strip-scheduling-field branch 3 times, most recently from 4d94148 to 3e8237f Compare January 30, 2024 19:13
Hide k8s scheduling details from end-users by removing the
scheduling status field from the `Apps` API. The scheduling status field
of `AppInstances` is preserved as an internal implementation detail.

Signed-off-by: Nick Hale <[email protected]>
@njhale njhale force-pushed the enhance-strip-scheduling-field branch from 3e8237f to fc7939c Compare January 30, 2024 19:21
@njhale njhale requested a review from thedadams January 30, 2024 19:28
@njhale njhale merged commit e0bfed6 into acorn-io:main Jan 30, 2024
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants