Giter Club home page Giter Club logo

actions's Introduction

Stacks Network github actions

Monorepo of composite actions used in the stacks-network org

  • cleanup - removes unused packages/dirs from a runner, freeing around 48GB of space on a runner
  • codecov - Uploads codecov reports with a retry if it fails (optionally it can run grcov to generate a report to send)
  • openapi - Generates and uploads an OpenAPI artifact
  • docker - Generic Docker setup workflows
  • generate-checksum - Generate a 512-bit sha hash of the uploaded artifacts
  • check-jobs-status - Check the result of every job parsed as input. Only succeeds if none of the given jobs have failed.
  • rustfmt - Run rustfmt for the given codebase
  • stacks-core - actions for the stacks-core repo

Why does this exist?

Quite simply: DRY.

  1. Steps used across several workflows were basically all copy/pasted, requiring a search/replace when an update was needed (i.e. updating the version).
  2. There was a specific issue with free disk space on a runner VM, and some steps were added to a workflow to address it - only to have the same issue reoccur in another workflow.
  3. Repeatability and shareability - as more projects are added to the stacks-network org, they can all benefit from using commonly defined composite actions, as opposed to every repo doing it differently (maintenance moves from every repo to a single repo).

Contributing

See CONTRIBUTING.md

actions's People

Contributors

wileyj avatar asuciux avatar bowtieddevops avatar kantai avatar jbencin avatar

Watchers

Diwaker Gupta avatar  avatar Muneeb avatar Brittany L avatar Matthew Little avatar  avatar  avatar  avatar  avatar

actions's Issues

copy the whole output from /out dir in dockerfiles

Currently, the build stage named export-stage in the dockerfiles that build the binaries for stacks-core repository only copies the desired binaries out of the folder in which they are built:

FROM scratch AS export-stage
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /

In order to remove the need to keep track of what binaries are being copied, I've tried modifying this step to copy the output of the whole out/ directory (COPY --from=build /out/* /), but the size of the final archive increased in size due to the build files found in the directory besides the binaries.

add stacks-core rustfmt composite action

with changes being made to how rustfmt needs to run for the parent stacks-network/stacks-core repo, we should fork actions-rust-lang/rustfmt and apply the rustfmt changes documented in the parent repo.

document PR merge process

this needs to be documented to prevent PR's from merging that break things.
i.e. if a change is made to how the tests archives are built, maybe require a succesful workflow using that updated composite action.

other things to consider: how many approvals should be required? protected branches?
etc.

add --features monitoring_prom to build step

@kantai re: #6

in the stacks-core nextest archive build step, add --features monitoring_prom.

adding this feature flag is not allowed when running the tests, but it should work to add in the build step.
however, in a sample test, we're reliably hitting errors on the following 2 tests:

I'm not positive if this is due to my using an older fork or not, but i'll first try to update my fork to the current upstream master branch.

WARN [1705428507.042952] [src/net/p2p.rs:2484] [p2p-(127.0.0.1:6826,127.0.0.1:41466)] local.80000000://(bind=127.0.0.1:6826)(pub=None): failed to learn public IP: NoSuchNeighbor
test tests::neon_integrations::bitcoind_integration_test ... FAILED

failures:

failures:
    tests::neon_integrations::bitcoind_integration_test

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 98 filtered out; finished in 72.07s

WARN [170[542](https://github.com/wileyj/stacks-blockchain/actions/runs/7545373220/job/20541816570#step:5:544)8507.066871] [src/burnchains/bitcoin/network.rs:201] [ThreadId(8)] Failed to handshake with 127.0.0.1:8333: Io(Custom { kind: ConnectionReset, error: "I/O error when processing message" })
ERRO [1705428507.066956] [src/burnchains/bitcoin/network.rs:210] [ThreadId(8)] Failed to connect to peer 127.0.0.1:8333: connection to peer could not be (re-)established

--- TRY 3 STDERR:        stacks-node::bin/stacks-node tests::neon_integrations::bitcoind_integration_test ---
bitcoind spawn: "bitcoind" "-regtest" "-nodebug" "-nodebuglogfile" "-rest" "-txindex=1" "-server=1" "-listenonion=0" "-rpcbind=127.0.0.1" "-port=8333" "-datadir=/tmp/stacks-node-tests/integrations-neon/9dfa16aa4d15bb53-1705428434/neon/burnchain" "-rpcport=8332" "-rpcuser=neon-tester" "-rpcpassword=neon-tester-pass"
bitcoind spawned, waiting for startup
bitcoind startup finished
Chain bootstrapped...
Issuing block at 1705428456, waiting for bump (1)
Block bumped at 1705428500 (2)
Issuing block at 1705428500, waiting for bump (2)
Block bumped at 1705428501 (3)
Issuing block at 1705428501, waiting for bump (3)
Block bumped at 1705428506 (4)
Miner account: ST25WA53N4PWF8XZGQH2J5A4CGCWV4JADPM8MHTRV
thread 'tests::neon_integrations::bitcoind_integration_test' panicked at testnet/stacks-node/src/tests/neon_integrations.rs:826:9:
assertion failed: res.contains("stacks_node_computed_miner_commitment_high 0")
stack backtrace:
   0:     0x55835abea55c - std::backtrace_rs::backtrace::libunwind::trace::ha637c64ce894333a
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x55835abea55c - std::backtrace_rs::backtrace::trace_unsynchronized::h47f62dea28e0c88d
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55835abea55c - std::sys_common::backtrace::_print_fmt::h9eef0abe20ede486
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55835abea55c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hed7f999df88cc644
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x55835ac1d140 - core::fmt::rt::Argument::fmt::h1539a9308b8d058d
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/rt.rs:142:9
   5:     0x55835ac1d140 - core::fmt::write::h3a39390d8560d9c9
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/mod.rs:1120:17
   6:     0x55835abe6aaf - std::io::Write::write_fmt::h5fc9997dfe05f882
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/io/mod.rs:1762:15
   7:     0x55835abea344 - std::sys_common::backtrace::_print::h894006fb5c6f3d45
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x55835abea344 - std::sys_common::backtrace::print::h23a2d212c6fff936
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x55835abec087 - std::panicking::default_hook::{{closure}}::h8a1d2ee00185001a
  10:     0x55835abebdef - std::panicking::default_hook::h6038f2eba384e475
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:292:9
  11:     0x55835abec508 - std::panicking::rust_panic_with_hook::h2b5517d590cab22e
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:779:13
  12:     0x55835abec3b9 - std::panicking::begin_panic_handler::{{closure}}::h233112c06e0ef43e
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:649:13
  13:     0x55835abeaa26 - std::sys_common::backtrace::__rust_end_short_backtrace::h6e893f24d7ebbff8
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:170:18
  14:     0x55835abec152 - rust_begin_unwind
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
  15:     0x558359324b85 - core::panicking::panic_fmt::hbf0e066aabfa482c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
  16:     0x558359324c23 - core::panicking::panic::h195fc2a96298d4c3
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:127:5
  17:     0x5583597ce2a7 - stacks_node[2288960b9f52a483]::tests::neon_integrations::bitcoind_integration_test
  18:     0x558359616931 - <stacks_node[2288960b9f52a483]::tests::neon_integrations::bitcoind_integration_test::{closure#0} as core[21cdcf8e8af4c2d9]::ops::function::FnOnce<()>>::call_once
  19:     0x5583598b1f2f - core::ops::function::FnOnce::call_once::h2b5d431d5046312d
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  20:     0x5583598b1f2f - test::__rust_begin_short_backtrace::h7714669af176e207
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:628:18
  21:     0x5583598b0f45 - test::run_test_in_process::{{closure}}::h85218797dcbcec12
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:651:60
  22:     0x5583598b0f45 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h76c106ea31c14d7b
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
  23:     0x5583598b0f45 - std::panicking::try::do_call::h3bd5d0f6620ee946
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  24:     0x5583598b0f45 - std::panicking::try::h232e535e4744fe31
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  25:     0x5583598b0f45 - std::panic::catch_unwind::h3ce3bd6ca8dbac68
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  26:     0x5583598b0f45 - test::run_test_in_process::hc97b257c9621286a
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:651:27
  27:     0x5583598b0f45 - test::run_test::{{closure}}::h2aa798823a438d38
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:574:43
  28:     0x558359879206 - test::run_test::{{closure}}::h87d231c78fb59832
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:602:41
  29:     0x558359879206 - std::sys_common::backtrace::__rust_begin_short_backtrace::he6df152596625789
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:154:18
  30:     0x55835987e2b7 - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::ha94be15d1e0acf36
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/mod.rs:529:17
  31:     0x55835987e2b7 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h9dc6bd6372f16606
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
  32:     0x55835987e2b7 - std::panicking::try::do_call::h9057517f80303cd4
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  33:     0x55835987e2b7 - std::panicking::try::he3a30b11ee45340c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  34:     0x55835987e2b7 - std::panic::catch_unwind::h410458cfd3528b8b
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  35:     0x55835987e2b7 - std::thread::Builder::spawn_unchecked_::{{closure}}::h72ac3bdb[567](https://github.com/wileyj/stacks-blockchain/actions/runs/7545373220/job/20541816570#step:5:569)b737b
                               at /rustc/82e1608dfa6e0b5[569](https://github.com/wileyj/stacks-blockchain/actions/runs/7545373220/job/20541816570#step:5:571)232559e3d385fea5a93112/library/std/src/thread/mod.rs:528:30
  36:     0x5[583](https://github.com/wileyj/stacks-blockchain/actions/runs/7545373220/job/20541816570#step:5:585)[598](https://github.com/wileyj/stacks-blockchain/actions/runs/7545373220/job/20541816570#step:5:600)7e2b7 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h38f34da3654a8344
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  37:     0x55835abf3455 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc7eafaff61e32df9
                               at /rustc/82e1[608](https://github.com/wileyj/stacks-blockchain/actions/runs/7545373220/job/20541816570#step:5:610)dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
  38:     0x55835abf3455 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6ba4a5de48dd2304
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
  39:     0x55835abf3455 - std::sys::unix::thread::Thread::new::thread_start::he469335aef763e45
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17
  40:     0x7f033fa94ac3 - <unknown>
  41:     0x7f033fb26660 - <unknown>
  42:                0x0 - <unknown>

   Canceling due to test failure
------------

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.