adrianjost / actions-surge.sh-teardown

An GitHub Action to TearDown surge.sh projects that match a regex
MIT License
3 stars 1 forks source link

The action no longer works after the release of surge 0.24 #2090

Closed tbouffard closed 1 month ago

tbouffard commented 1 month ago

Hi, In the workflow of my projects where I use actions-surge.sh-teardown, the execution of the action never completes and the workflow execution is canceled after 6 hours.

Execution logs with failures Sat, 17 Aug 2024 03:02:12 GMT Run adrianjost/actions-surge.sh-teardown@v1.0.3 Sat, 17 Aug 2024 03:02:23 GMT search for projects that match /[1-9]+ month.? ago/i Sat, 17 Aug 2024 03:02:23 GMT found 27 projects for teardown Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated 1 month ago) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 03:02:23 GMT teardown undefined (last updated ) Sat, 17 Aug 2024 09:02:10 GMT Error: The operation was canceled.

Apparently, the logs produced by surge@0.24 to list deployments are not the same as the logs produced by surge@0.23 In version 0.23, the log for a deployment starts with a timestamp which is no longer present with version 0.24.

The action parse the log of the surge list command (https://github.com/adrianjost/actions-surge.sh-teardown/blob/v1.0.3/index.js#L19-L23), so this is probably the cause of the problem.

0.23 0.24
1717995909830 process-analytics-bpmn-visualization-js-demo_preview-pr-3103.surge.sh 3 weeks ago surge surge.sh Standard process-analytics-bpmn-visualization-js-demo_preview-pr-3103.surge.sh 3 weeks ago surge surge.sh Standard
tbouffard commented 1 month ago

To fix the problem, I see two solution

If you are interested @adrianjost, I can try to provide a fix on the regexp next week.

adrianjost commented 1 month ago

I think I already found a fix. At least locally it worked again. I just can't get my dryrun in CI working. Haven't touched this code for years, so no idea why.

adrianjost commented 1 month ago

I think https://github.com/adrianjost/actions-surge.sh-teardown/commit/27d0dc9ab910c2ae46c9389a6f2ca46101ac56a9 should fix the issue. I just need to get my actions back running to create a release.

tbouffard commented 1 month ago

Nice, thanks for the fix. 🏅 I will check the release once it is available.

adrianjost commented 1 month ago

I think I'm a bit stuck here. I can't get the CI to work. Does the action work for you, when you use uses: adrianjost/actions-surge.sh-teardown@master?

tbouffard commented 1 month ago

I have tested the master branch (72e5983380bce47a7bafd574bd74e055c0637686) and this works as expected. 💪🏿 For more details, see https://github.com/bonitasoft/bonita-documentation-site/issues/771#issuecomment-2304415900

adrianjost commented 1 month ago

It's weird that the action works just fine for you, but in my actions it doesn't. 🤷‍♂️ I will create a release for this fix soon. Either manually or by disabling some checks temporarily.

adrianjost commented 1 month ago

Not perfect, but at least it's tagged and released: https://github.com/adrianjost/actions-surge.sh-teardown/releases/tag/v1.0.4

tbouffard commented 1 month ago

Thanks for the release, I have tested it with 2 different surge accounts and it works perfectly. Thanks for your time. 🙏