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

Moved Script Evaluation Test to GHA #5095

Merged
merged 7 commits into from
Feb 1, 2023
Merged

Moved Script Evaluation Test to GHA #5095

merged 7 commits into from
Feb 1, 2023

Conversation

zeme-iohk
Copy link

@zeme-iohk zeme-iohk commented Jan 31, 2023

  • Added ./.github/workflows/script-evaluation-test.yml
  • Some renames and "cosmetics" to the other workflow files
  • Partly tested locally using act and a fork of the repo.
  • Must be pushed to master for proper e2e test

@zeme-iohk zeme-iohk marked this pull request as ready for review January 31, 2023 08:15
run: |
export EVENT_DUMP_DIR="$HOME/mainnet-script-dump-downloaded"
nix develop --no-warn-dirty --accept-flake-config --command cabal update
nix develop --no-warn-dirty --accept-flake-config --command \
Copy link
Author

@zeme-iohk zeme-iohk Jan 31, 2023

Choose a reason for hiding this comment

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

We need two calls to nix develop unfortunately, this won't work:

nix develop --no-warn-dirty --accept-flake-config --command \ 
  cabal update && cabal v2-run ... 

As
nix develop --command won't allow this syntax -> it breaks at &&

Copy link
Contributor

Choose a reason for hiding this comment

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

Alternatively, what about

nix run .#x86_64-linux.plutus.library.plutus-project-924.hsPkgs.plutus-ledger-api.components.exes.evaluation-test -- --num-threads=1

AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
AWS_ENDPOINT_URL: https://s3.devx.iog.io
Copy link
Author

Choose a reason for hiding this comment

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

Can someone confirm that these two are correct? AWS_ENDPOINT_URL and AWS_DEFAULT_REGION
Maybe @Pacman99

name: Script Evaluation Test
on:
schedule:
- cron: 30 3 * * * # 3:30am every day
Copy link
Author

Choose a reason for hiding this comment

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

I chose at random, happy to change

run: |
export LOCAL_DIR="$HOME/mainnet-script-dump-downloaded"
nix develop --no-warn-dirty --accept-flake-config --command \
bash ./scripts/s3-sync-unzip.sh s3://plutus/mainnet-script-dump/ \*.event.bz2
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're running on a persistent machine, is there a way we can save this somewhere persistent and only sync the remainder?

Copy link
Author

Choose a reason for hiding this comment

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

I think the file $HOME/mainnet-script-dump-downloaded is going to persist across runs, no?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I see. I also don't know if that's true. Maybe we should check with @Pacman99 .

I also don't know if that script does things incrementally, probably a question for @zliu41

run: |
export EVENT_DUMP_DIR="$HOME/mainnet-script-dump-downloaded"
nix develop --no-warn-dirty --accept-flake-config --command cabal update
nix develop --no-warn-dirty --accept-flake-config --command \
Copy link
Contributor

Choose a reason for hiding this comment

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

Alternatively, what about

nix run .#x86_64-linux.plutus.library.plutus-project-924.hsPkgs.plutus-ledger-api.components.exes.evaluation-test -- --num-threads=1

# TODO(std) check that this works
# nix develop --command 'cabal update && EVENT_DUMP_DIR=$HOME/mainnet-script-dump-downloaded cabal v2-run plutus-ledger-api:evaluation-test -- --num-threads=1'
concurrency: 1
concurrency_group: "plutus-script-evaluation"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this important? In fact, shouldn't we have a concurrency group for all things that use the benchmarking machine? or is that handled by having the benchmarking machine only accept one job at once?

Copy link
Author

Choose a reason for hiding this comment

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

yeah I think it's important, we can also cancel previous jobs actually. see my update.

@@ -3,6 +3,10 @@ on:
issue_comment:
types: [created]

concurrency:
group: plutus-benchmark
cancel-in-progress: true
Copy link
Contributor

Choose a reason for hiding this comment

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

That seems wrong. If people make benchmark requests on multiple PRs, we want them to queue up and all get executed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Another reason why it's worth writing explanatory comments for stuff like this!

Copy link
Author

Choose a reason for hiding this comment

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

ok, will update

@@ -3,6 +3,10 @@ on:
issue_comment:
types: [created]

concurrency:
group: plutus-benchmark
cancel-in-progress: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Another reason why it's worth writing explanatory comments for stuff like this!

@@ -4,6 +4,10 @@ on:
schedule:
- cron: 30 3 * * * # 3:30am every day

concurrency:
group: script-evaluation-test
cancel-in-progress: true
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems okay... we shouldn't ever end up with multiple of these in flight? Worth a comment.

nix develop --no-warn-dirty --accept-flake-config --command \
cabal v2-run plutus-ledger-api:evaluation-test -- --num-threads=1
Alternatively, what about
nix run .#x86_64-linux.plutus.library.plutus-project-924.hsPkgs.plutus-ledger-api.components.exes.evaluation-test -- --num-threads=1
Copy link
Contributor

Choose a reason for hiding this comment

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

We should test this, I'm not 100% sure whether it will work.

Copy link
Author

Choose a reason for hiding this comment

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

tested locally

@zeme-iohk zeme-iohk merged commit 5e6bda0 into master Feb 1, 2023
@zeme-iohk zeme-iohk deleted the zeme-iohk/set branch February 1, 2023 06:21
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.

3 participants