HomePhabricator

[ecash-agora] Pin the dependencies with updated dockerfile

Description

[ecash-agora] Pin the dependencies with updated dockerfile

Summary:
Yet another iteration on this but this time confirmed with local build and debug logs.

We can still pin these versions, so we should.

imo we should leave these debug logs in case there are future issues with CI, e.g. could happen if a diff lands that updates 2 modules at once, may need to see what dep got in.

Test Plan:

docker build --progress=plain -f ecash-agora.Dockerfile -t ecash-agora_local .

Output (confirms we get the latest versions and not local versions)

#0 building with "default" instance using docker driver

#1 [internal] load build definition from ecash-agora.Dockerfile
#1 transferring dockerfile: 1.43kB done
#1 DONE 0.0s

#2 [internal] load metadata for docker.io/library/node:22-bookworm-slim
#2 DONE 2.7s

#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [1/5] FROM docker.io/library/node:22-bookworm-slim@sha256:7e3a5fac109e00e9f2616cd24f5227e2eb0d473bf33b98d661b0c1862f6bfbbd
#4 DONE 0.0s

#5 [internal] load build context
#5 transferring context: 951.95kB 0.1s done
#5 DONE 0.1s

#6 [2/5] WORKDIR /app/modules/ecash-agora
#6 CACHED

#7 [3/5] COPY modules/ecash-agora .
#7 DONE 0.4s

#8 [4/5] RUN ECLIB_VERSION=$(npm view ecash-lib version)     && CCLIENT_VERSION=$(npm view chronik-client version)     && EWALLET_VERSION=$(npm view ecash-wallet version)     && echo "Latest versions from npm:"     && echo "  ecash-lib: $ECLIB_VERSION"     && echo "  chronik-client: $CCLIENT_VERSION"     && echo "  ecash-wallet: $EWALLET_VERSION"     && npm pkg set dependencies.ecash-lib=$ECLIB_VERSION     && npm pkg set dependencies.chronik-client=$CCLIENT_VERSION     && npm pkg set dependencies.ecash-wallet=$EWALLET_VERSION     && echo "Updated package.json dependencies:"     && cat package.json | grep -A 5 '"dependencies"'
#8 4.790 Latest versions from npm:
#8 4.790   ecash-lib: 4.5.1
#8 4.790   chronik-client: 3.4.1
#8 4.790   ecash-wallet: 2.2.0
#8 4.971 Updated package.json dependencies:
#8 4.972     "dependencies": {
#8 4.972         "chronik-client": "3.4.1",
#8 4.972         "ecash-lib": "4.5.1",
#8 4.972         "ecash-wallet": "2.2.0"
#8 4.972     }
#8 4.972 }
#8 DONE 5.0s

#9 [5/5] RUN rm -f package-lock.json     && npm install     && npm run build
#9 7.044
#9 7.044 added 41 packages, changed 3 packages, and audited 315 packages in 7s
#9 7.044
#9 7.044 43 packages are looking for funding
#9 7.044   run `npm fund` for details
#9 7.047
#9 7.047 7 vulnerabilities (1 low, 5 moderate, 1 high)
#9 7.047
#9 7.047 To address all issues, run:
#9 7.047   npm audit fix
#9 7.047
#9 7.047 Run `npm audit` for details.
#9 7.136
#9 7.136 > ecash-agora@2.6.3 build
#9 7.136 > tsc && tsc -p ./tsconfig.build.json
#9 7.136
#9 DONE 10.2s

#10 exporting to image
#10 exporting layers
#10 exporting layers 0.3s done
#10 writing image sha256:dcca77ce4b5f49de525a11894ad54cdac51e898e91af481a16b69a7c119abdd2 done
#10 naming to docker.io/library/ecash-agora_local done
#10 DONE 0.3s

Output:

docker run --rm ecash-agora_local cat /app/modules/ecash-agora/package.json
{
    "name": "ecash-agora",
    "version": "2.6.2",
    "description": "Library for interacting with the eCash Agora protocol",
    "main": "./dist/index.js",
    "scripts": {
        "build": "tsc && tsc -p ./tsconfig.build.json",
        "test": "mocha --import=tsx ./src/*.test.ts ./src/**/*.test.ts",
        "integration-tests": "mocha --import=tsx ./tests/*.test.ts --timeout 60000",
        "coverage": "nyc npm run test",
        "junit": "npm run test --reporter mocha-junit-reporter"
    },
    "repository": {
        "type": "git",
        "url": "git+https://github.com/Bitcoin-ABC/bitcoin-abc.git",
        "directory": "modules/ecash-agora"
    },
    "keywords": [
        "ecash",
        "xec",
        "bitcoin"
    ],
    "author": "Bitcoin ABC",
    "license": "MIT",
    "bugs": {
        "url": "https://github.com/Bitcoin-ABC/bitcoin-abc/issues"
    },
    "homepage": "https://github.com/Bitcoin-ABC/bitcoin-abc#readme",
    "devDependencies": {
        "@istanbuljs/nyc-config-typescript": "^1.0.2",
        "@types/chai": "^4.3.14",
        "@types/chai-as-promised": "^7.1.8",
        "@types/mocha": "^10.0.6",
        "@types/node": "^20.12.7",
        "chai": "^4.4.1",
        "chai-as-promised": "^7.1.1",
        "mocha": "^10.4.0",
        "mocha-junit-reporter": "^2.2.1",
        "nyc": "^15.1.0",
        "source-map-support": "^0.5.21",
        "ts-node": "^10.9.2",
        "tsx": "^4.7.2",
        "typescript": "^5.4.3"
    },
    "dependencies": {
        "chronik-client": "3.4.1",
        "ecash-lib": "4.5.1",
        "ecash-wallet": "2.2.0"
    }
}

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D18857

Details

Provenance
bytesofmanAuthored on Fri, Oct 31, 14:58
bytesofmanPushed on Fri, Oct 31, 17:01
Reviewer
Restricted Project
Differential Revision
D18857: [ecash-agora] Pin the dependencies with updated dockerfile
Parents
rABC08f19c9d2fc5: [ecash-agora] Patch dockerfile again, bump version
Branches
Unknown
Tags
Unknown