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

ROX-21070: Add fleetshard addon installation status to private api #1503

Merged
merged 5 commits into from
Dec 19, 2023

Conversation

kovayur
Copy link
Contributor

@kovayur kovayur commented Nov 23, 2023

Description

Install addon from Fleet Manager: Part 1.
This change adds a new field called Addons to the Cluster object to track the actual state of addon installations on the data plane.
This change includes:

  1. DB migration
  2. Private API change
  3. Conversion layer from the Private API to DB.
  4. Integration tests

Checklist (Definition of Done)

  • Unit and integration tests added
  • Added test description under Test manual
  • Documentation added if necessary (i.e. changes to dev setup, test execution, ...)
  • CI and all relevant tests are passing
  • Add the ticket number to the PR title if available, i.e. ROX-12345: ...
  • Discussed security and business related topics privately. Will move any security and business related topics that arise to private communication channel.
  • Add secret to app-interface Vault or Secrets Manager if necessary
  • RDS changes were e2e tested manually
  • Check AWS limits are reasonable for changes provisioning new resources

Test manual

Integration + E2E tests

@kovayur kovayur force-pushed the yury/addon-cicd-01-private-api branch from a52b417 to 57b97b7 Compare November 27, 2023 19:07
@kovayur kovayur force-pushed the yury/addon-cicd-01-private-api branch from 57b97b7 to 193174d Compare November 29, 2023 11:16
Copy link
Collaborator

@ebensh ebensh left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the cleanups as well

@@ -61,7 +59,7 @@ func (d *dataPlaneClusterService) GetDataPlaneClusterConfig(ctx context.Context,
}

// UpdateDataPlaneClusterStatus ...
func (d *dataPlaneClusterService) UpdateDataPlaneClusterStatus(ctx context.Context, clusterID string, status *dbapi.DataPlaneClusterStatus) *errors.ServiceError {
func (d *dataPlaneClusterService) UpdateDataPlaneClusterStatus(clusterID string, status dbapi.DataPlaneClusterStatus) *errors.ServiceError {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was surprised to see that ctx could just be removed here - digging down it looks like the clusterService in clusters.go doesn't use gorm's support for context (https://gorm.io/docs/context.html), so piping it down doesn't make sense. But do you know, is there a reason why there's no use of the context down at the database level? Is that best practice to not try to interrupt database calls with context / maybe there's some bad interaction between them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with your point @ebensh, but the scope of refactoring could be large, it looks like context is not used in clusters.go at all. I've created ROX-21492 to follow-up

@openshift-ci openshift-ci bot added the lgtm label Dec 18, 2023
Copy link
Contributor

openshift-ci bot commented Dec 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ebensh, kovayur

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kovayur kovayur merged commit 1596437 into main Dec 19, 2023
10 of 15 checks passed
@kovayur kovayur deleted the yury/addon-cicd-01-private-api branch December 19, 2023 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants