Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Use AppConfig's generation to get latest dependency only #224

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

hongchaodeng
Copy link
Member

  • pass AC's generation into child objects' labels
  • check generation in getting data input

fix #222

- pass AC's generation into child objects' labels
- check generation in getting data input

Signed-off-by: Hongchao Deng <[email protected]>
Signed-off-by: Hongchao Deng <[email protected]>
test/e2e-test/appconfig_dependency_test.go Outdated Show resolved Hide resolved
Comment on lines +511 to +513
if g1, g2 := u.GetLabels()[oam.LabelAppGeneration], strconv.Itoa(acGeneration); g1 != g2 {
return nil, false, fmt.Sprintf("generation not match: obj (%s), ac (%s)", g1, g2), nil
}
Copy link
Member

@wonderflow wonderflow Sep 29, 2020

Choose a reason for hiding this comment

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

The object can be workload or trait. The object will always have this label, it is meaningless to check. We should check status is updated to align this label.

And also, this is a break change, I don't think we need to make it as a force check.

@hongchaodeng
Copy link
Member Author

After discussion, this PR will not fix #222 because it also requires the trait operator to update the data in trait CR. So waiting for label to be updated is still not enough. Therefore, the data flow involves both OAM Runtime and the Trait Operators.

We will put this on hold and come back to this once we have an ideal solution.

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.

Adding observed generation to prevent passing the old data
2 participants