From 54e2a54ecb76652d2a136f00eb7923c8cfa00719 Mon Sep 17 00:00:00 2001 From: Leeingnyo Date: Sun, 15 Aug 2021 14:37:19 +0900 Subject: [PATCH 1/7] Update cyrstal-lang, libraries --- shard.lock | 26 +++++++++++++------------- shard.yml | 4 +--- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/shard.lock b/shard.lock index 13ce55d..157b6b3 100644 --- a/shard.lock +++ b/shard.lock @@ -2,7 +2,7 @@ version: 2.0 shards: ameba: git: https://github.com/crystal-ameba/ameba.git - version: 0.14.0 + version: 0.14.3 archive: git: https://github.com/hkalexling/archive.cr.git @@ -10,23 +10,23 @@ shards: baked_file_system: git: https://github.com/schovi/baked_file_system.git - version: 0.9.8+git.commit.fb3091b546797fbec3c25dc0e1e2cff60bb9033b + version: 0.10.0 clim: git: https://github.com/at-grandpa/clim.git - version: 0.12.0 + version: 0.17.1 db: git: https://github.com/crystal-lang/crystal-db.git - version: 0.9.0 + version: 0.10.1 duktape: git: https://github.com/jessedoyle/duktape.cr.git - version: 0.20.0 + version: 1.0.0 exception_page: git: https://github.com/crystal-loot/exception_page.git - version: 0.1.4 + version: 0.1.5 http_proxy: git: https://github.com/mamantoha/http_proxy.git @@ -38,15 +38,15 @@ shards: kemal: git: https://github.com/kemalcr/kemal.git - version: 0.27.0 + version: 1.0.0 kemal-session: git: https://github.com/kemalcr/kemal-session.git - version: 0.13.0 + version: 1.0.0 kilt: git: https://github.com/jeromegn/kilt.git - version: 0.4.0 + version: 0.4.1 koa: git: https://github.com/hkalexling/koa.git @@ -58,11 +58,11 @@ shards: mg: git: https://github.com/hkalexling/mg.git - version: 0.3.0+git.commit.a19417abf03eece80039f89569926cff1ce3a1a3 + version: 0.5.0+git.commit.697e46e27cde8c3969346e228e372db2455a6264 myhtml: git: https://github.com/kostya/myhtml.git - version: 1.5.1 + version: 1.5.8 open_api: git: https://github.com/jreinert/open_api.cr.git @@ -70,11 +70,11 @@ shards: radix: git: https://github.com/luislavena/radix.git - version: 0.3.9 + version: 0.4.1 sqlite3: git: https://github.com/crystal-lang/crystal-sqlite3.git - version: 0.16.0 + version: 0.18.0 tallboy: git: https://github.com/epoch/tallboy.git diff --git a/shard.yml b/shard.yml index 3991a13..1b7f7b3 100644 --- a/shard.yml +++ b/shard.yml @@ -8,7 +8,7 @@ targets: mango: main: src/mango.cr -crystal: 0.36.1 +crystal: 1.0.0 license: MIT @@ -21,7 +21,6 @@ dependencies: github: crystal-lang/crystal-sqlite3 baked_file_system: github: schovi/baked_file_system - version: 0.9.8+git.commit.fb3091b546797fbec3c25dc0e1e2cff60bb9033b archive: github: hkalexling/archive.cr ameba: @@ -30,7 +29,6 @@ dependencies: github: at-grandpa/clim duktape: github: jessedoyle/duktape.cr - version: ~> 0.20.0 myhtml: github: kostya/myhtml http_proxy: From 208019a0b9e99f016f6a979c7d40e0b6cdf72028 Mon Sep 17 00:00:00 2001 From: Leeingnyo Date: Sun, 15 Aug 2021 17:59:26 +0900 Subject: [PATCH 2/7] Update Docker image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6e5f3d8..46c28d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM crystallang/crystal:0.36.1-alpine AS builder +FROM crystallang/crystal:1.0.0-alpine AS builder WORKDIR /Mango From a21681a6d782fb327dbcf39875167b3e82188ad2 Mon Sep 17 00:00:00 2001 From: Leeingnyo Date: Mon, 16 Aug 2021 13:23:58 +0900 Subject: [PATCH 3/7] Update a container version of bulid workflow --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bbf1395..8c74353 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest container: - image: crystallang/crystal:0.36.1-alpine + image: crystallang/crystal:1.0.0-alpine steps: - uses: actions/checkout@v2 From d7efe1e553dcc4d2ecf3ec8d3a1b73f95117ae11 Mon Sep 17 00:00:00 2001 From: Leeingnyo Date: Wed, 18 Aug 2021 19:42:32 +0900 Subject: [PATCH 4/7] Use yaml-static in Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 46c28d7..5b24dbe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM crystallang/crystal:1.0.0-alpine AS builder WORKDIR /Mango COPY . . -RUN apk add --no-cache yarn yaml sqlite-static libarchive-dev libarchive-static acl-static expat-static zstd-static lz4-static bzip2-static libjpeg-turbo-dev libpng-dev tiff-dev +RUN apk add --no-cache yarn yaml-static sqlite-static libarchive-dev libarchive-static acl-static expat-static zstd-static lz4-static bzip2-static libjpeg-turbo-dev libpng-dev tiff-dev RUN make static || make static FROM library/alpine From 864435d3f90202d0dd88e28785e6e09675fa38f2 Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Fri, 20 Aug 2021 07:15:16 +0000 Subject: [PATCH 5/7] Upgrade dependencies for Crystal 1.0.0 --- shard.lock | 12 ++++++------ shard.yml | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/shard.lock b/shard.lock index 28cb12a..df6fc4c 100644 --- a/shard.lock +++ b/shard.lock @@ -6,7 +6,7 @@ shards: archive: git: https://github.com/hkalexling/archive.cr.git - version: 0.4.0 + version: 0.5.0 baked_file_system: git: https://github.com/schovi/baked_file_system.git @@ -34,7 +34,7 @@ shards: image_size: git: https://github.com/hkalexling/image_size.cr.git - version: 0.4.0 + version: 0.5.0 kemal: git: https://github.com/kemalcr/kemal.git @@ -50,7 +50,7 @@ shards: koa: git: https://github.com/hkalexling/koa.git - version: 0.7.0 + version: 0.8.0 mg: git: https://github.com/hkalexling/mg.git @@ -61,8 +61,8 @@ shards: version: 1.5.8 open_api: - git: https://github.com/jreinert/open_api.cr.git - version: 1.2.1+git.commit.95e4df2ca10b1fe88b8b35c62a18b06a10267b6c + git: https://github.com/hkalexling/open_api.cr.git + version: 1.2.1+git.commit.1d3c55dd5534c6b0af18964d031858a08515553a radix: git: https://github.com/luislavena/radix.git @@ -74,5 +74,5 @@ shards: tallboy: git: https://github.com/epoch/tallboy.git - version: 0.9.3 + version: 0.9.3+git.commit.9be1510bb0391c95e92f1b288f3afb429a73caa6 diff --git a/shard.yml b/shard.yml index 0598146..75a2f48 100644 --- a/shard.yml +++ b/shard.yml @@ -39,5 +39,6 @@ dependencies: github: hkalexling/koa tallboy: github: epoch/tallboy + branch: master mg: github: hkalexling/mg From 995ca3b40f0b78b106663c25e3f89d00c265ba4b Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Fri, 20 Aug 2021 08:26:11 +0000 Subject: [PATCH 6/7] Update ARM Dockerfile --- Dockerfile.arm32v7 | 8 ++++---- Dockerfile.arm64v8 | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index 5a31a26..8f58631 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 @@ -2,10 +2,10 @@ FROM arm32v7/ubuntu:18.04 RUN apt-get update && apt-get install -y wget git make llvm-8 llvm-8-dev g++ libsqlite3-dev libyaml-dev libgc-dev libssl-dev libcrypto++-dev libevent-dev libgmp-dev zlib1g-dev libpcre++-dev pkg-config libarchive-dev libxml2-dev libacl1-dev nettle-dev liblzo2-dev liblzma-dev libbz2-dev libjpeg-turbo8-dev libpng-dev libtiff-dev -RUN git clone https://github.com/crystal-lang/crystal && cd crystal && git checkout 0.36.1 && make deps && cd .. -RUN git clone https://github.com/kostya/myhtml && cd myhtml/src/ext && git checkout v1.5.0 && make && cd .. -RUN git clone https://github.com/jessedoyle/duktape.cr && cd duktape.cr/ext && git checkout v0.20.0 && make && cd .. -RUN git clone https://github.com/hkalexling/image_size.cr && cd image_size.cr && git checkout v0.2.0 && make && cd .. +RUN git clone https://github.com/crystal-lang/crystal && cd crystal && git checkout 1.0.0 && make deps && cd .. +RUN git clone https://github.com/kostya/myhtml && cd myhtml/src/ext && git checkout v1.5.8 && make && cd .. +RUN git clone https://github.com/jessedoyle/duktape.cr && cd duktape.cr/ext && git checkout v1.0.0 && make && cd .. +RUN git clone https://github.com/hkalexling/image_size.cr && cd image_size.cr && git checkout v0.5.0 && make && cd .. COPY mango-arm32v7.o . diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 index 3cd5939..29045cf 100644 --- a/Dockerfile.arm64v8 +++ b/Dockerfile.arm64v8 @@ -2,10 +2,10 @@ FROM arm64v8/ubuntu:18.04 RUN apt-get update && apt-get install -y wget git make llvm-8 llvm-8-dev g++ libsqlite3-dev libyaml-dev libgc-dev libssl-dev libcrypto++-dev libevent-dev libgmp-dev zlib1g-dev libpcre++-dev pkg-config libarchive-dev libxml2-dev libacl1-dev nettle-dev liblzo2-dev liblzma-dev libbz2-dev libjpeg-turbo8-dev libpng-dev libtiff-dev -RUN git clone https://github.com/crystal-lang/crystal && cd crystal && git checkout 0.36.1 && make deps && cd .. -RUN git clone https://github.com/kostya/myhtml && cd myhtml/src/ext && git checkout v1.5.0 && make && cd .. -RUN git clone https://github.com/jessedoyle/duktape.cr && cd duktape.cr/ext && git checkout v0.20.0 && make && cd .. -RUN git clone https://github.com/hkalexling/image_size.cr && cd image_size.cr && git checkout v0.2.0 && make && cd .. +RUN git clone https://github.com/crystal-lang/crystal && cd crystal && git checkout 1.0.0 && make deps && cd .. +RUN git clone https://github.com/kostya/myhtml && cd myhtml/src/ext && git checkout v1.5.8 && make && cd .. +RUN git clone https://github.com/jessedoyle/duktape.cr && cd duktape.cr/ext && git checkout v1.0.0 && make && cd .. +RUN git clone https://github.com/hkalexling/image_size.cr && cd image_size.cr && git checkout v0.5.0 && make && cd .. COPY mango-arm64v8.o . From efc547f5b2cee9d7b83546460b50d70621d08d87 Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Sun, 22 Aug 2021 07:34:29 +0000 Subject: [PATCH 7/7] Fix "Executing query" spam in log --- src/logger.cr | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/logger.cr b/src/logger.cr index d434cfa..040e5aa 100644 --- a/src/logger.cr +++ b/src/logger.cr @@ -34,7 +34,11 @@ class Logger end @backend.formatter = Log::Formatter.new &format_proc - Log.setup @@severity, @backend + + Log.setup do |c| + c.bind "*", @@severity, @backend + c.bind "db.*", :error, @backend + end end def self.get_severity(level = "") : Log::Severity