Home Quick start All builds News Donations
More
Log In
Light Theme Docs
Workers

SparrowCI Report - gh-melezhik-protocol-postgres | [image: melezhik/sparrow:alpine]

  • Summary
  • Pipeline YAML
  • Report
BuildID: 2478
Status: FAIL
Image: melezhik/sparrow:alpine
Worker status: OK
---
Date: 06.01.2023 @ 02:57
Time elapsed: 133 sec
---
SCM: https://github.com/melezhik/protocol-postgres.git
Git sha: 67a6bbd
Git comment: Update sparrow.yaml
tasks:
  -
    name: int-test
    default: true
    language: Raku
    depends:
    -
      name: install
    -
      name: install-pg
    code: |
      use v6.d;
      use Protocol::Postgres;

      my $socket = await IO::Socket::Async.connect("localhost",5432);
      my $client = Protocol::Postgres::Client.new;
      $socket.Supply(:bin).act({ $client.incoming-data($^data) });
      $client.outbound-data.act({ $socket.write($^data) });

      await $client.startup("testuser", "testdb", "testpass");

      my $resultset = await $client.query('SELECT * FROM bar WHERE id = $1', 42);
      react {
        whenever $resultset.hash-rows -> (:$name, :$description) {
          say "$name is $description";
        }
      }
  -
    name: install
    language: Bash
    code: |
      set -e
      cd source/
      zef install . --/test
  -
    name: install-pg
    plugin: sparkyci-service-postgresql
    followup:
    -
      name: create-table
    config:
      db_name: testdb
      db_user: testuser
      db_pass: testpass
  -
    name: create-table
    language: Bash
    code: |
      set -e
      export PGPASSWORD=testpass
      psql -d testdb -U testuser -c "create table bar(name text, description text, id int)" -h localhost      
      psql -d testdb -U testuser -c "insert into bar(name, description, id) values('Raku','Programming Language', 42)" -h localhost      
    
02:56:03 :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
[task run: task.bash - tasks/install]
[dump code: task.bash]
[1] set -e
[2] cd source/
[3] zef install . --/test
[4] 
[task stdout]
02:56:08 :: ===> Searching for missing dependencies: Auth::SCRAM::Async
02:56:36 :: ===> Searching for missing dependencies: Crypt::Random
02:56:36 :: ===> Searching for missing dependencies: if
02:56:36 :: ===> Installing: if:ver<0.1.1>
02:56:36 :: ===> Installing: Crypt::Random:ver<0.4.1>
02:56:36 :: ===> Installing: Auth::SCRAM::Async:ver<0.0.1>:auth<cpan:LEONT>
02:56:36 :: ===> Installing: Protocol::Postgres:ver<0.0.3>:auth<cpan:LEONT>
[task stderr]
02:56:36 :: ===> Updating fez mirror: https://360.zef.pm/
02:56:36 :: ===> Updated fez mirror: https://360.zef.pm/
02:56:36 :: ===> Updating rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
02:56:36 :: ===> Updated rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
02:56:15 :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
02:56:18 :: [repository] - installing sparkyci-service-postgresql, version 0.000012
[task run: task.bash - install-pg]
[dump code: task.bash]
[1] set -e
[2] 
[3] db_user=$(config db_user)
[4] db_pass=$(config db_pass)
[5] db_name=$(config db_name)
[6] 
[7] set -x
[8] 
[9] 2>&1
[10] 
[11] echo "installing postgresql service on sparky"
[12] echo "======================================="
[13] 
[14] 
[15] sudo apk add postgresql
[16] 
[17] sudo mkdir -p /run/postgresql
[18] 
[19] sudo chown postgres:postgres /run/postgresql
[20] 
[21] sudo rm -rf /var/lib/postgresql/data
[22] 
[23] sudo mkdir -p /var/lib/postgresql/data
[24] 
[25] sudo chown postgres:postgres /var/lib/postgresql/data
[26] 
[27] sudo chmod 0700 /var/lib/postgresql/data
[28] 
[29] sudo -u postgres sh -c -l 'initdb -D /var/lib/postgresql/data'
[30] 
[31] sudo -u postgres sh -c -l 'postgres -D /var/lib/postgresql/data >/var/lib/postgresql/logfile 2>&1 &'
[32] 
[33] sleep 5
[34] 
[35] sudo -u postgres psql -c "create user $db_user with password '$db_pass'"
[36] sudo -u postgres sh -l -c "createdb $db_name"
[37] sudo -u postgres psql -c "grant all privileges on database $db_name to $db_user;"
[38] 
[39] export PGPASSWORD=$db_pass
[40] 
[41] psql -d $db_name -U $db_user -c "create table foo(a text)" -h localhost
[42] 
[43] 
[task stdout]
02:56:21 :: installing postgresql service on sparky
02:56:21 :: =======================================
02:56:21 :: fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
02:56:21 :: fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
02:56:21 :: fetch https://dl.cloudsmith.io/public/nxadm-pkgs/rakudo-pkg/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
02:56:22 :: (1/12) Installing postgresql-common (1.1-r2)
02:56:22 :: Executing postgresql-common-1.1-r2.pre-install
02:56:22 :: (2/12) Installing libpq (14.5-r0)
02:56:22 :: (3/12) Installing postgresql14-client (14.5-r0)
02:56:22 :: (4/12) Installing tzdata (2022f-r1)
02:56:22 :: (5/12) Installing icu-data-en (71.1-r2)
02:56:22 :: Executing icu-data-en-71.1-r2.post-install
02:56:22 :: (6/12) Installing icu-libs (71.1-r2)
02:56:22 :: (7/12) Installing gdbm (1.23-r0)
02:56:22 :: (8/12) Installing libsasl (2.1.28-r1)
02:56:22 :: (9/12) Installing libldap (2.6.3-r3)
02:56:22 :: (10/12) Installing xz-libs (5.2.5-r1)
02:56:22 :: (11/12) Installing libxml2 (2.9.14-r2)
02:56:22 :: (12/12) Installing postgresql14 (14.5-r0)
02:56:22 :: Executing postgresql14-14.5-r0.post-install
02:56:22 :: Executing busybox-1.35.0-r17.trigger
02:56:22 :: Executing postgresql-common-1.1-r2.trigger
02:56:23 :: OK: 739 MiB in 72 packages
02:56:23 :: The files belonging to this database system will be owned by user "postgres".
02:56:23 :: This user must also own the server process.
02:56:23 :: 
02:56:23 :: The database cluster will be initialized with locales
02:56:23 ::   COLLATE:  C
02:56:23 ::   CTYPE:    C.UTF-8
02:56:23 ::   MESSAGES: C
02:56:23 ::   MONETARY: C
02:56:23 ::   NUMERIC:  C
02:56:23 ::   TIME:     C
02:56:23 :: The default database encoding has accordingly been set to "UTF8".
02:56:23 :: The default text search configuration will be set to "english".
02:56:23 :: 
02:56:23 :: Data page checksums are disabled.
02:56:23 :: 
02:56:23 :: fixing permissions on existing directory /var/lib/postgresql/data ... ok
02:56:23 :: creating subdirectories ... ok
02:56:23 :: selecting dynamic shared memory implementation ... posix
02:56:23 :: selecting default max_connections ... 100
02:56:23 :: selecting default shared_buffers ... 128MB
02:56:23 :: selecting default time zone ... UTC
02:56:23 :: creating configuration files ... ok
02:56:24 :: running bootstrap script ... ok
02:56:25 :: performing post-bootstrap initialization ... ok
02:56:25 :: syncing data to disk ... ok
02:56:25 :: 
02:56:25 :: 
02:56:25 :: Success.
02:56:25 :: 
02:56:30 :: CREATE ROLE
02:56:31 :: GRANT
02:56:31 :: CREATE TABLE
[task stderr]
02:56:31 :: ++ echo 'installing postgresql service on sparky'
02:56:31 :: ++ echo =======================================
02:56:31 :: ++ sudo apk add postgresql
02:56:31 :: *
02:56:31 :: * If you need ICU with non-English locales and legacy charset support, install
02:56:31 :: * package icu-data-full.
02:56:31 :: *
02:56:31 :: *
02:56:31 :: * If you want to use JIT in PostgreSQL, install postgresql14-jit or
02:56:31 :: * postgresql-jit (if you didn't install specific major version of postgresql).
02:56:31 :: *
02:56:31 :: * Setting postgresql14 as the default version
02:56:31 :: ++ sudo mkdir -p /run/postgresql
02:56:31 :: ++ sudo chown postgres:postgres /run/postgresql
02:56:31 :: ++ sudo rm -rf /var/lib/postgresql/data
02:56:31 :: ++ sudo mkdir -p /var/lib/postgresql/data
02:56:31 :: ++ sudo chown postgres:postgres /var/lib/postgresql/data
02:56:31 :: ++ sudo chmod 0700 /var/lib/postgresql/data
02:56:31 :: ++ sudo -u postgres sh -c -l 'initdb -D /var/lib/postgresql/data'
02:56:31 :: initdb: warning: enabling "trust" authentication for local connections
02:56:31 :: You can change this by editing pg_hba.conf or using the option -A, or
02:56:31 :: --auth-local and --auth-host, the next time you run initdb.
02:56:31 :: ++ sudo -u postgres sh -c -l 'postgres -D /var/lib/postgresql/data >/var/lib/postgresql/logfile 2>&1 &'
02:56:31 :: ++ sleep 5
02:56:31 :: ++ sudo -u postgres psql -c 'create user testuser with password '\''testpass'\'''
02:56:31 :: ++ sudo -u postgres sh -l -c 'createdb testdb'
02:56:31 :: ++ sudo -u postgres psql -c 'grant all privileges on database testdb to testuser;'
02:56:31 :: ++ export PGPASSWORD=testpass
02:56:31 :: ++ PGPASSWORD=testpass
02:56:31 :: ++ psql -d testdb -U testuser -c 'create table foo(a text)' -h localhost
02:56:49 :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
[task run: task.bash - tasks/create-table]
[dump code: task.bash]
[1] set -e
[2] export PGPASSWORD=testpass
[3] psql -d testdb -U testuser -c "create table bar(name text, description text, id int)" -h localhost      
[4] psql -d testdb -U testuser -c "insert into bar(name, description, id) values('Raku','Programming Language', 42)" -h localhost      
[5] 
[task stdout]
02:56:52 :: CREATE TABLE
02:56:52 :: INSERT 0 1
02:55:37 :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
source directory does not yet exist, download source archive from storage
02:55:40 :: [repository] - installing pack-unpack, version 0.000001
[task run: task.bash - unpack source archive]
[dump code: task.bash]
[1] set -e
[2] 
[3] file=$(config file)
[4] dir=$(config dir)
[5] 
[6] echo "tar -xzf $file "
[7] 
[8] tar -xzf $file
[9] 
[10] if test $dir; then
[11]   ls -l $dir
[12] fi
[13] 
[14] 
[task stdout]
02:55:43 :: tar -xzf source.tar.gz 
[task run: task.raku - tasks/int-test]
[dump code: task.raku]
[1] use v6.d;
[2] use Protocol::Postgres;
[3] 
[4] my $socket = await IO::Socket::Async.connect("localhost",5432);
[5] my $client = Protocol::Postgres::Client.new;
[6] $socket.Supply(:bin).act({ $client.incoming-data($^data) });
[7] $client.outbound-data.act({ $socket.write($^data) });
[8] 
[9] await $client.startup("testuser", "testdb", "testpass");
[10] 
[11] my $resultset = await $client.query('SELECT * FROM bar WHERE id = $1', 42);
[12] react {
[13]   whenever $resultset.hash-rows -> (:$name, :$description) {
[14]     say "$name is $description";
[15]   }
[16] }
[17] 
[task stdout]
[task stderr]
02:57:03 :: A react block:
02:57:03 ::   in block <unit> at /var/.sparrowdo/env/int-test/.sparrowdo/tasks/int-test/task.raku line 12
02:57:03 :: 
02:57:03 :: Died because of the exception:
02:57:03 ::     Unexpected named argument 'id' passed in sub-signature
02:57:03 ::       in block  at /var/.sparrowdo/env/int-test/.sparrowdo/tasks/int-test/task.raku line 13
02:57:03 ::       in method add-row at /home/worker/.raku/sources/4ABF3661E73A0A176F3A6DC0D272BA3FF21FF959 (Protocol::Postgres) line 1008
02:57:03 ::       in method incoming-message at /home/worker/.raku/sources/4ABF3661E73A0A176F3A6DC0D272BA3FF21FF959 (Protocol::Postgres) line 1054
02:57:03 ::       in method incoming-message at /home/worker/.raku/sources/4ABF3661E73A0A176F3A6DC0D272BA3FF21FF959 (Protocol::Postgres) line 1314
02:57:03 ::       in method incoming-data at /home/worker/.raku/sources/4ABF3661E73A0A176F3A6DC0D272BA3FF21FF959 (Protocol::Postgres) line 1284
02:57:03 ::       in block  at /var/.sparrowdo/env/int-test/.sparrowdo/tasks/int-test/task.raku line 6
02:57:03 :: 
02:57:03 :: task exit status: 1
02:57:03 :: task tasks/int-test FAILED
The spawned command 'docker exec -i sparrow-worker sh -l /var/.sparrowdo/env/int-test/.sparrowdo/sparrowrun.sh' exited unsuccessfully (exit code: 1, signal: 0)
  in block <unit> at /home/sph/.raku/resources/57C38AFDF922EB0C43584FF5F701A03850B5346F line 13
  in sub MAIN at /home/sph/.raku/bin/sparrowdo line 3
  in block <unit> at /home/sph/.raku/bin/sparrowdo line 1