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

Fix reconcile loop break when central is not changed #1251

Merged
merged 3 commits into from
Sep 12, 2023

Conversation

mtodor
Copy link
Contributor

@mtodor mtodor commented Sep 11, 2023

Description

After investigation about problem-related to the increase of requests made to fleet-manager. I found that we are making way more reconciliation.

Before, we had 1 in 24h, and after some changes, we started having 2000 in 24h. That was reflected in the increased number of requests for fleet-manager.

After investigating logging and code, I found that the potential problem is caused by sorting a list of secrets before hashing. We would store the hash in reverse order and compare it with the hash created in sorted order.

That made diff between hashes and reconciliation was triggered more often.

Commit only with added test:
https://github.com/stackrox/acs-fleet-manager/actions/runs/6146719440/job/16676645194

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

  1. Unit tests only

@mtodor mtodor temporarily deployed to development September 11, 2023 12:58 — with GitHub Actions Inactive
@mtodor mtodor temporarily deployed to development September 11, 2023 12:58 — with GitHub Actions Inactive
@mtodor mtodor temporarily deployed to development September 11, 2023 12:58 — with GitHub Actions Inactive
@mtodor mtodor temporarily deployed to development September 11, 2023 13:22 — with GitHub Actions Inactive
@mtodor mtodor temporarily deployed to development September 11, 2023 13:22 — with GitHub Actions Inactive
@mtodor mtodor temporarily deployed to development September 11, 2023 13:22 — with GitHub Actions Inactive
@mtodor mtodor temporarily deployed to development September 11, 2023 13:30 — with GitHub Actions Inactive
@mtodor mtodor temporarily deployed to development September 11, 2023 13:30 — with GitHub Actions Inactive
@mtodor mtodor temporarily deployed to development September 11, 2023 13:30 — with GitHub Actions Inactive
@mtodor mtodor requested review from johannes94 and kurlov September 11, 2023 14:28
Copy link
Contributor

@johannes94 johannes94 left a comment

Choose a reason for hiding this comment

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

Good catch, thanks @mtodor

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 12, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johannes94, mtodor

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

@mtodor mtodor merged commit f6d113e into main Sep 12, 2023
@mtodor mtodor deleted the mtodor/fix-reconcile-loop-no-central-change-break branch September 12, 2023 08:00
Copy link
Member

@kurlov kurlov left a comment

Choose a reason for hiding this comment

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

🎉

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