diff --git a/.github/actions/docker/action.yaml b/.github/actions/docker/action.yaml index a3c132c2df..1e12427e9a 100644 --- a/.github/actions/docker/action.yaml +++ b/.github/actions/docker/action.yaml @@ -22,12 +22,6 @@ inputs: description: User name to use when pushing images to Docker Hub dockerhub_token: description: Docker Hub token to use - cache_mounts: - description: Load cache mounts cache - default: | - cargo_registry_index - cargo_registry_cache - cargo_git cargo_profile: description: Cargo build profile, i.e release or dev default: dev @@ -43,6 +37,9 @@ inputs: aws_secret_access_key: description: AWS secret access key required: true + cache_to_name: + description: 'Save cache to name manifest (should be used only on default branch)' + default: 'false' outputs: digest: value: ${{ steps.docker_build.outputs.digest }} @@ -65,17 +62,10 @@ runs: install: true driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=10485760 cleanup: false - config-inline: | + buildkitd-config-inline: | [worker.oci] gc = false - - name: Load Docker mount cache - uses: dcginfra/buildkit-cache-dance/inject@s5cmd - if: ${{ inputs.cache_mounts != '' }} - with: - bucket: ${{ inputs.bucket }} - mounts: ${{ inputs.cache_mounts }} - - name: Set Docker tags and labels from image tag id: docker_meta uses: docker/metadata-action@v5 @@ -90,16 +80,83 @@ runs: id: layer_cache_settings with: name: ${{ inputs.image_name }} + region: ${{ inputs.region }} bucket: ${{ inputs.bucket }} + cache_to_name: ${{ inputs.cache_to_name }} + + - name: Set HOME variable to github context + shell: bash + run: echo "HOME=$HOME" >> $GITHUB_ENV + + - name: Cargo cache for Docker + uses: actions/cache@v4 + id: cargo-cache + with: + path: | + ${{ env.HOME }}/cargo-cache-registry-index + ${{ env.HOME }}/cargo-cache-registry-cache + ${{ env.HOME }}/cargo-cache-git-db + key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + + - name: Inject cargo cache into docker + uses: reproducible-containers/buildkit-cache-dance@v3.1.2 + with: + cache-map: | + { + "${{ env.HOME }}/cargo-cache-registry-index": { + "target": "/root/.cargo/registry/index", + "id": "cargo_registry_index" + }, + "${{ env.HOME }}/cargo-cache-registry-cache": { + "target": "/root/.cargo/registry/cache", + "id": "cargo_registry_cache" + }, + "${{ env.HOME }}/cargo-cache-git-db": { + "target": "/root/.cargo/git/db", + "id": "cargo_git" + } + } + skip-extraction: ${{ steps.cargo-cache.outputs.cache-hit }} + + - name: Yarn unplugged cache for Docker + uses: actions/cache@v4 + id: yarn-cache + with: + path: ${{ env.HOME }}/yarn-unplugged-cache + key: ${{ inputs.platform }}-yarn-unplugged-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ inputs.platform }}-yarn-unplugged- + + - name: Set arch + id: arch + uses: actions/github-script@v6 + with: + result-encoding: 'string' + script: return '${{ inputs.platform }}'.replace('linux/', ''); + + - name: Inject cargo cache into docker + uses: reproducible-containers/buildkit-cache-dance@v3.1.2 + with: + cache-map: | + { + "${{ env.HOME }}/yarn-unplugged-cache": { + "target": "/tmp/unplugged", + "id": "unplugged_${{ steps.arch.outputs.result }}" + } + } + skip-extraction: ${{ steps.yarn-cache.outputs.cache-hit }} - name: Build and push Docker image ${{ inputs.image }} id: docker_build - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . builder: ${{ steps.buildx.outputs.name }} target: ${{ inputs.target }} labels: ${{ steps.docker_meta.outputs.labels }} + push: ${{ inputs.push_tags }} tags: ${{ inputs.push_tags == 'true' && steps.docker_meta.outputs.tags || '' }} platforms: ${{ inputs.platform }} build-args: | @@ -110,15 +167,6 @@ runs: SCCACHE_S3_KEY_PREFIX=${{ runner.os }}/sccache AWS_ACCESS_KEY_ID=${{ inputs.aws_access_key_id }} AWS_SECRET_ACCESS_KEY=${{ inputs.aws_secret_access_key }} - AWS_REGION=${{ inputs.region }} cache-from: ${{ steps.layer_cache_settings.outputs.cache_from }} cache-to: ${{ steps.layer_cache_settings.outputs.cache_to }} outputs: type=image,name=${{ inputs.image_org }}/${{ inputs.image_name }},push-by-digest=${{ inputs.push_tags != 'true' }},name-canonical=true,push=true - -# TODO: This is doesn't work -# - name: Save Docker mount cache -# uses: dcginfra/buildkit-cache-dance/extract@s5cmd -# if: ${{ inputs.cache_mounts != '' }} -# with: -# bucket: ${{ inputs.bucket }} -# mounts: ${{ inputs.cache_mounts }} diff --git a/.github/actions/librocksdb/action.yaml b/.github/actions/librocksdb/action.yaml index 895185f43d..a73666584e 100644 --- a/.github/actions/librocksdb/action.yaml +++ b/.github/actions/librocksdb/action.yaml @@ -21,14 +21,12 @@ inputs: runs: using: composite steps: - # Cache librocksdb using s3 bucket - - name: Restore cached librocksdb from S3 + - name: Cache librocksdb + uses: actions/cache@v4 id: librocksdb-cache - uses: strophy/actions-cache@opendal-update with: - bucket: ${{ inputs.bucket }} - path: /opt/rocksdb key: librocksdb/${{ inputs.version }}/${{ runner.os }}/${{ runner.arch }} + path: /opt/rocksdb - if: ${{ steps.librocksdb-cache.outputs.cache-hit != 'true' || inputs.force == 'true' }} shell: bash diff --git a/.github/actions/local-network/action.yaml b/.github/actions/local-network/action.yaml index 42b1672366..c2c6060ba6 100644 --- a/.github/actions/local-network/action.yaml +++ b/.github/actions/local-network/action.yaml @@ -11,17 +11,11 @@ runs: - name: Setup Node.JS uses: ./.github/actions/nodejs - - name: Restore JS build artifacts - uses: strophy/actions-cache@opendal-update + - name: Download JS build artifacts + uses: actions/download-artifact@v4 with: - bucket: multi-runner-cache-x1xibo9c - root: actions-cache - path: build-js-artifacts-${{ github.sha }}.tar - key: build-js-artifacts/${{ github.sha }} - - - name: Unpack JS build artifacts archive - shell: bash - run: tar -xf build-js-artifacts-${{ github.sha }}.tar + name: js-build-${{ github.sha }} + path: packages - name: Get dashmate fingerprint id: dashmate-fingerprint @@ -32,13 +26,10 @@ runs: shell: bash run: echo "HOME=$HOME" >> $GITHUB_ENV - # TODO: Use upload artifacts action instead - name: Restore local network data id: local-network-data - uses: strophy/actions-cache/restore@opendal-update + uses: actions/cache/restore@v4 with: - bucket: multi-runner-cache-x1xibo9c - root: local-network-data path: | ${{ env.HOME }}/.dashmate **/.env @@ -72,10 +63,8 @@ runs: if: steps.local-network-data.outputs.cache-hit != 'true' - name: Save local network data - uses: strophy/actions-cache/save@opendal-update + uses: actions/cache/save@v4 with: - bucket: multi-runner-cache-x1xibo9c - root: local-network-data path: | ${{ env.HOME }}/.dashmate **/.env diff --git a/.github/actions/nodejs/action.yaml b/.github/actions/nodejs/action.yaml index 7cb41d5955..8460a19d16 100644 --- a/.github/actions/nodejs/action.yaml +++ b/.github/actions/nodejs/action.yaml @@ -17,11 +17,9 @@ runs: shell: bash run: npm config set audit false - - name: Cache NPM build artifacts (S3 bucket cache) - uses: strophy/actions-cache@opendal-update + - name: Cache NPM build artifacts + uses: actions/cache@v4 with: - bucket: multi-runner-cache-x1xibo9c - root: actions-cache path: | .yarn/unplugged key: ${{ runner.os }}/yarn/unplugged/${{ runner.arch }}/${{ hashFiles('yarn.lock') }} diff --git a/.github/actions/rust/action.yaml b/.github/actions/rust/action.yaml index 9154450873..3b74e2102b 100644 --- a/.github/actions/rust/action.yaml +++ b/.github/actions/rust/action.yaml @@ -17,6 +17,7 @@ inputs: required: false default: "true" +# TODO: Cache deps here to save 1 minute runs: using: composite steps: @@ -32,10 +33,8 @@ runs: echo "TOOLCHAIN_VERSION=$TOOLCHAIN_VERSION" >> $GITHUB_ENV echo "::set-output name=version::$TOOLCHAIN_VERSION" - # TODO: Move to AMI and build every day - uses: dtolnay/rust-toolchain@master name: Install Rust toolchain - id: install_rust with: toolchain: ${{ steps.rust_toolchain.outputs.version }} target: ${{ inputs.target }} @@ -60,7 +59,6 @@ runs: ;; esac - # TODO: Move to AMI and build every day - name: Check if protoc is installed id: check-protoc shell: bash @@ -84,27 +82,20 @@ runs: echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV export PATH="${PATH}:${HOME}/.local/bin" - - name: Run sccache-cache + - name: Install sccache-cache uses: mozilla-actions/sccache-action@v0.0.6 with: version: "v0.8.2" # Must be the same as in Dockerfile if: inputs.cache == 'true' - - name: Hash ref_name - id: hashed-ref-name - shell: bash - run: echo "key=$(echo '${{ github.ref_name }}' | sha256sum | cut -d ' ' -f1)" >> $GITHUB_OUTPUT - - name: Set HOME variable to github context shell: bash run: echo "HOME=$HOME" >> $GITHUB_ENV - - name: Cache cargo registry (S3 bucket cache) - uses: strophy/actions-cache@opendal-update + - name: Cache cargo registry + uses: actions/cache@v4 if: inputs.cache == 'true' with: - bucket: multi-runner-cache-x1xibo9c - root: actions-cache path: | ${{ env.HOME }}/.cargo/registry/index ${{ env.HOME }}/.cargo/registry/cache @@ -114,7 +105,6 @@ runs: ${{ runner.os }}/cargo/registry/${{ hashFiles('**/Cargo.lock') }} ${{ runner.os }}/cargo/registry/ - # TODO: Move to AMI and build every day - name: Install clang id: deps-clang shell: bash diff --git a/.github/actions/s3-layer-cache-settings/action.yaml b/.github/actions/s3-layer-cache-settings/action.yaml index b4073b87c7..49cdaeef66 100644 --- a/.github/actions/s3-layer-cache-settings/action.yaml +++ b/.github/actions/s3-layer-cache-settings/action.yaml @@ -15,16 +15,19 @@ inputs: default: ${{ github.ref }} region: description: S3 region - default: eu-west-1 + required: true bucket: description: S3 bucket name - default: multi-runner-cache-x1xibo9c + required: true prefix: description: S3 key prefix default: 'cache-layers/' mode: description: Cache mode default: max + cache_to_name: + description: 'Save cache to name manifest (should be used only on default branch)' + default: 'false' outputs: cache_to: @@ -41,20 +44,11 @@ runs: id: script with: script: | - const sanitizedHeadRef = '${{ inputs.head_ref }}'.replace(/[^a-zA-Z0-9]/g, '-'); - - const manifestNames = [ - '${{ inputs.name }}_sha_${{ github.sha }}', - `${{ inputs.name }}_tag_${ sanitizedHeadRef }`, - '${{ inputs.name }}' - ]; - const settings = { type: 's3', region: '${{ inputs.region }}', bucket: '${{ inputs.bucket }}', prefix: '${{ inputs.prefix }}', - name: manifestNames.join(';'), }; const settingsString = Object.entries(settings) @@ -62,5 +56,30 @@ runs: .map(([key, value]) => `${key}=${value}`) .join(','); - core.setOutput('cache_from', settingsString); - core.setOutput('cache_to', `${settingsString},mode=${{ inputs.mode }}`); + const sanitizedHeadRef = '${{ inputs.head_ref }}'.replace(/[^a-zA-Z0-9]/g, '-'); + + const shaManifestName = '${{ inputs.name }}_sha_${{ github.sha }}'; + const headRefManifestName = '${{ inputs.name }}_tag_${ sanitizedHeadRef }'; + + const cacheFromManifestNames = [ + shaManifestName, + headRefManifestName, + '${{ inputs.name }}', + ]; + + const cacheFrom = cacheFromManifestNames + .map((name) => `${settingsString},name=${name}`) + .join('\n'); + + core.setOutput('cache_from', cacheFrom); + + const cacheToManifestNames = [ + shaManifestName, + headRefManifestName, + ]; + + if ('${{ inputs.cache_to_name }}' === 'true') { + cacheToManifestNames.push('${{ inputs.name }}'); + } + + core.setOutput('cache_to', `${settingsString},mode=${{ inputs.mode }},name=${cacheToManifestNames.join(';')}`); diff --git a/.github/workflows/cached.yml b/.github/workflows/cached.yml deleted file mode 100644 index 12eed8dd3e..0000000000 --- a/.github/workflows/cached.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Rebuild cached dependencies - -on: - workflow_dispatch: -jobs: - build-rust-deps: - name: Prebuild and cache some Rust dependencies - runs-on: ubuntu-24.04 - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.AWS_REGION }} - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - name: Precompile librocksdb - uses: ./.github/actions/librocksdb - with: - force: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4fc9d0cde1..86476d082a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,42 +40,34 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ secrets.AWS_REGION }} - - name: Retrieve JS build artifacts - uses: strophy/actions-cache@opendal-update - id: cache + - uses: softwareforgood/check-artifact-v4-existence@v0 + id: check-artifact with: - bucket: multi-runner-cache-x1xibo9c - root: actions-cache - path: build-js-artifacts-${{ github.sha }}.tar - key: build-js-artifacts/${{ github.sha }} - - - name: Unpack JS build artifacts archive - run: tar -xf build-js-artifacts-${{ github.sha }}.tar - if: ${{ steps.cache.outputs.cache-hit == 'true' }} + name: js-build-${{ github.sha }} - name: Login to DockerHub uses: docker/login-action@v3 - if: ${{ steps.cache.outputs.cache-hit != 'true' }} with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Setup Rust uses: ./.github/actions/rust with: target: wasm32-unknown-unknown - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Setup Node.JS uses: ./.github/actions/nodejs - name: Install Cargo binstall uses: cargo-bins/cargo-binstall@v1.3.1 - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Install wasm-bindgen-cli run: cargo binstall wasm-bindgen-cli@0.2.86 - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Build packages run: yarn build @@ -85,7 +77,7 @@ jobs: SCCACHE_BUCKET: multi-runner-cache-x1xibo9c SCCACHE_REGION: ${{ secrets.AWS_REGION }} SCCACHE_S3_KEY_PREFIX: ${{ runner.os }}/sccache/wasm/wasm32 - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Set suffix uses: actions/github-script@v6 @@ -133,16 +125,25 @@ jobs: echo ".idea" >> .gitignore echo ".ultra.cache.json" >> .gitignore echo "db/*" >> .gitignore - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Get modified files id: diff - run: git ls-files --others --exclude-standard >> artifacts_list.txt - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + run: | + echo "files<> $GITHUB_OUTPUT + git ls-files --others --exclude-standard >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - - name: Create an archive of built files - run: xargs -a artifacts_list.txt tar cvf build-js-artifacts-${{ github.sha }}.tar - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + - name: Upload the archive of built files + uses: actions/upload-artifact@v4 + with: + name: js-build-${{ github.sha }} + path: ${{ steps.diff.outputs.files }} + retention-days: 1 + if-no-files-found: error + include-hidden-files: true + if: ${{ steps.check-artifact.outputs.exists != 'true' }} release-drive-image: name: Release Drive image @@ -236,16 +237,11 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Retrieve JS build artifacts - uses: strophy/actions-cache@opendal-update + - name: Download JS build artifacts + uses: actions/download-artifact@v4 with: - bucket: multi-runner-cache-x1xibo9c - root: actions-cache - path: build-js-artifacts-${{ github.sha }}.tar - key: build-js-artifacts/${{ github.sha }} - - - name: Unpack JS build artifacts archive - run: tar -xf build-js-artifacts-${{ github.sha }}.tar + name: js-build-${{ github.sha }} + path: packages - name: Install macOS build deps if: runner.os == 'macOS' diff --git a/.github/workflows/tests-build-image.yml b/.github/workflows/tests-build-image.yml index 328a6ce2d4..564feff055 100644 --- a/.github/workflows/tests-build-image.yml +++ b/.github/workflows/tests-build-image.yml @@ -48,3 +48,4 @@ jobs: region: ${{ secrets.AWS_REGION }} aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + cache_to_name: ${{ github.event_name == 'push' && 'true' || 'false' }} diff --git a/.github/workflows/tests-build-js.yml b/.github/workflows/tests-build-js.yml index fbf9082512..83909e0c31 100644 --- a/.github/workflows/tests-build-js.yml +++ b/.github/workflows/tests-build-js.yml @@ -13,55 +13,50 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ secrets.AWS_REGION }} - # TODO: Use upload artifacts action instead - - name: Cache build artifacts - uses: strophy/actions-cache@opendal-update - id: cache + - uses: softwareforgood/check-artifact-v4-existence@v0 + id: check-artifact with: - bucket: multi-runner-cache-x1xibo9c - root: actions-cache - path: build-js-artifacts-${{ github.sha }}.tar - key: build-js-artifacts/${{ github.sha }} + name: js-build-${{ github.sha }} - name: Check out repo uses: actions/checkout@v4 - if: ${{ steps.cache.outputs.cache-hit != 'true' }} with: fetch-depth: 0 + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Login to DockerHub uses: docker/login-action@v3 - if: ${{ steps.cache.outputs.cache-hit != 'true' }} with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Setup Node.JS uses: ./.github/actions/nodejs - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Setup Rust uses: ./.github/actions/rust - if: ${{ steps.cache.outputs.cache-hit != 'true' }} with: target: wasm32-unknown-unknown + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Install Cargo binstall uses: cargo-bins/cargo-binstall@v1.3.1 - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Install wasm-bindgen-cli run: cargo binstall wasm-bindgen-cli@0.2.86 - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Build JS packages run: yarn build - if: ${{ steps.cache.outputs.cache-hit != 'true' }} env: RUSTC_WRAPPER: sccache SCCACHE_BUCKET: multi-runner-cache-x1xibo9c SCCACHE_REGION: ${{ secrets.AWS_REGION }} SCCACHE_S3_KEY_PREFIX: ${{ runner.os }}/sccache/wasm/wasm32 + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Ignore only already cached artifacts run: | @@ -71,15 +66,25 @@ jobs: echo "node_modules" >> .gitignore echo ".nyc_output" >> .gitignore echo ".idea" >> .gitignore - echo ".ultra.cache.json" >> .gitignore + echo ".ultra.exists.json" >> .gitignore echo "db/*" >> .gitignore - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Get modified files id: diff - run: git ls-files --others --exclude-standard >> artifacts_list.txt - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + run: | + echo "files<> $GITHUB_OUTPUT + git ls-files --others --exclude-standard >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + if: ${{ steps.check-artifact.outputs.exists != 'true' }} + + - name: Upload the archive of built files + uses: actions/upload-artifact@v4 + with: + name: js-build-${{ github.sha }} + path: ${{ steps.diff.outputs.files }} + retention-days: 1 + if-no-files-found: error + include-hidden-files: true + if: ${{ steps.check-artifact.outputs.exists != 'true' }} - - name: Create an archive of built files - run: xargs -a artifacts_list.txt tar cvf build-js-artifacts-${{ github.sha }}.tar - if: ${{ steps.cache.outputs.cache-hit != 'true' }} diff --git a/.github/workflows/tests-codeql.yml b/.github/workflows/tests-codeql.yml index 78a3f53aeb..034fd545b8 100644 --- a/.github/workflows/tests-codeql.yml +++ b/.github/workflows/tests-codeql.yml @@ -30,16 +30,11 @@ jobs: - name: Setup Node.JS uses: ./.github/actions/nodejs - - name: Restore JS build artifacts archive - uses: strophy/actions-cache@opendal-update + - name: Download JS build artifacts + uses: actions/download-artifact@v4 with: - bucket: multi-runner-cache-x1xibo9c - root: actions-cache - path: build-js-artifacts-${{ github.sha }}.tar - key: build-js-artifacts/${{ github.sha }} - - - name: Unpack JS build artifacts archive - run: tar -xf build-js-artifacts-${{ github.sha }}.tar + name: js-build-${{ github.sha }} + path: packages - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/tests-dashmate.yml b/.github/workflows/tests-dashmate.yml index 6e1b527aa0..a451381b9c 100644 --- a/.github/workflows/tests-dashmate.yml +++ b/.github/workflows/tests-dashmate.yml @@ -41,17 +41,11 @@ jobs: - name: Setup Node.JS uses: ./.github/actions/nodejs - # TODO: Use action artifacts - - name: Restore JS build artifacts - uses: strophy/actions-cache@opendal-update + - name: Download JS build artifacts + uses: actions/download-artifact@v4 with: - bucket: multi-runner-cache-x1xibo9c - root: actions-cache - path: build-js-artifacts-${{ github.sha }}.tar - key: build-js-artifacts/${{ github.sha }} - - - name: Unpack JS build artifacts archive - run: tar -xvf build-js-artifacts-${{ github.sha }}.tar + name: js-build-${{ github.sha }} + path: packages - name: Replace with pre-built images run: | @@ -88,14 +82,13 @@ jobs: shell: bash run: echo "HOME=$HOME" >> $GITHUB_ENV - - name: Use test suite local network data to speed up dashmate local network tests + - name: Restore test suite local network data to speed up dashmate local network tests id: local-network-data - uses: strophy/actions-cache/restore@opendal-update + uses: actions/cache/restore@v4 with: - bucket: multi-runner-cache-x1xibo9c - root: local-network-data path: | ${{ env.HOME }}/.dashmate + **/.env dashmate_volumes_dump key: local-network-volumes/${{ steps.dashmate-fingerprint.outputs.sha }} if: inputs.restore_local_network_data == true @@ -117,7 +110,7 @@ jobs: env: DEBUG: 1 DASHMATE_E2E_TESTS_SKIP_IMAGE_BUILD: true - if: steps.local-network-data.outputs.cache-hit != 'true' + if: steps.local-network-data.outputs.cache-hit == 'false' - name: Show Docker logs if: ${{ failure() }} diff --git a/.github/workflows/tests-js-package.yml b/.github/workflows/tests-js-package.yml index bdffc8cd41..e71d9d85d1 100644 --- a/.github/workflows/tests-js-package.yml +++ b/.github/workflows/tests-js-package.yml @@ -35,16 +35,11 @@ jobs: - name: Setup Node.JS uses: ./.github/actions/nodejs - - name: Restore JS build artifacts - uses: strophy/actions-cache@opendal-update + - name: Download JS build artifacts + uses: actions/download-artifact@v4 with: - bucket: multi-runner-cache-x1xibo9c - root: actions-cache - path: build-js-artifacts-${{ github.sha }}.tar - key: build-js-artifacts/${{ github.sha }} - - - name: Unpack JS build artifacts archive - run: tar -xf build-js-artifacts-${{ github.sha }}.tar + name: js-build-${{ github.sha }} + path: packages - name: Run ESLinter run: yarn workspace "${{ inputs.package }}" lint @@ -72,16 +67,11 @@ jobs: - name: Setup Node.JS uses: ./.github/actions/nodejs - - name: Restore JS build artifacts - uses: strophy/actions-cache@opendal-update + - name: Download JS build artifacts + uses: actions/download-artifact@v4 with: - bucket: multi-runner-cache-x1xibo9c - root: actions-cache - path: build-js-artifacts-${{ github.sha }}.tar - key: build-js-artifacts/${{ github.sha }} - - - name: Unpack JS build artifacts archive - run: tar -xf build-js-artifacts-${{ github.sha }}.tar + name: js-build-${{ github.sha }} + path: packages - name: Create necessary dotenv files run: | diff --git a/.github/workflows/tests-rs-package.yml b/.github/workflows/tests-rs-package.yml index fa038285f2..b37d7b9a3f 100644 --- a/.github/workflows/tests-rs-package.yml +++ b/.github/workflows/tests-rs-package.yml @@ -5,14 +5,6 @@ on: description: The package name to run tests for type: string required: true - test-runner: - description: Runner for tests. Must be JSON valid string. - type: string - default: '[ "self-hosted", "linux", "arm64", "ubuntu-platform" ]' - lint-runner: - description: Runner for linting. Must be JSON valid string. - type: string - default: '"ubuntu-24.04"' check-each-feature: description: If true, try to build each individual feature for this crate type: boolean @@ -21,7 +13,7 @@ on: jobs: lint: name: Linting - runs-on: ${{ fromJSON(inputs.lint-runner) }} + runs-on: ubuntu-24.04 permissions: id-token: write contents: read @@ -188,7 +180,7 @@ jobs: test: name: Tests - runs-on: ${{ fromJSON(inputs.test-runner) }} + runs-on: ubuntu-24.04 timeout-minutes: 25 steps: - name: Check out repo @@ -218,9 +210,10 @@ jobs: ROCKSDB_LIB_DIR: "/opt/rocksdb/usr/local/lib" SNAPPY_STATIC: "/usr/lib/x86_64-linux-gnu/libsnappy.a" SNAPPY_LIB_DIR: "/usr/lib/x86_64-linux-gnu" + check_each_feature: name: Check each feature - runs-on: ${{ fromJSON(inputs.test-runner) }} + runs-on: ubuntu-24.04 timeout-minutes: 10 if: ${{ inputs.check-each-feature }} steps: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 46d368b0b2..5092d32ede 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,25 +36,6 @@ jobs: with: filters: .github/package-filters/rs-packages.yml - build-rust-deps: - name: Prebuild and cache some Rust dependencies - runs-on: ubuntu-24.04 - needs: - - changes - # run only if any changes were detected, eg. changes job returned non-empty list - if: ${{ needs.changes.outputs.rs-packages != '[]' }} - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.AWS_REGION }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - name: Precompile librocksdb - uses: ./.github/actions/librocksdb - build-js: name: Build JS packages if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }} @@ -88,7 +69,6 @@ jobs: name: Rust packages needs: - changes - - build-rust-deps secrets: inherit strategy: fail-fast: false @@ -97,13 +77,6 @@ jobs: uses: ./.github/workflows/tests-rs-package.yml with: package: ${{ matrix.rs-package }} - # lint-runner: ${{ contains(fromJSON('["drive-abci", "drive"]'), matrix.rs-package) && '[ "self-hosted", "linux", "arm64", "ubuntu-platform" ]' || '"ubuntu-24.04"' }} - # FIXME: Clippy fails on github hosted runners, most likely due to RAM usage. Using self-hosted runners for now. - # lint-runner: '[ "self-hosted", "linux", "arm64", "ubuntu-platform" ]' - lint-runner: '["ubuntu-24.04"]' - # Run drive tests on self-hosted 4x - # test-runner: '[ "self-hosted", "linux", "arm64", "ubuntu-platform" ]' - test-runner: '["ubuntu-24.04"]' check-each-feature: ${{ contains(fromJSON('["dash-sdk","rs-dapi-client","dapi-grpc","dpp","drive-abci"]'), matrix.rs-package) }} rs-crates-security: @@ -179,6 +152,7 @@ jobs: secrets: inherit needs: - changes + - build-js - build-images strategy: fail-fast: false diff --git a/.pnp.cjs b/.pnp.cjs index 0a13a010d1..e6e5c001ec 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -5633,7 +5633,7 @@ const RAW_RUNTIME_STATE = ["chalk", "npm:3.0.0"],\ ["ci-info", "npm:3.8.0"],\ ["clipanion", "virtual:ba24742e5bfaec41d1d0434e6865c2744ffb69a716f18fa84bd7d44084043647838926c96a391f66b9946857565b9825479e97ad07079ef40683084ce389d203#npm:3.2.0"],\ - ["cross-spawn", "npm:7.0.3"],\ + ["cross-spawn", "npm:7.0.5"],\ ["diff", "npm:5.1.0"],\ ["globby", "npm:11.1.0"],\ ["got", "npm:11.8.6"],\ @@ -5742,7 +5742,7 @@ const RAW_RUNTIME_STATE = ["@yarnpkg/parsers", "npm:3.0.0-rc.42"],\ ["chalk", "npm:3.0.0"],\ ["clipanion", "virtual:ba24742e5bfaec41d1d0434e6865c2744ffb69a716f18fa84bd7d44084043647838926c96a391f66b9946857565b9825479e97ad07079ef40683084ce389d203#npm:3.2.0"],\ - ["cross-spawn", "npm:7.0.3"],\ + ["cross-spawn", "npm:7.0.5"],\ ["fast-glob", "npm:3.2.12"],\ ["micromatch", "npm:4.0.7"],\ ["tslib", "npm:2.6.2"]\ @@ -8389,28 +8389,16 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/cache/cross-env-npm-7.0.3-96d81820f4-e99911f0d3.zip/node_modules/cross-env/",\ "packageDependencies": [\ ["cross-env", "npm:7.0.3"],\ - ["cross-spawn", "npm:7.0.3"]\ + ["cross-spawn", "npm:7.0.5"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["cross-spawn", [\ - ["npm:6.0.5", {\ - "packageLocation": "./.yarn/cache/cross-spawn-npm-6.0.5-2deab6c280-f07e643b48.zip/node_modules/cross-spawn/",\ - "packageDependencies": [\ - ["cross-spawn", "npm:6.0.5"],\ - ["nice-try", "npm:1.0.5"],\ - ["path-key", "npm:2.0.1"],\ - ["semver", "npm:7.5.3"],\ - ["shebang-command", "npm:1.2.0"],\ - ["which", "npm:1.3.1"]\ - ],\ - "linkType": "HARD"\ - }],\ - ["npm:7.0.3", {\ - "packageLocation": "./.yarn/cache/cross-spawn-npm-7.0.3-e4ff3e65b3-e1a13869d2.zip/node_modules/cross-spawn/",\ + ["npm:7.0.5", {\ + "packageLocation": "./.yarn/cache/cross-spawn-npm-7.0.5-cf92562a27-c95062469d.zip/node_modules/cross-spawn/",\ "packageDependencies": [\ - ["cross-spawn", "npm:7.0.3"],\ + ["cross-spawn", "npm:7.0.5"],\ ["path-key", "npm:3.1.1"],\ ["shebang-command", "npm:2.0.0"],\ ["which", "npm:2.0.2"]\ @@ -9692,7 +9680,7 @@ const RAW_RUNTIME_STATE = ["@ungap/structured-clone", "npm:1.2.0"],\ ["ajv", "npm:6.12.6"],\ ["chalk", "npm:4.1.2"],\ - ["cross-spawn", "npm:7.0.3"],\ + ["cross-spawn", "npm:7.0.5"],\ ["debug", "virtual:4b12ba5111caf7e8338099bdbc7cb046a9f8e079a44e74d0c03dca469876e3071ebbe671c5e90ae6b78ae33e22c205fa5ed32169a4aabd1404b13c56d09986e1#npm:4.3.4"],\ ["doctrine", "npm:3.0.0"],\ ["escape-string-regexp", "npm:4.0.0"],\ @@ -10226,7 +10214,7 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/cache/execa-npm-5.1.1-191347acf5-8ada91f2d7.zip/node_modules/execa/",\ "packageDependencies": [\ ["execa", "npm:5.1.1"],\ - ["cross-spawn", "npm:7.0.3"],\ + ["cross-spawn", "npm:7.0.5"],\ ["get-stream", "npm:6.0.1"],\ ["human-signals", "npm:2.1.0"],\ ["is-stream", "npm:2.0.1"],\ @@ -10637,7 +10625,7 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/cache/foreground-child-npm-2.0.0-80c976b61e-f36574ad8e.zip/node_modules/foreground-child/",\ "packageDependencies": [\ ["foreground-child", "npm:2.0.0"],\ - ["cross-spawn", "npm:7.0.3"],\ + ["cross-spawn", "npm:7.0.5"],\ ["signal-exit", "npm:3.0.7"]\ ],\ "linkType": "HARD"\ @@ -10646,7 +10634,7 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/cache/foreground-child-npm-3.1.1-77e78ed774-087edd4485.zip/node_modules/foreground-child/",\ "packageDependencies": [\ ["foreground-child", "npm:3.1.1"],\ - ["cross-spawn", "npm:7.0.3"],\ + ["cross-spawn", "npm:7.0.5"],\ ["signal-exit", "npm:4.1.0"]\ ],\ "linkType": "HARD"\ @@ -12425,7 +12413,7 @@ const RAW_RUNTIME_STATE = "packageDependencies": [\ ["istanbul-lib-processinfo", "npm:2.0.3"],\ ["archy", "npm:1.0.0"],\ - ["cross-spawn", "npm:7.0.3"],\ + ["cross-spawn", "npm:7.0.5"],\ ["istanbul-lib-coverage", "npm:3.2.2"],\ ["p-map", "npm:3.0.0"],\ ["rimraf", "npm:3.0.2"],\ @@ -14549,15 +14537,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["nice-try", [\ - ["npm:1.0.5", {\ - "packageLocation": "./.yarn/cache/nice-try-npm-1.0.5-963856b16f-0b4af3b5bb.zip/node_modules/nice-try/",\ - "packageDependencies": [\ - ["nice-try", "npm:1.0.5"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["nise", [\ ["npm:5.1.5", {\ "packageLocation": "./.yarn/cache/nise-npm-5.1.5-847a2de198-c6afe82b91.zip/node_modules/nise/",\ @@ -15675,7 +15654,7 @@ const RAW_RUNTIME_STATE = "packageDependencies": [\ ["password-prompt", "npm:1.1.2"],\ ["ansi-escapes", "npm:3.2.0"],\ - ["cross-spawn", "npm:6.0.5"]\ + ["cross-spawn", "npm:7.0.5"]\ ],\ "linkType": "HARD"\ }],\ @@ -15684,7 +15663,7 @@ const RAW_RUNTIME_STATE = "packageDependencies": [\ ["password-prompt", "npm:1.1.3"],\ ["ansi-escapes", "npm:4.3.2"],\ - ["cross-spawn", "npm:7.0.3"]\ + ["cross-spawn", "npm:7.0.5"]\ ],\ "linkType": "HARD"\ }]\ @@ -15742,13 +15721,6 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["path-key", [\ - ["npm:2.0.1", {\ - "packageLocation": "./.yarn/cache/path-key-npm-2.0.1-b1a971833d-6e654864e3.zip/node_modules/path-key/",\ - "packageDependencies": [\ - ["path-key", "npm:2.0.1"]\ - ],\ - "linkType": "HARD"\ - }],\ ["npm:3.1.1", {\ "packageLocation": "./.yarn/cache/path-key-npm-3.1.1-0e66ea8321-55cd7a9dd4.zip/node_modules/path-key/",\ "packageDependencies": [\ @@ -17205,14 +17177,6 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["shebang-command", [\ - ["npm:1.2.0", {\ - "packageLocation": "./.yarn/cache/shebang-command-npm-1.2.0-8990ba5d1d-9eed175030.zip/node_modules/shebang-command/",\ - "packageDependencies": [\ - ["shebang-command", "npm:1.2.0"],\ - ["shebang-regex", "npm:1.0.0"]\ - ],\ - "linkType": "HARD"\ - }],\ ["npm:2.0.0", {\ "packageLocation": "./.yarn/cache/shebang-command-npm-2.0.0-eb2b01921d-6b52fe8727.zip/node_modules/shebang-command/",\ "packageDependencies": [\ @@ -17223,13 +17187,6 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["shebang-regex", [\ - ["npm:1.0.0", {\ - "packageLocation": "./.yarn/cache/shebang-regex-npm-1.0.0-c3612b74e9-404c5a752c.zip/node_modules/shebang-regex/",\ - "packageDependencies": [\ - ["shebang-regex", "npm:1.0.0"]\ - ],\ - "linkType": "HARD"\ - }],\ ["npm:3.0.0", {\ "packageLocation": "./.yarn/cache/shebang-regex-npm-3.0.0-899a0cd65e-1a2bcae50d.zip/node_modules/shebang-regex/",\ "packageDependencies": [\ @@ -19248,7 +19205,7 @@ const RAW_RUNTIME_STATE = ["ultra-runner", "npm:3.10.5"],\ ["ansi-split", "npm:1.0.1"],\ ["chalk", "npm:4.1.2"],\ - ["cross-spawn", "npm:7.0.3"],\ + ["cross-spawn", "npm:7.0.5"],\ ["fast-glob", "npm:3.2.12"],\ ["globrex", "npm:0.1.2"],\ ["ignore", "npm:5.2.0"],\ diff --git a/.yarn/cache/cross-spawn-npm-6.0.5-2deab6c280-f07e643b48.zip b/.yarn/cache/cross-spawn-npm-6.0.5-2deab6c280-f07e643b48.zip deleted file mode 100644 index c48fb4ce05..0000000000 Binary files a/.yarn/cache/cross-spawn-npm-6.0.5-2deab6c280-f07e643b48.zip and /dev/null differ diff --git a/.yarn/cache/cross-spawn-npm-7.0.3-e4ff3e65b3-e1a13869d2.zip b/.yarn/cache/cross-spawn-npm-7.0.3-e4ff3e65b3-e1a13869d2.zip deleted file mode 100644 index 9aa6dc0d86..0000000000 Binary files a/.yarn/cache/cross-spawn-npm-7.0.3-e4ff3e65b3-e1a13869d2.zip and /dev/null differ diff --git a/.yarn/cache/cross-spawn-npm-7.0.5-cf92562a27-c95062469d.zip b/.yarn/cache/cross-spawn-npm-7.0.5-cf92562a27-c95062469d.zip new file mode 100644 index 0000000000..afb750a5c2 Binary files /dev/null and b/.yarn/cache/cross-spawn-npm-7.0.5-cf92562a27-c95062469d.zip differ diff --git a/.yarn/cache/nice-try-npm-1.0.5-963856b16f-0b4af3b5bb.zip b/.yarn/cache/nice-try-npm-1.0.5-963856b16f-0b4af3b5bb.zip deleted file mode 100644 index e022a139d6..0000000000 Binary files a/.yarn/cache/nice-try-npm-1.0.5-963856b16f-0b4af3b5bb.zip and /dev/null differ diff --git a/.yarn/cache/path-key-npm-2.0.1-b1a971833d-6e654864e3.zip b/.yarn/cache/path-key-npm-2.0.1-b1a971833d-6e654864e3.zip deleted file mode 100644 index a643be7be9..0000000000 Binary files a/.yarn/cache/path-key-npm-2.0.1-b1a971833d-6e654864e3.zip and /dev/null differ diff --git a/.yarn/cache/shebang-command-npm-1.2.0-8990ba5d1d-9eed175030.zip b/.yarn/cache/shebang-command-npm-1.2.0-8990ba5d1d-9eed175030.zip deleted file mode 100644 index 9b734d105d..0000000000 Binary files a/.yarn/cache/shebang-command-npm-1.2.0-8990ba5d1d-9eed175030.zip and /dev/null differ diff --git a/.yarn/cache/shebang-regex-npm-1.0.0-c3612b74e9-404c5a752c.zip b/.yarn/cache/shebang-regex-npm-1.0.0-c3612b74e9-404c5a752c.zip deleted file mode 100644 index 607d724c33..0000000000 Binary files a/.yarn/cache/shebang-regex-npm-1.0.0-c3612b74e9-404c5a752c.zip and /dev/null differ diff --git a/Dockerfile b/Dockerfile index d03f82d895..db39e6476c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -181,7 +181,7 @@ RUN <> /root/env # AWS_SECRET_ACCESS_KEY is a secret so we load it using ONBUILD ARG later on echo "export SCCACHE_BUCKET='${SCCACHE_BUCKET}'" >> /root/env - echo "export SCCACHE_S3_USE_SSL=true" >> /root/env +# echo "export SCCACHE_S3_USE_SSL=true" >> /root/env echo "export SCCACHE_S3_KEY_PREFIX='${SCCACHE_S3_KEY_PREFIX}/${TARGETARCH}/linux-musl'" >> /root/env elif [ -n "${SCCACHE_MEMCACHED}" ]; then # memcached @@ -310,13 +310,20 @@ COPY --from=build-planner /platform/recipe.json recipe.json RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ --mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \ --mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \ - --mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \ + #--mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \ + set -ex; \ + if [[ "${CARGO_BUILD_PROFILE}" == "release" ]] ; then \ + mv .cargo/config-release.toml .cargo/config.toml; \ + else \ + export FEATURES_FLAG="--features=console,grovedbg" ; \ + fi && \ source $HOME/.cargo/env && \ source /root/env && \ cargo chef cook \ --recipe-path recipe.json \ --profile "$CARGO_BUILD_PROFILE" \ --package drive-abci \ + ${FEATURES_FLAG} \ --locked && \ if [[ -x /usr/bin/sccache ]]; then sccache --show-stats; fi @@ -328,7 +335,7 @@ RUN mkdir /artifacts RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ --mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \ --mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \ - --mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \ + set -ex; \ source $HOME/.cargo/env && \ source /root/env && \ if [[ "${CARGO_BUILD_PROFILE}" == "release" ]] ; then \ @@ -344,6 +351,8 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM ${FEATURES_FLAG} \ --locked && \ cp /platform/target/${OUT_DIRECTORY}/drive-abci /artifacts/ && \ + # Remove target directory to save space + rm -rf target && \ if [[ -x /usr/bin/sccache ]]; then sccache --show-stats; fi # @@ -359,7 +368,6 @@ COPY --from=build-planner /platform/recipe.json recipe.json RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ --mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \ --mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \ - --mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \ source $HOME/.cargo/env && \ source /root/env && \ cargo chef cook \ @@ -375,7 +383,6 @@ COPY . . RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ --mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \ --mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \ - --mount=type=cache,sharing=shared,id=target_wasm,target=/platform/target \ --mount=type=cache,sharing=shared,id=unplugged_${TARGETARCH},target=/tmp/unplugged \ source $HOME/.cargo/env && \ source /root/env && \ @@ -384,6 +391,8 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM cp -R /platform/.yarn/unplugged /tmp/ && \ export SKIP_GRPC_PROTO_BUILD=1 && \ yarn build && \ + # Remove target directory to save space + rm -rf target && \ if [[ -x /usr/bin/sccache ]]; then sccache --show-stats; fi # diff --git a/package.json b/package.json index bb50d240c5..0c004c2077 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,8 @@ "ws": "^8.17.1", "body-parser": "^1.20.3", "path-to-regexp": "^1.9.0", - "cookie": "^0.7.0" + "cookie": "^0.7.0", + "cross-spawn": "^7.0.5" }, "dependencies": { "node-gyp": "^10.0.1" diff --git a/packages/rs-drive-abci/src/lib.rs b/packages/rs-drive-abci/src/lib.rs index 5e475d189a..f9a51dcd1b 100644 --- a/packages/rs-drive-abci/src/lib.rs +++ b/packages/rs-drive-abci/src/lib.rs @@ -30,8 +30,10 @@ pub mod rpc; /// Core utilities pub mod core; + /// Metrics subsystem pub mod metrics; + /// Test helpers and fixtures #[cfg(any(feature = "mocks", test))] pub mod test; diff --git a/packages/rs-drive-abci/src/metrics.rs b/packages/rs-drive-abci/src/metrics.rs index 943f0d5aae..ec77b07467 100644 --- a/packages/rs-drive-abci/src/metrics.rs +++ b/packages/rs-drive-abci/src/metrics.rs @@ -11,7 +11,7 @@ use metrics_exporter_prometheus::PrometheusBuilder; /// Default Prometheus port (29090) pub const DEFAULT_PROMETHEUS_PORT: u16 = 29090; - +/// Last block time in seconds const COUNTER_LAST_BLOCK_TIME: &str = "abci_last_block_time_seconds"; const COUNTER_LAST_HEIGHT: &str = "abci_last_finalized_height"; const HISTOGRAM_FINALIZED_ROUND: &str = "abci_finalized_round"; diff --git a/packages/wasm-dpp/src/lib.rs b/packages/wasm-dpp/src/lib.rs index 6d0aa9c50c..8d815ed6c2 100644 --- a/packages/wasm-dpp/src/lib.rs +++ b/packages/wasm-dpp/src/lib.rs @@ -19,6 +19,7 @@ mod identifier; mod identity; mod metadata; // mod state_repository; +/// State transitions pub mod state_transition; // mod version; diff --git a/yarn.lock b/yarn.lock index 08923aac7f..1ea5015fe3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6273,27 +6273,14 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:7.0.3, cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": - version: 7.0.3 - resolution: "cross-spawn@npm:7.0.3" +"cross-spawn@npm:^7.0.5": + version: 7.0.5 + resolution: "cross-spawn@npm:7.0.5" dependencies: path-key: "npm:^3.1.0" shebang-command: "npm:^2.0.0" which: "npm:^2.0.1" - checksum: e1a13869d2f57d974de0d9ef7acbf69dc6937db20b918525a01dacb5032129bd552d290d886d981e99f1b624cb03657084cc87bd40f115c07ecf376821c729ce - languageName: node - linkType: hard - -"cross-spawn@npm:^6.0.5": - version: 6.0.5 - resolution: "cross-spawn@npm:6.0.5" - dependencies: - nice-try: "npm:^1.0.4" - path-key: "npm:^2.0.1" - semver: "npm:^5.5.0" - shebang-command: "npm:^1.2.0" - which: "npm:^1.2.9" - checksum: f07e643b4875f26adffcd7f13bc68d9dff20cf395f8ed6f43a23f3ee24fc3a80a870a32b246fd074e514c8fd7da5f978ac6a7668346eec57aa87bac89c1ed3a1 + checksum: c95062469d4bdbc1f099454d01c0e77177a3733012d41bf907a71eb8d22d2add43b5adf6a0a14ef4e7feaf804082714d6c262ef4557a1c480b86786c120d18e2 languageName: node linkType: hard @@ -11450,13 +11437,6 @@ __metadata: languageName: node linkType: hard -"nice-try@npm:^1.0.4": - version: 1.0.5 - resolution: "nice-try@npm:1.0.5" - checksum: 0b4af3b5bb5d86c289f7a026303d192a7eb4417231fe47245c460baeabae7277bcd8fd9c728fb6bd62c30b3e15cd6620373e2cf33353b095d8b403d3e8a15aff - languageName: node - linkType: hard - "nise@npm:^5.1.5": version: 5.1.5 resolution: "nise@npm:5.1.5" @@ -12566,13 +12546,6 @@ __metadata: languageName: node linkType: hard -"path-key@npm:^2.0.1": - version: 2.0.1 - resolution: "path-key@npm:2.0.1" - checksum: 6e654864e34386a2a8e6bf72cf664dcabb76574dd54013add770b374384d438aca95f4357bb26935b514a4e4c2c9b19e191f2200b282422a76ee038b9258c5e7 - languageName: node - linkType: hard - "path-key@npm:^3.0.0, path-key@npm:^3.1.0": version: 3.1.1 resolution: "path-key@npm:3.1.1" @@ -13893,15 +13866,6 @@ __metadata: languageName: node linkType: hard -"shebang-command@npm:^1.2.0": - version: 1.2.0 - resolution: "shebang-command@npm:1.2.0" - dependencies: - shebang-regex: "npm:^1.0.0" - checksum: 9eed1750301e622961ba5d588af2212505e96770ec376a37ab678f965795e995ade7ed44910f5d3d3cb5e10165a1847f52d3348c64e146b8be922f7707958908 - languageName: node - linkType: hard - "shebang-command@npm:^2.0.0": version: 2.0.0 resolution: "shebang-command@npm:2.0.0" @@ -13911,13 +13875,6 @@ __metadata: languageName: node linkType: hard -"shebang-regex@npm:^1.0.0": - version: 1.0.0 - resolution: "shebang-regex@npm:1.0.0" - checksum: 404c5a752cd40f94591dfd9346da40a735a05139dac890ffc229afba610854d8799aaa52f87f7e0c94c5007f2c6af55bdcaeb584b56691926c5eaf41dc8f1372 - languageName: node - linkType: hard - "shebang-regex@npm:^3.0.0": version: 3.0.0 resolution: "shebang-regex@npm:3.0.0" @@ -16047,7 +16004,7 @@ __metadata: languageName: node linkType: hard -"which@npm:^1.2.1, which@npm:^1.2.9": +"which@npm:^1.2.1": version: 1.3.1 resolution: "which@npm:1.3.1" dependencies: