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: 2476
Status: FAIL
Image: melezhik/sparrow:alpine
Worker status: OK
---
Date: 06.01.2023 @ 02:48
Time elapsed: 186 sec
---
SCM: https://github.com/melezhik/protocol-postgres.git
Git sha: ea4d2dd
Git comment: Update sparrow.yaml
tasks:
  -
    name: int-test
    default: true
    langauge: Raku
    depends:
    -
      name: install
    -
      name: install-pg
    code: |
      use v6.d;
      use Protocol::Postgres;

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

      await $client.startup($user, $database, $password);

      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:47:05 :: [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:47:10 :: ===> Searching for missing dependencies: Auth::SCRAM::Async
02:47:36 :: ===> Searching for missing dependencies: Crypt::Random
02:47:36 :: ===> Searching for missing dependencies: if
02:47:36 :: ===> Installing: if:ver<0.1.1>
02:47:36 :: ===> Installing: Crypt::Random:ver<0.4.1>
02:47:36 :: ===> Installing: Auth::SCRAM::Async:ver<0.0.1>:auth<cpan:LEONT>
02:47:36 :: ===> Installing: Protocol::Postgres:ver<0.0.3>:auth<cpan:LEONT>
[task stderr]
02:47:36 :: ===> Updating fez mirror: https://360.zef.pm/
02:47:36 :: ===> Updated fez mirror: https://360.zef.pm/
02:47:36 :: ===> Updating rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
02:47:36 :: ===> Updated rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
02:47:15 :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
02:47: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:47:21 :: installing postgresql service on sparky
02:47:21 :: =======================================
02:47:21 :: fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
02:47:21 :: fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
02:47:21 :: fetch https://dl.cloudsmith.io/public/nxadm-pkgs/rakudo-pkg/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
02:47:22 :: (1/12) Installing postgresql-common (1.1-r2)
02:47:22 :: Executing postgresql-common-1.1-r2.pre-install
02:47:22 :: (2/12) Installing libpq (14.5-r0)
02:47:22 :: (3/12) Installing postgresql14-client (14.5-r0)
02:47:23 :: (4/12) Installing tzdata (2022f-r1)
02:47:23 :: (5/12) Installing icu-data-en (71.1-r2)
02:47:23 :: Executing icu-data-en-71.1-r2.post-install
02:47:23 :: (6/12) Installing icu-libs (71.1-r2)
02:47:23 :: (7/12) Installing gdbm (1.23-r0)
02:47:23 :: (8/12) Installing libsasl (2.1.28-r1)
02:47:23 :: (9/12) Installing libldap (2.6.3-r3)
02:47:23 :: (10/12) Installing xz-libs (5.2.5-r1)
02:47:23 :: (11/12) Installing libxml2 (2.9.14-r2)
02:47:23 :: (12/12) Installing postgresql14 (14.5-r0)
02:47:24 :: Executing postgresql14-14.5-r0.post-install
02:47:24 :: Executing busybox-1.35.0-r17.trigger
02:47:24 :: Executing postgresql-common-1.1-r2.trigger
02:47:25 :: OK: 739 MiB in 72 packages
02:47:25 :: The files belonging to this database system will be owned by user "postgres".
02:47:25 :: This user must also own the server process.
02:47:25 :: 
02:47:25 :: The database cluster will be initialized with locales
02:47:25 ::   COLLATE:  C
02:47:25 ::   CTYPE:    C.UTF-8
02:47:25 ::   MESSAGES: C
02:47:25 ::   MONETARY: C
02:47:25 ::   NUMERIC:  C
02:47:25 ::   TIME:     C
02:47:25 :: The default database encoding has accordingly been set to "UTF8".
02:47:25 :: The default text search configuration will be set to "english".
02:47:25 :: 
02:47:25 :: Data page checksums are disabled.
02:47:25 :: 
02:47:25 :: fixing permissions on existing directory /var/lib/postgresql/data ... ok
02:47:25 :: creating subdirectories ... ok
02:47:25 :: selecting dynamic shared memory implementation ... posix
02:47:25 :: selecting default max_connections ... 100
02:47:25 :: selecting default shared_buffers ... 128MB
02:47:25 :: selecting default time zone ... UTC
02:47:25 :: creating configuration files ... ok
02:47:25 :: running bootstrap script ... ok
02:47:26 :: performing post-bootstrap initialization ... ok
02:47:26 :: syncing data to disk ... ok
02:47:26 :: 
02:47:26 :: 
02:47:27 :: Success.
02:47:27 :: 
02:47:32 :: CREATE ROLE
02:47:32 :: GRANT
02:47:32 :: CREATE TABLE
[task stderr]
02:47:32 :: ++ echo 'installing postgresql service on sparky'
02:47:32 :: ++ echo =======================================
02:47:32 :: ++ sudo apk add postgresql
02:47:32 :: *
02:47:32 :: * If you need ICU with non-English locales and legacy charset support, install
02:47:32 :: * package icu-data-full.
02:47:32 :: *
02:47:32 :: *
02:47:32 :: * If you want to use JIT in PostgreSQL, install postgresql14-jit or
02:47:32 :: * postgresql-jit (if you didn't install specific major version of postgresql).
02:47:32 :: *
02:47:32 :: * Setting postgresql14 as the default version
02:47:32 :: ++ sudo mkdir -p /run/postgresql
02:47:32 :: ++ sudo chown postgres:postgres /run/postgresql
02:47:32 :: ++ sudo rm -rf /var/lib/postgresql/data
02:47:32 :: ++ sudo mkdir -p /var/lib/postgresql/data
02:47:32 :: ++ sudo chown postgres:postgres /var/lib/postgresql/data
02:47:32 :: ++ sudo chmod 0700 /var/lib/postgresql/data
02:47:32 :: ++ sudo -u postgres sh -c -l 'initdb -D /var/lib/postgresql/data'
02:47:32 :: initdb: warning: enabling "trust" authentication for local connections
02:47:32 :: You can change this by editing pg_hba.conf or using the option -A, or
02:47:32 :: --auth-local and --auth-host, the next time you run initdb.
02:47:32 :: ++ sudo -u postgres sh -c -l 'postgres -D /var/lib/postgresql/data >/var/lib/postgresql/logfile 2>&1 &'
02:47:32 :: ++ sleep 5
02:47:32 :: ++ sudo -u postgres psql -c 'create user testuser with password '\''testpass'\'''
02:47:32 :: ++ sudo -u postgres sh -l -c 'createdb testdb'
02:47:32 :: ++ sudo -u postgres psql -c 'grant all privileges on database testdb to testuser;'
02:47:32 :: ++ export PGPASSWORD=testpass
02:47:32 :: ++ PGPASSWORD=testpass
02:47:32 :: ++ psql -d testdb -U testuser -c 'create table foo(a text)' -h localhost
02:48:21 :: [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:48:24 :: CREATE TABLE
02:48:24 :: INSERT 0 1
02:46:41 :: [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:46:44 :: [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:46:47 :: tar -xzf source.tar.gz 
task language is not set
  in method build-task at sparrowfile line 642
  in method task-run at sparrowfile line 621
  in method stage-run at sparrowfile line 504
  in method run at /home/worker/.raku/sources/76992E554865458CE727E3579C8735894C24C59B (Sparky::JobApi) line 334
  in block <unit> at sparrowfile line 690

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