Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try script never exits on long provider chains #123

Open
tkmcmaster opened this issue May 31, 2023 · 1 comment
Open

Try script never exits on long provider chains #123

tkmcmaster opened this issue May 31, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@tkmcmaster
Copy link
Contributor

tkmcmaster commented May 31, 2023

Describe the bug

Try script never exits on long provider chains

Expected behavior

Try script should exit once all endpoints have run once (or the one specified by -i)

Config file

provider_chain.yaml

providers:
  a:
    range: {}
  b:
    response: {}
  c:
    response: {}
  d:
    response: {}
  e:
    response: {}
  f:
    response: {}

load_pattern:
  - linear:
      from: 100%
      to: 100%
      over: 5s

loggers:
  test:
    to: stderr

vars:
  port: "${PORT}"


endpoints:
  - method: POST
    url: http://localhost:${port}
    body: '{"a": ${a}}'
    provides:
      b:
        select: response.body.a
    on_demand: true

  - method: POST
    url: http://localhost:${port}
    body: '{"b": ${b}}'
    provides:
      c:
        select: response.body.b
    on_demand: true

  - method: POST
    url: http://localhost:${port}
    body: '{"c": ${c}}'
    provides:
      d:
        select: response.body.c
    on_demand: true

  - method: POST
    url: http://localhost:${port}
    body: '{"d": ${d}}'
    provides:
      e:
        select: response.body.d
    on_demand: true

  - method: POST
    url: http://localhost:${port}
    body: '{"e": ${e}}'
    provides:
      f:
        select: response.body.e
    on_demand: true

  - method: POST
    url: http://localhost:${port}
    body: '{"f": ${f}}'
    peak_load: 1hps
    logs:
      test:
        select: response.body.f

provider_loop.yaml

providers:
  a:
    range: {}
  b:
    response: {}
  c:
    response: {}
  d:
    response: {}

load_pattern:
  - linear:
      from: 100%
      to: 100%
      over: 5s

loggers:
  test:
    to: stderr

vars:
  port: "${PORT}"


endpoints:
  - method: POST
    url: http://localhost:${port}
    body: '{"a": ${a}}'
    peak_load: 1hps
    provides:
      b:
        select: response.body.a

  - method: POST
    url: http://localhost:${port}
    body: '{"b": ${b}}'
    peak_load: 5hps
    provides:
      b:
        select: b # Put it back on 'b' to reuse

  - method: POST
    url: http://localhost:${port}
    body: '{"b": ${b}}'
    peak_load: 1hps
    provides:
      c:
        select: response.body.b # take and put it on 'c'

  - method: POST
    url: http://localhost:${port}
    body: '{"c": ${c}}'
    peak_load: 5hps
    provides:
      c:
        select: c # Put it back on 'c' to reuse

  - method: POST
    url: http://localhost:${port}
    body: '{"c": ${c}}'
    peak_load: 1hps
    provides:
      d:
        select: response.body.c # take and put it on 'd'

  - method: POST
    url: http://localhost:${port}
    body: '{"d": ${d}}'
    peak_load: 1hps
    logs:
      test:
        select: response.body.d

Command to run

Enter below the full command used to execute Pewpew.

PORT=8084 test-server &

PORT=8084 pewpew try provider_chain.yaml
or
PORT=8084 pewpew try provider_chain.yaml -i _id=5

PORT=8084 pewpew try provider_loop.yaml
or
PORT=8084 pewpew try provider_loop.yaml -i _id=5

System info

  • Operating System: "Ubuntu 20.04"
  • Pewpew version: pewpew 0.5.12

Additional context

Checking old versions, it last worked in 0.5.7 and has been broken in 0.5.8 forward. It will run in pewpew run, but hangs on pewpew try

@tkmcmaster tkmcmaster added the bug Something isn't working label May 31, 2023
@tkmcmaster
Copy link
Contributor Author

tkmcmaster commented Oct 26, 2023

I've narrowed it down to be between 0.5.7 and 0.5.8 preview 3. Preview 1 and 2 are broken to the point you can't even run _id=1

v0.5.7...v0.5.8-preview3

preview1:
works: RUST_LOG=warn PORT=8090 pewpew58p1 try examples/provider_chain.yaml -i _id=0
hangs: RUST_LOG=warn PORT=8090 pewpew58p1 try examples/provider_chain.yaml -i _id=1

preview2:
works: RUST_LOG=warn PORT=8090 pewpew58p2 try examples/provider_chain.yaml -i _id=0
hangs: RUST_LOG=warn PORT=8090 pewpew58p2 try examples/provider_chain.yaml -i _id=1

preview3 and latest:
works: RUST_LOG=warn PORT=8090 pewpew58p3 try examples/provider_chain.yaml -i _id=1
hangs: RUST_LOG=warn PORT=8090 pewpew58p3 try examples/provider_chain.yaml -i _id=2

Also check:

@summersjc summersjc self-assigned this Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants