Skip to content

ford: remove pit short-circuit - #2322

Merged
jtobin merged 7 commits into
masterfrom
ted/ford-no-pit
Feb 28, 2020
Merged

jtobin merged 7 commits into
masterfrom
ted/ford-no-pit

Conversation

@belisarius222

@belisarius222 belisarius222 commented Feb 20, 2020 •

Copy link
Copy Markdown
Collaborator

This should fix a bug with OTA updates where Ford held onto the old %reef build while trying to run new builds, causing builds that depended on a new Zuse to fail.

Note that this fix will increase boot times, since the pit short-circuit had been put in to avoid needing to rebuild Zuse when Ford first starts running builds.

@philipcmonk

Copy link
Copy Markdown
Collaborator

This looks correct to me. Not sure what's up with CI, I'd try making a pill.

@joemfb

joemfb commented Feb 21, 2020

Copy link
Copy Markdown
Collaborator

There are several %ford test failures as a result of this change.

@jtobin

jtobin commented Feb 21, 2020

Copy link
Copy Markdown
Contributor

I made a pill and tested locally just to check, but the failures still appear.

@belisarius222

Copy link
Copy Markdown
Collaborator Author

I had to restructure the tests so that Ford performs a %reef build once during setup -- otherwise, it'll rebuild the kernel in every test arm, and it's not easily cacheable because each test arm is run in its own road and ~+ doesn't persist across roads.

So I moved the production of .ford-gate to /lib/test/ford/hoon along with the other test helpers, and I moved the helpers that had been in that file to /lib/test/ford-external/hoon, since those helpers are only used by tests for other vanes.

Note that if we try to compare two Zuse vases that aren't structurally shared, we get a bail:meme, so the code to generate the .ford-gate doesn't check that the %reef used by the test Ford is equal to the pit used by the test code itself. I think that's ok, though.

@belisarius222
belisarius222 requested review from eglaysher and removed request for philipcmonk February 24, 2020 23:17
@belisarius222

Copy link
Copy Markdown
Collaborator Author

Added @eglaysher as reviewer since @philipcmonk is out this week.

@belisarius222

Copy link
Copy Markdown
Collaborator Author

The 'pr' CI build timed out -- my guess is because this PR makes boot slower. There doesn't seem to be a button I can push in Travis to rerun. @jtobin any advice to get this to pass?

@joemfb

joemfb commented Feb 25, 2020

Copy link
Copy Markdown
Collaborator

This is hitting the ~m10 http request (set in http.c in _http_rec_accept()), while running the test suite using herb. That's breaking the tests (should be caught and failed in the runner), which is hanging the CI build, which is then timing out.

@belisarius222

belisarius222 commented Feb 25, 2020 via email

Copy link
Copy Markdown
Collaborator Author

@eglaysher eglaysher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Removing the short circuit is OK from a correctness standpoint, but we'll see if you can get the compilation time down for the unit tests....

@belisarius222

Copy link
Copy Markdown
Collaborator Author

The compilation time wasn't that bad on my machine once I added an initial %reef build to the Ford tests in a separate file so it only gets run once, before the tests themselves get built. It does have to do one kernel build during the test, but that should only be a few minutes at most, even on a slow CI VM. And sure enough, the 'push' CI build succeeds with the normal ~m10 timeout.

I don't know what's wrong with the 'pr' CI build. My guess is that it's booting ships, and boot will be a lot longer because it will rebuild the kernel multiple times -- I think it's once for the %base desk, twice for the %home desk, something like that.

Not sure how to fix this. The short-circuit was there mostly to bring down initial boot time, so without it, builds will be slower... the %ride cache should help a lot here, though, or at least it would if the desk name wasn't in the parsed hoon. We also don't cache parser operations, and maybe we should.

@joemfb

joemfb commented Feb 25, 2020

Copy link
Copy Markdown
Collaborator

Both builds are booting ships; the PR build is slower because GC is enabled.

@belisarius222

Copy link
Copy Markdown
Collaborator Author

@joemfb thinks it's the tests that are killing the CI build, not boot. I'll see if I can replace the actual %reef build in /lib/test/ford/hoon with some code that monkey-patches Ford's build results with !>(..zuse) so we don't have to recompile the kernel for testing.

@belisarius222

Copy link
Copy Markdown
Collaborator Author

Great success! CI says it took 37 minutes, so I think I should leave the timeout at 30 minutes for now.

@joemfb

joemfb commented Feb 25, 2020 via email

Copy link
Copy Markdown
Collaborator

@belisarius222

Copy link
Copy Markdown
Collaborator Author

Reverted to original timeout. I believe this is now ready for merge.

@belisarius222

Copy link
Copy Markdown
Collaborator Author

After "OTA"ing this on a sandboxed pier whose :eth-watcher was nest-fail'ing, the ship was able to hear an Ethereum update. I think this means it fixed the issue.

@vvisigoth

vvisigoth commented Feb 27, 2020 via email

Copy link
Copy Markdown
Contributor

@ixv ixv mentioned this pull request Feb 27, 2020
@tacryt-socryp

Copy link
Copy Markdown
Contributor

Merge merge merge

@jtobin jtobin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@belisarius222 the nurses are telling me you haven't been taking your pills.

(Fear not, I can administer the dose on this one. 😄)

@belisarius222

belisarius222 commented Feb 28, 2020 via email

Copy link
Copy Markdown
Collaborator Author

@jtobin
jtobin merged commit bd2d904 into master Feb 28, 2020
@jtobin
jtobin deleted the ted/ford-no-pit branch February 28, 2020 16:48
jtobin pushed a commit that referenced this pull request Mar 2, 2020
* origin/ted/ford-no-pit:
  pills: update solid
  http.c: revert timeout to original ~m10
  tests: prime ford %reef cache
  http.c: bump timeout from ~m20 to ~m30
  http.c: bump timeout from ~m10 to ~m20
  tests: fix ford tests for no %reef short-circuit
  ford: remove pit short-circuit

(cherry picked from commit bd2d904)
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.

7 participants