Looking for some advice, ran into an interesting i...
# sst
d
Looking for some advice, ran into an interesting issue where sst spun up duplicate instances of open-search database on every dry dev run and i'm looking to prevent that in the future. This is using
aws-cdk-lib/aws-opensearchservice
and sst v1.1
t
hey what do you mean every dry dev run?
do you mean after tearing down a stage and bringing it back up you had leftovers from the old stage?
d
every time i ran `sst start`it created duplicate db's
t
without running a remove in between?
d
Correct
t
can you show me your cdk code?
this should be impossible unless you're dynamically defining an ID somewhere
d
Copy code
const searchDomain = new opensearch.Domain(stack, 'ElasticUploadQueryDB', {
    version: opensearch.EngineVersion.OPENSEARCH_1_0,
    enableVersionUpgrade: true,
    useUnsignedBasicAuth: true,
    enforceHttps: true,
    ...elasticSearchConfig
  })
t
ok that looks fine and can you show me the stack and how you're adding it to the app?
d
Copy code
stack.searchDomain = searchDomain
After that we interface with it via the url and basic auth, so there's no additional config really
t
I'm probably going to have to see your whole stack code
d
It's open source
one sec
Actually, that hasn't been released to the pub yet
I can pair/zoom if that works
t
can you DM me the stack?
I can zoom later otherwise
d
Verifying now
@Jesse Harlin
j
Hey, I want to add (I am working on the same project with @Daniel Ashcraft) It was doing this for s3 buckets as well
it didn't do this in the past, and I believe it started after updating past 0.9x to version 1.x.x
t
this is the default behavior of CDK, for stateful things it does not remove them automatically
j
I am aware, that if I remove as in 'sst remove' then it will leave dynamo db's and s3 buckets. What I don't expect is without running remove, for it to make several duplicates
so this was when I was running
sst start
in fact the times I did run
sst remove
I think the CLI would report what wasn't removed and I could go clean those out, which was useful. These copies were unexpected copies