hopefully a quick question about the `Script` cons...
# help
c
hopefully a quick question about the
Script
construct πŸ™‚ I have a
Script
in one of my stacks, and when deploying (or working locally) I always see it updating like
Copy code
dev-homes-app-system-configuration | UPDATE_IN_PROGRESS | Custom::SSTScript | ScriptsScriptResource45A648A2
dev-homes-app-system-configuration | UPDATE_COMPLETE | Custom::SSTScript | ScriptsScriptResource45A648A2
This happens even when there are no changes to this script or to that stack. Is this normal for Scripts? or should I look more deeply for the cause?
t
I believe this is normal as scripts have an on update hook which runs whenever the stack is updated
c
but, even when there are no changes in the stack?
t
Hm good question
If it's deploying the stack that means there's some changes to it
I'd try doing an SST diff and seeing I suspect the script code changed
c
hello there… I end up cleaning my stack to only include the Script construct, but this keeps happening.. When I run
npx sst diff
I get this
Copy code
Using stage: devsystemconf
Preparing your SST app
Building function src/configuration/setup1.main
Building function src/configuration/setup2.main
Stack devsystemconf-homes-app-system-configuration
Resources
[~] Custom::SSTScript Scripts/ScriptResource ScriptsScriptResource45A648A2 
 └─ [~] BuiltAt
     β”œβ”€ [-] 1656019630761
     └─ [+] 1656019688368
the only change seems to be the
BuiltAt
value. and this causes this stack to deploy every time:
Copy code
Deploying stacks
Checking deploy status...
devsystemconf-homes-app-system-configuration | UPDATE_IN_PROGRESS | AWS::CloudFormation::Stack | devsystemconf-homes-app-system-configuration | User Initiated
devsystemconf-homes-app-system-configuration | UPDATE_IN_PROGRESS | Custom::SSTScript | ScriptsScriptResource45A648A2
devsystemconf-homes-app-system-configuration | UPDATE_COMPLETE | Custom::SSTScript | ScriptsScriptResource45A648A2
devsystemconf-homes-app-system-configuration | UPDATE_COMPLETE_CLEANUP_IN_PROGRESS | AWS::CloudFormation::Stack | devsystemconf-homes-app-system-configuration
devsystemconf-homes-app-system-configuration | UPDATE_COMPLETE | AWS::CloudFormation::Stack | devsystemconf-homes-app-system-configuration

 βœ…  devsystemconf-homes-app-system-configuration
I would like to know if this redeployment is supposed to happen every time, even with no real changes, or if I am missing something. πŸ™‚