这是indexloc提供的服务,不要输入任何密码
Skip to content

Squashing migrations which modify event's Retry Configuration creates new migration with missing details #4296

@poul-kg

Description

@poul-kg

Repo with the issue and instructions on how to reproduce https://github.com/poul-kg/hasura-issue-4296

Prerequisites:

  • hasura cli 1.1.0

  • also tested with v1.2.0-beta.3

  • git clone git@github.com:poul-kg/hasura-issue-4296.git

  • cd hasura-issue-4296

  • docker-compose up -d --build

  • hasura migrate apply --admin-secret 12345 --endpoint http://localhost:8080

  • hasura console --admin-secret 12345 --endpoint http://localhost:8080

Check event's retry configuration

now try to squash
Ctrl+C to stop hasura console

hasura migrate squash --admin-secret 12345 --endpoint http://localhost:8080 --from 1585992945707 --name squashed

select Yes when asked to remove migrations.

run ./remigrate.sh, which will stop docker, remove db volume, start docker, run hasura migrations

then run console

hasura console --admin-secret 12345 --endpoint http://localhost:8080

Check event's retry configuration

- args:
    headers: []
    insert:
      columns: '*'
    name: test_event_1
    replace: true
    table:
      name: test_table_1
      schema: public
    webhook: http://localhost:8080/api/test_event_1
  type: create_event_trigger
- args:
    headers: []
    insert:
      columns: '*'
    name: test_event_2
    replace: true
    table:
      name: test_table_2
      schema: public
    webhook: http://localhost/test_event_2
  type: create_event_trigger

there is no information about retry configuration here

Expected behavior

after running squashed migration, I want Retry configuration be preserved

YAML file of squashed migration should be (I'm not sure about format, it's my guess):

I've checked format below, it doesn't work, so probably a migration cli do not support it

- args:
    headers: []
    insert:
      columns: '*'
    name: test_event_1
    retry_conf:
      interval_sec: 30
      num_retries: 30
      timeout_sec: 60
    replace: true
    table:
      name: test_table_1
      schema: public
    webhook: http://localhost:8080/api/test_event_1
  type: create_event_trigger
- args:
    headers: []
    insert:
      columns: '*'
    name: test_event_2
    retry_conf:
      interval_sec: 30
      num_retries: 30
      timeout_sec: 60
    replace: true
    table:
      name: test_table_2
      schema: public
    webhook: http://localhost/test_event_2
  type: create_event_trigger

Metadata

Metadata

Assignees

No one assigned

    Labels

    c/cliRelated to CLIk/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions