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

Prefactor: Make steps more explicit in fleetshard reconciler loop #1040

Closed
wants to merge 1 commit into from

Conversation

rhybrillou
Copy link
Contributor

@rhybrillou rhybrillou commented May 19, 2023

Description

Minor refactor in fleetshard: extract functions to reduce the size of the central reconciler function.

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

Test manual

TODO: Add manual testing efforts

# To run tests locally run:
make db/teardown db/setup db/migrate
make ocm/setup OCM_OFFLINE_TOKEN=<ocm-offline-token> OCM_ENV=development
make verify lint binary test test/integration

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 19, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@rhybrillou rhybrillou temporarily deployed to development May 19, 2023 20:33 — with GitHub Actions Inactive
@rhybrillou rhybrillou temporarily deployed to development May 19, 2023 20:33 — with GitHub Actions Inactive
@rhybrillou rhybrillou temporarily deployed to development May 19, 2023 20:33 — with GitHub Actions Inactive
@rhybrillou
Copy link
Contributor Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@rhybrillou rhybrillou marked this pull request as ready for review May 25, 2023 08:28
@rhybrillou rhybrillou temporarily deployed to development May 25, 2023 08:28 — with GitHub Actions Inactive
@rhybrillou rhybrillou temporarily deployed to development May 25, 2023 08:28 — with GitHub Actions Inactive
@rhybrillou rhybrillou temporarily deployed to development May 25, 2023 08:28 — with GitHub Actions Inactive
@rhybrillou rhybrillou requested review from SimonBaeumer and a team May 25, 2023 08:28
@@ -3,6 +3,7 @@ package reconciler
import "github.com/pkg/errors"

var (
errInvalidArguments = errors.New("invalid arguments")
Copy link

Choose a reason for hiding this comment

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

Why do we not reuse errox package here, we already have the import of stackrox 🤔

}

if r.managedDBEnabled {
if err = r.reconcileCentralDBConfig(ctx, remoteCentral, central); err != nil {
Copy link

Choose a reason for hiding this comment

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

Applies to all resources that you change: pass a pointer here instead of the struct, otherwise changes won't be applied.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 31, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhaus67, rhybrillou, SimonBaeumer

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:
  • OWNERS [SimonBaeumer,dhaus67]

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

@rhybrillou
Copy link
Contributor Author

This change was split in a set of smaller PRs:
#1052
#1053
#1054
#1055
#1056
#1057
#1058

@rhybrillou rhybrillou closed this Jun 13, 2023
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