#How to execute the same container multiple times

1 messages · Page 1 of 1 (latest)

spark grove
#

Hello

I've implemented a delta load in Postgres within an application.
I want to use the Dagger to test that functionality.
However, it looks like Dagger skips rerunning the same container twice when you have the same exec parameters. I have tried .sync() unsuccessfully.

  1. I am building my application container
  2. I've started postgres as a service
    2.I am running my application container with .with_exec(...) , together with the Postgres service bound
    3.I am deleting a few data entries in the postgres with psql
    4.I am rerunning my application container with .with_exec(...) , together with the same postgres service bound
    5.I am using psql to check if the data entries are updated with delta load

My test is failing at step 5, with delta load failing. However, when looking at the dagger cloud trace, step 4 was skipped, resulting in step 5 failing.

Here's my implementation

first_run = await crawler.with_exec(['uv', 'run', 'scrapy', 'test', self.spider])
await first_run.sync()

....

second_run = await crawler.with_exec(['uv', 'run', 'scrapy', 'test', self.spider])
await second_run.sync()

I really appreciate any help you can provide.
JP

clever otter
#

if none of your step inputs or arguments change, dagger won't re-run the same operation as it'd assume that the output should be the same