profile
viewpoint
Trey Stout treystout Incyte Studios, LLC OKC, OK CEO Incyte Studios

treystout/bootstrap 1

HTML, CSS, and JS toolkit from Twitter

treystout/dwarftherapist 1

Dwarf Therapist is an extension application for the fantastic game Dwarf Fortress. DF is a great game. And it's fun to manage dwarves with keyboard menus until about the 50th one shows up. If you're starting to get overwhelmed you need therapist in your life.

treystout/hippybot 1

Hipchat.com bot written in Python with a simple plugin API

treystout/pelican 1

Static blog generator in python, using ReST syntax

treystout/Tutorial 1

cv ;lj gggggggggggggggggggggggg

treystout/Agner 0

Simple redis-backed queue that does not rely on eval or code insertion, only data.

treystout/algoliasearch-client-python 0

Algolia Search API Client for Python

treystout/code_eval 0

Learning golang via codeeval.com

treystout/Compressonator 0

Tool suite for Image compression and analysis using CPUs, GPUs and APUs.

treystout/devilsdictionary 0

A simple project to generate handwritten versions of definitions from The Devil's Dictionary

startedgridsome/gridsome

started time in a month

startedgwenaelp/vue-diagrams

started time in a month

issue commentvolkanunsal/postgres-rrule

Does not repeat within the defined tsrange

same here. We almost only create weekly events in our app so I set the count to 50,000 for "infinite" series.

gajus

comment created time in a month

issue closedhasura/graphql-engine

event trigger logs causing errors on insert

I was just testing an event-trigger on my users table, and while the trigger works (it hits the webhook just fine) it fails attempting to log that the trigger works. I get the following error on 1.3.0 (via docker)

{
  "type": "event-trigger",
  "timestamp": "2020-08-12T01:03:20.880+0000",
  "level": "error",
  "detail": {
    "internal": {
      "statement": "\n          INSERT INTO hdb_catalog.event_invocation_logs (event_id, status, request, response)\n          VALUES ($1, $2, $3, $4)\n          ",
      "prepared": true,
      "error": {
        "exec_status": "FatalError",
        "hint": null,
        "message": "null value in column \"id\" violates not-null constraint",
        "status_code": "23502",
        "description": "Failing row contains (null, 2ee6ad0a-187b-46ba-9ae8-c62d21c908db, 200, {\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin..., {\"data\":{\"status\":200,\"body\":\"{\\\"job_id\\\": \\\"8b4ed8f6-79f8-44bd-..., 2020-08-12 01:03:21.860502)."
      },
      "arguments": [
        "(Oid 25,Just (\"2ee6ad0a-187b-46ba-9ae8-c62d21c908db\",Binary))",
        "(Oid 20,Just (\"\\NUL\\NUL\\NUL\\NUL\\NUL\\NUL\\NUL\\200\",Binary))",
        "(Oid 114,Just (\"{\\\"payload\\\":{\\\"event\\\":{\\\"session_variables\\\":{\\\"x-hasura-role\\\":\\\"admin\\\"},\\\"op\\\":\\\"MANUAL\\\",\\\"data\\\":{\\\"old\\\":null,\\\"new\\\":{\\\"email\\\":\\\"whatever@foo.com\\\",\\\"display_name\\\":\\\"Some Dude\\\",\\\"auth0_id\\\":\\\"auth0|00000000000\\\",\\\"username\\\":\\\"dude\\\",\\\"updated_at\\\":\\\"2020-08-12T00:45:43.004511+00:00\\\",\\\"created_at\\\":\\\"2020-08-06T21:23:52.923922+00:00\\\",\\\"id\\\":1,\\\"avatar_url\\\":null,\\\"description\\\":null}}},\\\"created_at\\\":\\\"2020-08-12T00:58:39.870033Z\\\",\\\"id\\\":\\\"2ee6ad0a-187b-46ba-9ae8-c62d21c908db\\\",\\\"delivery_info\\\":{\\\"max_retries\\\":3,\\\"current_retry\\\":0},\\\"trigger\\\":{\\\"name\\\":\\\"maintain_sengrid_lists\\\"},\\\"table\\\":{\\\"schema\\\":\\\"public\\\",\\\"name\\\":\\\"users\\\"}},\\\"headers\\\":[{\\\"value\\\":\\\"application/json\\\",\\\"name\\\":\\\"Content-Type\\\"},{\\\"value\\\":\\\"hasura-graphql-engine/v1.3.0\\\",\\\"name\\\":\\\"User-Agent\\\"}],\\\"version\\\":\\\"2\\\"}\",Binary))",
        "(Oid 114,Just (\"{\\\"data\\\":{\\\"status\\\":200,\\\"body\\\":\\\"{\\\\\\\"job_id\\\\\\\": \\\\\\\"8b4ed8f6-79f8-44bd-981e-fb59336a01e7\\\\\\\"}\\\",\\\"headers\\\":[{\\\"value\\\":\\\"50\\\",\\\"name\\\":\\\"Content-Length\\\"},{\\\"value\\\":\\\"application/json\\\",\\\"name\\\":\\\"Content-Type\\\"},{\\\"value\\\":\\\"Caddy\\\",\\\"name\\\":\\\"Server\\\"},{\\\"value\\\":\\\"5d5897\\\",\\\"name\\\":\\\"X-Request-Id\\\"},{\\\"value\\\":\\\"Wed, 12 Aug 2020 01:03:21 GMT\\\",\\\"name\\\":\\\"Date\\\"}]},\\\"version\\\":\\\"2\\\",\\\"type\\\":\\\"webhook_response\\\"}\",Binary))"
      ]
    },
    "path": "$",
    "error": "database query error",
    "code": "unexpected"
  }
}

The one thing I can think of that may be causing this is I created the event trigger, tried to trigger it, then noticed a console error regarding gen_random_uuid being a missing function. I did CREATE EXTENSION pgcrypto then attempted to recreate the trigger. As I said above, the webhook portion seems correct, it's hitting the correct hook and getting the correct results, this appears to be an event-trigger logging issue.

closed time in a month

treystout

issue commenthasura/graphql-engine

event trigger logs causing errors on insert

confirmed fix. nuked db locally, fixed migration to drop specific tables instead of dropping entire schema, event logs now filling up properly, no more SQL errors. Thank you again @tirumaraiselvan!

treystout

comment created time in a month

issue commenthasura/graphql-engine

event trigger logs causing errors on insert

@tirumaraiselvan yes I did, one of my migrations was a squash that sort of "started over" on the schema with DROP SCHEMA public. I will correct the migration tomorrow and update this issue if that fixes it. Thank you for digging up #4009

treystout

comment created time in a month

issue commenthasura/graphql-engine

event trigger logs causing errors on insert

First off here's the result of the query you provided...

# SELECT e.extname AS "Name", e.extversion AS "Version", n.nspname AS "Schema", c.description AS "Description" 
shutupwrite-# FROM pg_catalog.pg_extension e 
shutupwrite-# LEFT JOIN pg_catalog.pg_namespace n ON n.oid = e.extnamespace 
shutupwrite-# LEFT JOIN pg_catalog.pg_description c ON c.objoid = e.oid AND c.classoid = 'pg_catalog.pg_extension'::pg_catalog.regclass 
shutupwrite-# ORDER BY 1;
   Name   | Version |   Schema   |                   Description                    
----------+---------+------------+--------------------------------------------------
 citext   | 1.6     | public     | data type for case-insensitive character strings
 pgcrypto | 1.3     | public     | cryptographic functions
 plpgsql  | 1.0     | pg_catalog | PL/pgSQL procedural language
 unaccent | 1.1     | public     | text search dictionary that removes accents
(4 rows)

the function seems fine

# select gen_random_uuid();
           gen_random_uuid            
--------------------------------------
 e2e67846-207f-4b7b-8455-a6251400c339
(1 row)

Curiously I was scrolling through the postgres logs on a fresh db watching hasura run migrations and apply metadata. I saw it attempted to create the log tables and had the ids as NOT NULL DEFAULT gen_random_uuid() which appears correct. However after all migrations are applied and the engine is running, when I inspect those tables I get this...

\d hdb_catalog.event_log;
                        Table "hdb_catalog.event_log"
    Column     |            Type             | Collation | Nullable | Default 
---------------+-----------------------------+-----------+----------+---------
 id            | text                        |           | not null | 
...

 \d hdb_catalog.event_invocation_logs;
                 Table "hdb_catalog.event_invocation_logs"
   Column   |            Type             | Collation | Nullable | Default 
------------+-----------------------------+-----------+----------+---------
 id         | text                        |           | not null | 

Notice the missing default values? How would they be gone? I'm so confused

treystout

comment created time in 2 months

issue commenthasura/graphql-engine

event trigger logs causing errors on insert

@codingkarthik thank you for the response. How would I check what schema pgcrypto was installed under? I thought extensions were installed at the db level not at the schema level? Also if that were the case wouldn't I be seeing gen_random_uuid() is not a function?

treystout

comment created time in 2 months

issue openedhasura/graphql-engine

event trigger logs causing errors on insert

I was just testing an event-trigger on my users table, and while the trigger works (it hits the webhook just fine) it fails attempting to log that the trigger works. I get the following error on 1.3.0 (via docker)

{
  "type": "event-trigger",
  "timestamp": "2020-08-12T01:03:20.880+0000",
  "level": "error",
  "detail": {
    "internal": {
      "statement": "\n          INSERT INTO hdb_catalog.event_invocation_logs (event_id, status, request, response)\n          VALUES ($1, $2, $3, $4)\n          ",
      "prepared": true,
      "error": {
        "exec_status": "FatalError",
        "hint": null,
        "message": "null value in column \"id\" violates not-null constraint",
        "status_code": "23502",
        "description": "Failing row contains (null, 2ee6ad0a-187b-46ba-9ae8-c62d21c908db, 200, {\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin..., {\"data\":{\"status\":200,\"body\":\"{\\\"job_id\\\": \\\"8b4ed8f6-79f8-44bd-..., 2020-08-12 01:03:21.860502)."
      },
      "arguments": [
        "(Oid 25,Just (\"2ee6ad0a-187b-46ba-9ae8-c62d21c908db\",Binary))",
        "(Oid 20,Just (\"\\NUL\\NUL\\NUL\\NUL\\NUL\\NUL\\NUL\\200\",Binary))",
        "(Oid 114,Just (\"{\\\"payload\\\":{\\\"event\\\":{\\\"session_variables\\\":{\\\"x-hasura-role\\\":\\\"admin\\\"},\\\"op\\\":\\\"MANUAL\\\",\\\"data\\\":{\\\"old\\\":null,\\\"new\\\":{\\\"email\\\":\\\"whatever@foo.com\\\",\\\"display_name\\\":\\\"Some Dude\\\",\\\"auth0_id\\\":\\\"auth0|00000000000\\\",\\\"username\\\":\\\"dude\\\",\\\"updated_at\\\":\\\"2020-08-12T00:45:43.004511+00:00\\\",\\\"created_at\\\":\\\"2020-08-06T21:23:52.923922+00:00\\\",\\\"id\\\":1,\\\"avatar_url\\\":null,\\\"description\\\":null}}},\\\"created_at\\\":\\\"2020-08-12T00:58:39.870033Z\\\",\\\"id\\\":\\\"2ee6ad0a-187b-46ba-9ae8-c62d21c908db\\\",\\\"delivery_info\\\":{\\\"max_retries\\\":3,\\\"current_retry\\\":0},\\\"trigger\\\":{\\\"name\\\":\\\"maintain_sengrid_lists\\\"},\\\"table\\\":{\\\"schema\\\":\\\"public\\\",\\\"name\\\":\\\"users\\\"}},\\\"headers\\\":[{\\\"value\\\":\\\"application/json\\\",\\\"name\\\":\\\"Content-Type\\\"},{\\\"value\\\":\\\"hasura-graphql-engine/v1.3.0\\\",\\\"name\\\":\\\"User-Agent\\\"}],\\\"version\\\":\\\"2\\\"}\",Binary))",
        "(Oid 114,Just (\"{\\\"data\\\":{\\\"status\\\":200,\\\"body\\\":\\\"{\\\\\\\"job_id\\\\\\\": \\\\\\\"8b4ed8f6-79f8-44bd-981e-fb59336a01e7\\\\\\\"}\\\",\\\"headers\\\":[{\\\"value\\\":\\\"50\\\",\\\"name\\\":\\\"Content-Length\\\"},{\\\"value\\\":\\\"application/json\\\",\\\"name\\\":\\\"Content-Type\\\"},{\\\"value\\\":\\\"Caddy\\\",\\\"name\\\":\\\"Server\\\"},{\\\"value\\\":\\\"5d5897\\\",\\\"name\\\":\\\"X-Request-Id\\\"},{\\\"value\\\":\\\"Wed, 12 Aug 2020 01:03:21 GMT\\\",\\\"name\\\":\\\"Date\\\"}]},\\\"version\\\":\\\"2\\\",\\\"type\\\":\\\"webhook_response\\\"}\",Binary))"
      ]
    },
    "path": "$",
    "error": "database query error",
    "code": "unexpected"
  }
}

The one thing I can think of that may be causing this is I created the event trigger, tried to trigger it, then noticed a console error regarding gen_random_uuid being a missing function. I did CREATE EXTENSION pgcrypto then attempted to recreate the trigger. As I said above, the webhook portion seems correct, it's hitting the correct hook and getting the correct results, this appears to be an event-trigger logging issue.

created time in 2 months

startedbuefy/buefy

started time in 2 months

more