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

Check for resource staleness, requeue if stale #1028

Closed
wants to merge 1 commit into from

Conversation

djwhatle
Copy link
Contributor

@djwhatle djwhatle commented Mar 26, 2021

Resolves #1026 by keeping track of the latest generation of each resource UID we've reconciled. We will requeue if the cached client feeds us a resource generation < what we've already reconciled.

Similar to #1037 , but this PR solves the problem for reconciler client. After writing #1037, I imagine it may be possible to apply the same approach here.

Illustration of problem from #1026

image

No more duplicate phases in the elapsed phase time table

image

# Table generated by...

# Run a migration
ROLE=mtc make run-fast 2>&1 | tee controller.log

# Generate the table from logs
echo "Logger, PhaseName, ElapsedSeconds, PercentOfTotal" > phase_timing.csv; total_time=$(cat controller.log | grep '\"Phase\ completed\"' | jq '([inputs | .phaseElapsed] | add)'); cat controller.log | grep '\"Phase\ completed\"' | jq -r --arg total_time "$total_time" '"\(.logger), \(.Phase), \(.phaseElapsed), \(.phaseElapsed / ($total_time|tonumber))"' >> phase_timing.csv

# Dump into gsheets

@djwhatle djwhatle added the kind/bug Categorizes issue or PR as related to a bug. label Mar 26, 2021
Copy link
Contributor

@pranavgaikwad pranavgaikwad left a comment

Choose a reason for hiding this comment

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

Added a comment

@djwhatle
Copy link
Contributor Author

@pranavgaikwad rebased, please review when you have a chance.

Move recording of generation to end of reconcile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
2 participants