Skip to content

Amber CLI 2.0.19

Latest

Choose a tag to compare

@crimson-knight crimson-knight released this 29 Nov 18:32
4da80e0

What changed

  • SQLite apps run on Grant's own SQLite engine (#82). amber new -d sqlite writes
    require "grant/adapter/sqlite/grant_engine" in config/database.cr, so a generated SQLite app
    links no C SQLite library: on macOS otool -L lists only /usr/lib/libSystem.B.dylib, and on
    Linux ldd lists only libc, libm, libgcc_s and the loader. The engine reads and writes the same
    database files as C SQLite, so the files open in the sqlite3 tool. The engine passed a 72-hour
    durability soak with 0 lost commits out of 727,228.
  • amber database runs on the same engine, so the amber binary links no libsqlite3.
  • Beryl is the only TLS backend; the -Duse_openssl opt-out is removed. Amber, Grant's
    PostgreSQL driver and crystal-mysql now serve and connect over Beryl TLS 1.3 only. A build that
    still passes -Duse_openssl gets Beryl and links no OpenSSL. A server or client that stops at
    TLS 1.2 is refused. An app that used the flag to reach a TLS 1.2 database upgrades the server to
    TLS 1.3, or stays on Amber CLI 2.0.18 and its pins.
  • New apps pin the release set (each by commit, with its sha256-v2 checksum checked in
    shard.lock):
    • Amber 2.0.0-beta.17 (500af63dc8b3b30d796b8564653b04b6181be813): Beryl is its only TLS
      backend, with Beryl 0.2.5 vendored, and a WebSocket heartbeat that finds a dead connection runs the full
      disconnect cleanup (amber#1491).
    • Grant 0.30.0 (90b542bc7e20828834ec945941b560a676e5d3ba): the PostgreSQL driver on Beryl
      only, Beryl 0.2.5 vendored, and the engine's Windows support, C-parity fixes and C-shaped
      rollback journals from 0.29.0.
    • asset_pipeline 0.41.0 (29afae38c14f82c61084dbf88cd0f2b8db169afd): Brotli in the page
      cache by default on Mica (-Dasset_pipeline_brotli is removed), and a BREACH guard that serves an uncompressed copy to cross-site
      requests that are not navigations.
    • crystal-mysql 0.19.0 (042276c90d2936a13002aec46e11d25830a7611b, -d mysql apps):
      TLS 1.3 and the password exchanges on Beryl only.
    • Beryl 0.2.5 (cc0948fd41b9026ceed2a60e601b8e3088d9a6f2, through crystal-mysql and native
      apps): faster AES-GCM, ChaCha20, SHA-512, MD5, RSA and P-256 on x86-64, X25519 on x86-64 and
      AArch64, and TCP_NODELAY on the sockets a Beryl TLS server accepts.
  • The CLI itself builds on the same set: Grant 0.30.0, asset_pipeline 0.41.0, crystal-mysql 0.19.0
    and Beryl 0.2.5 (which amber encrypt uses).
  • amber new now checks the crystal-mysql and Beryl entries of a -d mysql app's shard.lock (version, commit and sha256-v2 checksum) as it already did for Amber, Grant and asset_pipeline, and a native app's make verify-lock checks them whenever its lock carries them.
  • amber build --target-tier (#80) and exact Grant::Decimal128 and Grant::Money fields (#81).

Switching an app back to C SQLite (one line)

In config/database.cr, change

require "grant/adapter/sqlite/grant_engine"

to

require "grant/adapter/sqlite"

The app then links the system's libsqlite3 (install its development package on Linux). The
database files stay the same, so switching either way keeps your data. This switch is supported
for this release.

Upgrading an existing app

Apps generated by 2.0.18 or earlier keep their pins and C SQLite; nothing changes on upgrade. To
move one to this release set, pin the commits above in shard.yml and run
minecart update amber grant asset_pipeline (add mysql for a MySQL app). To move a SQLite app
onto Grant's engine, change its require "grant/adapter/sqlite" to
require "grant/adapter/sqlite/grant_engine". Remove -Duse_openssl from build commands; it no
longer changes anything.

Also on upgrade (from the libraries this release pins):

  • Beryl 0.2.4 and later: a failed decrypt(..., into:) now zeroes the into: buffer. Code that read that buffer after a failed decrypt gets zeros.
  • asset_pipeline 0.41.0: the page cache stores Brotli by default through Mica, and -Dasset_pipeline_brotli is gone. An app on Crystal 1.10 to 1.20 that used the flag to serve br moves to Crystal 1.21 or newer to keep serving it.
  • Amber 2.0.0-beta.17: accepted connections get TCP_NODELAY, compressed responses are guarded against BREACH, and the mailer writes its headers where mail servers expect them.

Release commit

Commit: 4da80e0beb5fad6c7e9cafcc02807f996bd59855
Tree: 12d8a00d0bde5784080370ca457f5c555180fdc1
Source archive: amber_cli-source-2.0.19.tar.gz (git archive --format=tar.gz --prefix=amber_cli-2.0.19/ 4da80e0beb5fad6c7e9cafcc02807f996bd59855)
Source archive sha256: 15b543320d3a7993bc7d3d05a224b097525f0fd86a0eabbe16cb655d43c38710

The source archive was built twice locally and once by the release workflow's dry run (run 46294416514, all builds green), and all three gave the same sha256. The release workflow attaches the archive, its .sha256 sidecar and the binaries below.

Amber CLI v2.0.19

Release commit: 4da80e0beb5fad6c7e9cafcc02807f996bd59855

Archive SHA-256 values:

Archive SHA-256
amber_cli-source-2.0.19.tar.gz 15b543320d3a7993bc7d3d05a224b097525f0fd86a0eabbe16cb655d43c38710
amber_cli-darwin-arm64.tar.gz: OK
amber_cli-darwin-arm64.tar.gz 8a6e0e6a325808b1ee0c290b407a36495c1c8c25c51eb3ee433ac9cb3bc47bfe
amber_cli-linux-x86_64.tar.gz: OK
amber_cli-linux-x86_64.tar.gz 19edb22cb2bf95d31b4c7d15f3f13ae218bbb70434d180c3b948f81303ba4e4f
amber_cli-linux-arm64.tar.gz: OK
amber_cli-linux-arm64.tar.gz ecd800781b46830f0bc54b549973072383ee5686750bda8ce2dbe2cd5922c696

Verification

Tag: v2.0.19 (annotated tag object 035a384d3335f3f947c1859557a744acc7141bfb)
Commit: 4da80e0beb5fad6c7e9cafcc02807f996bd59855
Tree: 12d8a00d0bde5784080370ca457f5c555180fdc1
Release asset amber_cli-source-2.0.19.tar.gz sha256: 15b543320d3a7993bc7d3d05a224b097525f0fd86a0eabbe16cb655d43c38710 (built twice, equal; downloaded again after upload, equal; sidecar amber_cli-source-2.0.19.tar.gz.sha256 equal)
GitHub source archive https://github.com/amberframework/amber_cli/archive/refs/tags/v2.0.19.tar.gz sha256: 6978c00fef69c29a0c790d12c32b6c72bd8cce79f2ecd83a1a72d26081e6c479 (downloaded twice, equal; git get-tar-commit-id 4da80e0beb5fad6c7e9cafcc02807f996bd59855)