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

introduce vm-config package to fix local-npm test #8141

Merged
merged 7 commits into from
Aug 7, 2023
Merged

Conversation

turadg
Copy link
Member

@turadg turadg commented Aug 3, 2023

Description

#8102 broke the some agoric-cli integration tests.
(https://github.com/Agoric/agoric-sdk/actions/runs/5753924697/job/15598129426 )

#8140 helped but there was one problem left with resolving the configs.

This fixes that by separating configs to their own package.

It also adds a timeout and fixes a benchmark test missed in the 'boot' move.

Security Considerations

n/a

Scaling Considerations

n/a

Documentation Considerations

I don't think these are documented outside the repo.

Testing Considerations

Improves factoring

Upgrade Considerations

The configs are only used in bootstrap, not upgrade.

@turadg turadg requested review from dckc and michaelfig August 3, 2023 22:44
mhofman
mhofman previously requested changes Aug 3, 2023
Copy link
Member

@mhofman mhofman left a comment

Choose a reason for hiding this comment

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

Just a review of the GH action change

@@ -127,6 +127,7 @@ jobs:
- name: run agoric-cli integration-test
working-directory: ./packages/agoric-cli
run: yarn integration-test
timeout-minutes: 40
Copy link
Member

Choose a reason for hiding this comment

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

Let's move this at the job level instead of this individual step

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

I think it's worth waiting on review by @michaelfig for approval.

Meanwhile, some observations / questions.


The configs themselves have no dependencies. Keeping them separate allows packages to depend on them without depending on the world.

# Future plans
Copy link
Member

Choose a reason for hiding this comment

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

Plans seem like they belong in issues. Or at least: when we say "we plan to X" I prefer that X is linked to an issue.

And historical info ("Factored out...") belongs in commit messages.

Copy link
Member Author

Choose a reason for hiding this comment

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

not firm enough plans to merit an issue, imo. if it can't be here I would just drop it.

I could qualify this with "possible future directions"

Copy link
Member

Choose a reason for hiding this comment

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

if it can't be here

It's not a critical thing. I just wonder about it getting out of date. I get the impression that it's likely to be addressed soon anyway.

Comment on lines +12 to +16
"lint": "run-s --continue-on-error lint:*",
"lint:types": "tsc -p jsconfig.json",
"lint:eslint": "eslint ."
Copy link
Member

Choose a reason for hiding this comment

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

Our docs on making a new package say:

populate a new packages/zoe/package.json, using other packages as a template

Is there any more to it than that? I'm sometimes overwhelmed wondering which other packages to use as a template.

Copy link
Member Author

Choose a reason for hiding this comment

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

Those docs are a little stale. e.g. we don't have to manually add to workspaces now because it has a globl.
I'll try to update in this PR.

as a template I used boot/packages.json (i actually copied the whole dir then cut it down)

Copy link
Member Author

Choose a reason for hiding this comment

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

separated #8142


This is similar to `@agoric/boot` but because that has the integration testing of bootstrap, it depends on almost everything.

The configs themselves have no dependencies. Keeping them separate allows packages to depend on them without depending on the world.
Copy link
Member

Choose a reason for hiding this comment

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

This seems like useful justification.

But I wonder to what extent it's true. The configs do reference other packages:

  "coreProposals": [
    "@agoric/vats/scripts/init-core.js",
    "@agoric/vats/scripts/init-network.js",
    {
      "module": "@agoric/inter-protocol/scripts/init-core.js",

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah… in a way it's not true. It's only true in the way that you can get the package without any other dependencies.

Copy link
Member Author

Choose a reason for hiding this comment

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

thinking more, this is fully true. the configs have no dependencies. the runtime that wants to build or execute those configs does.

often takes 20min in production. allow 40 for future cases (e.g. Endo)
@turadg turadg requested review from mhofman and dckc August 4, 2023 21:54
@turadg turadg dismissed mhofman’s stale review August 4, 2023 21:55

it was just for moving the github action value, which is done

Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

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

Just one missing dependency from @agoric/inter-protocol to @agoric/vm-config, but that's easy to fix even if you land this PR first.

@@ -55,7 +55,7 @@ make scenario2-setup-nobuild >>"$CHAIN_LOG" 2>&1
echo "Starting the chain..."
# use -economy target to get the kitchen sink
# disable pruning to keep all history https://docs.desmos.network/fullnode/overview/
make AGC_START_ARGS="--pruning=nothing" CHAIN_BOOTSTRAP_VAT_CONFIG=@agoric/boot/decentral-itest-vaults-config.json scenario2-run-chain >>"$CHAIN_LOG" 2>&1 &
make AGC_START_ARGS="--pruning=nothing" CHAIN_BOOTSTRAP_VAT_CONFIG=@agoric/vm-config/decentral-itest-vaults-config.json scenario2-run-chain >>"$CHAIN_LOG" 2>&1 &
Copy link
Member

@michaelfig michaelfig Aug 6, 2023

Choose a reason for hiding this comment

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

Does this (and the reference in test-proposal-stuff.js) mean that inter-protocol/package.json should take a dependency on @agoric/vm-config?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so, because this is instructing cosmic-swingset what to do. That's the package that really has the dependency. Same as how the JSONs in vm-config that specify a slate of packages doesn't itself depend on them (the thing that reads their source does).

Also this script is not long for this world #7914

@turadg turadg added this pull request to the merge queue Aug 7, 2023
Merged via the queue into master with commit a2db142 Aug 7, 2023
62 checks passed
@turadg turadg deleted the fix-local-npm-test branch August 7, 2023 13:57
mhofman pushed a commit that referenced this pull request Aug 7, 2023
introduce vm-config package to fix local-npm test
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.

4 participants