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

engine: fix up some display and calculations in the build graph #3498

Merged
merged 1 commit into from Jun 24, 2020

Conversation

nicks
Copy link
Member

@nicks nicks commented Jun 23, 2020

Hello @landism,

Please review the following commits I made in branch nicks/graph:

0366bb9 (2020-06-23 09:46:45 -0400)
engine: fix up some display and calculations in the build graph
This improves the logs around when cached images are being
reused, and why we're doing a rebuild.

It also fixes a bug where we were reusing a cached image
when we shouldn't have been.

Code review reminders, by giving a LGTM you attest that:

  • Commits are adequately tested
  • Code is easy to understand and conforms to style guides
  • Incomplete code is marked with TODOs
  • Code is suitably instrumented with logging and metrics

@nicks nicks requested a review from landism June 23, 2020 13:46
@nicks
Copy link
Member Author

nicks commented Jun 23, 2020

Side note: I noticed this issue independently of #3496. They might be related, but haven't been able to reproduce that. This PR is more about the opposite issue: erroneously skipping builds rather than erroneously repeating them

} else {
// Otherwise, we can re-use results from the previous build.
if !q.isBuilding(id) {
// We can re-use results from the previous build.
// If needsOwnBuild is false, then LastSuccessfulResult must exist if it's empty.
Copy link
Member

Choose a reason for hiding this comment

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

not part of this PR so FFTI, but I found this comment really confusing!

  1. it mentions needsOwnBuild, which is no longer what's checked. I think a refactor missed updating this comment.
  2. what does "must exist if it's empty" mean? aren't "exists" and "empty" opposite states? or does "it's" here refer to something other than LastSuccessfulResult?

Copy link
Member Author

Choose a reason for hiding this comment

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

ya, i just removed this comment

Copy link
Member Author

@nicks nicks left a comment

Choose a reason for hiding this comment

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

backed out some of this PR due to the revert, but most of it is still relevant

} else {
// Otherwise, we can re-use results from the previous build.
if !q.isBuilding(id) {
// We can re-use results from the previous build.
// If needsOwnBuild is false, then LastSuccessfulResult must exist if it's empty.
Copy link
Member Author

Choose a reason for hiding this comment

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

ya, i just removed this comment

This improves the logs around when cached images are being
reused, and why we're doing a rebuild.
@nicks nicks merged commit 173d6cb into master Jun 24, 2020
@nicks nicks deleted the nicks/graph branch June 24, 2020 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants