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

auto-propose XS updates #2648

Open
dckc opened this issue Mar 15, 2021 · 6 comments
Open

auto-propose XS updates #2648

dckc opened this issue Mar 15, 2021 · 6 comments
Assignees
Labels
enhancement New feature or request tooling repo-wide infrastructure xsnap the XS execution tool

Comments

@dckc
Copy link
Member

dckc commented Mar 15, 2021

What is the Problem Being Solved?

for js dependencies, a bot automatically proposes updates when they become available. We don't have this for XS.

Description of the Design

[Added by Kate]: Create a Github Action Workflow that is executed on a regular basis (e.g. once a day) which checks Moddable to see if there has been a commit to the public branch, and if so, creates a PR to update the submodule. The PR will be manually reviewed by the appropriate Agoric member and merged after review is complete and tests pass.

I (Kate) had created the Agoric Bot that created PRs for npm audit fix on Agoric repos. This worked on CircleCI and so was unintentionally disabled when we moved to Github Actions. We should take the general concept of the script for that (https://github.com/Agoric/nat/blob/main/scripts/npm-audit-fix.sh) and change it for Github Actions.

To update the git submodule:

cd packages/xsnap; cd moddable; git checkout public; git pull; cd ..; git add moddable; git commit -m 'latest'; yarn build && yarn test

cc @katelynsills

@dckc dckc added the enhancement New feature or request label Mar 15, 2021
@dckc
Copy link
Member Author

dckc commented Mar 15, 2021

The main mystery to me was how a bot would get authority to make a PR. In npm-audit-fix.s, $GITHUB_TOKEN seems to be the relevant magic. Thanks, @katelynsills .

@dckc
Copy link
Member Author

dckc commented Mar 16, 2021

#2655 was somewhat auto-generated. The following is WIP:

cd packages/xsnap
cd moddable
git fetch --all
git log --exit-code ..origin/public >/dev/null \
    && exit 0  # done if there are no changes

update=$(git log ..origin/public -n 1 --date=short --pretty="%h %ad %s")
echo Moddable update available: $update
git pull origin public

cd ..  # up to agoric-sdk

git config user.email "connolly+agoricbot@agoric.com"
git config user.name "AgoricBot"
git config --global hub.protocol https

git add moddable
git commit -m "chore: moddable $update"

git push origin moddable-xs-update
hub pull-request --no-edit --base Agoric/agoric-sdk:master

@michaelfig
Copy link
Member

Please change the commit message to be Conventional (i.e. since this is a basically-mechanical commit, prefix it with chore:).

git commit -m "moddable $update"

@katelynsills
Copy link
Contributor

#2655 was somewhat auto-generated.

This is very cool!

@dckc
Copy link
Member Author

dckc commented May 20, 2021

For testnet monitoring, we made some tweaks to the moddable SDK: agoric-labs/moddable#5

Since we're keeping our own branch, the automation design here doesn't work.

p.s. escalated to its own issue: #3139

@mhofman
Copy link
Member

mhofman commented Jan 6, 2023

Now that mainnet is released, when upgrading XS we need to ensure a few things.

  • Snapshots are compatible: the new version can load snapshots of the old version. This allows the upgrade to be part of a regular in-consensus upgrade of the chain
  • Behavior is consistent with previous versions: if replaying the transcript of activity on mainnet, given the same start bundles, we'd expect the same execution behavior (same syscalls issued at the same time). The snapshot content and metering may have changed, but execution itself shouldn't have.

We do expect some XS releases will break either or both these things, in which case the decision to upgrade needs to be manually handled (most likely a new worker major version, as described in #6596). See #6361 for more discussion on XS upgrades.

To detect both of the variations described above, we can use the enhanced replay tool (#6723) as a basis of an automated test using mainnet artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tooling repo-wide infrastructure xsnap the XS execution tool
Projects
None yet
Development

No branches or pull requests

5 participants