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

Issue/3789 symmetric increments #3790

Closed
wants to merge 3 commits into from

Conversation

wouterdb
Copy link
Contributor

@wouterdb wouterdb commented Feb 8, 2022

Description

Fixes an issue where increments are not symmetric: the negative and positive part overlap, where it concerns event propagation

This fix causes

  • slightly slower deploy due to more accurate (larger) increments
  • faster event response

Does this require more testing?

closes #3789

Backstory

The worst effect of this bug is in ISO5:

Given:

  • Resource A on agent a
  • LifeCycleTransferResource on agent internal depends on A
  • Resource A is included in the increment by event (it is in the increment and in the negative increment)

Scenario:

  • When agent a pulls A
    • resource A is marked as 'deployed because of known good state' (due to the negative increment)
    • resource A is returned to be deployed, because it is in the increment
    • resource A is marked as deploying
  • the state transfer
    • starts to execute, because all resources are in a deployed state
    • pulls the state of A when beginning the deploy
    • get deploying for A (this is a race with the above)
    • skips and hangs for a while

Self Check:

Strike through any lines that are not applicable (~~line~~) then check the box

  • Attached issue to pull request
  • Changelog entry
  • Type annotations are present
  • Code is clear and sufficiently documented
  • No (preventable) type errors (check using make mypy or make mypy-diff)
  • Sufficient test cases (reproduces the bug/tests the requested feature)
  • Correct, in line with design
  • End user documentation is included or an issue is created for end-user documentation (add ref to issue here: )

@wouterdb wouterdb requested review from arnaudsjs and sanderr February 8, 2022 15:51
@arnaudsjs
Copy link
Contributor

I guess we have enough tests with this.

@wouterdb wouterdb added the merge-tool-ready This ticket is ready to be merged in label Feb 9, 2022
@inmantaci
Copy link
Contributor

Processing this pull request

@inmantaci inmantaci removed the merge-tool-ready This ticket is ready to be merged in label Feb 9, 2022
@inmantaci
Copy link
Contributor

Pull request rejected by merge tool. The tests for this branch did not succeed.

@wouterdb wouterdb added the merge-tool-ready This ticket is ready to be merged in label Feb 9, 2022
@inmantaci
Copy link
Contributor

Processing this pull request

@inmantaci inmantaci removed the merge-tool-ready This ticket is ready to be merged in label Feb 9, 2022
@inmantaci
Copy link
Contributor

Pull request rejected by merge tool. The tests for this branch did not succeed.

@wouterdb wouterdb added the merge-tool-ready This ticket is ready to be merged in label Feb 9, 2022
@inmantaci
Copy link
Contributor

Processing this pull request

inmantaci pushed a commit that referenced this pull request Feb 9, 2022
…Issue #3789, PR #3790)

# Description

Fixes an issue where increments are not symmetric: the negative and positive part overlap, where it concerns event propagation

This fix causes

- slightly slower deploy due to more accurate (larger) increments
- faster event response

Does this require more testing?

closes #3789

# Backstory

The worst effect of this bug is in ISO5:

Given:
- Resource A on agent a
- LifeCycleTransferResource on agent internal depends on A
 - Resource A is included in the increment by event (it is in the increment and in the negative increment)

Scenario:
- When agent a pulls A
  - resource A is marked as 'deployed because of known good state' (due to the negative increment)
  - resource A is returned to be deployed, because it is in the increment
  - resource A is marked as deploying
- the state transfer
  - starts to execute, because all resources are in a deployed state
  - pulls the state of A when beginning the deploy
  - get deploying for A (this is a race with the above)
  - skips and hangs for a while

# Self Check:

Strike through any lines that are not applicable (`~~line~~`) then check the box

- [x] Attached issue to pull request
- [x] Changelog entry
- [x] Type annotations are present
- [x] Code is clear and sufficiently documented
- [x] No (preventable) type errors (check using make mypy or make mypy-diff)
- [x] Sufficient test cases (reproduces the bug/tests the requested feature)
- [x] Correct, in line with design
- [x] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: )
@inmantaci
Copy link
Contributor

Merged into branches master, iso5 in 788f0f5

@inmantaci inmantaci closed this Feb 9, 2022
@inmantaci inmantaci deleted the issue/3789-symmetric-increments branch February 9, 2022 09:00
sanderr pushed a commit that referenced this pull request Feb 10, 2022
…Issue #3789, PR #3790)

# Description

Fixes an issue where increments are not symmetric: the negative and positive part overlap, where it concerns event propagation

This fix causes

- slightly slower deploy due to more accurate (larger) increments
- faster event response

Does this require more testing?

closes #3789

# Backstory

The worst effect of this bug is in ISO5:

Given:
- Resource A on agent a
- LifeCycleTransferResource on agent internal depends on A
 - Resource A is included in the increment by event (it is in the increment and in the negative increment)

Scenario:
- When agent a pulls A
  - resource A is marked as 'deployed because of known good state' (due to the negative increment)
  - resource A is returned to be deployed, because it is in the increment
  - resource A is marked as deploying
- the state transfer
  - starts to execute, because all resources are in a deployed state
  - pulls the state of A when beginning the deploy
  - get deploying for A (this is a race with the above)
  - skips and hangs for a while

# Self Check:

Strike through any lines that are not applicable (`~~line~~`) then check the box

- [x] Attached issue to pull request
- [x] Changelog entry
- [x] Type annotations are present
- [x] Code is clear and sufficiently documented
- [x] No (preventable) type errors (check using make mypy or make mypy-diff)
- [x] Sufficient test cases (reproduces the bug/tests the requested feature)
- [x] Correct, in line with design
- [x] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-tool-ready This ticket is ready to be merged in
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug in increment calculation
4 participants