PhilanthropyDataCommons / deploy

Deployment scripts for Philanthropy Data Commons service
GNU Affero General Public License v3.0
2 stars 2 forks source link

Expect a line terminator in software-version URL #109

Closed bickelj closed 5 months ago

bickelj commented 5 months ago

Without this change, the CI action that asks which version is running in a target environment would fail because of a line terminator difference in the expected string versus the returned string.

This change attempts to fix the issue by adding an escaped endline to the expected response body.

Issue #106 Auto-deploy to production

bickelj commented 5 months ago

I am testing this change with a (temporary) tag I pushed onto this commit: 20240328-cb6240c-throwaway.

bickelj commented 5 months ago

Adding \n to the string didn't work.

bickelj commented 5 months ago

I'm testing a regex in the expected body with temporary tag 20240328-340b762-throwaway.

bickelj commented 5 months ago

Woot. It worked. The reason you see a failed job here is that the job checking that the tag is on main correctly failed. We expect tags on main in the vast majority of instances.

bickelj commented 5 months ago

@artiz There are two issues revealed above.

  1. expectBody gets trimmed so we can't do a literal "expect this string followed by a newline".
  2. I notice https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ linked as being an issue with the action.

But I don't see an issues section in https://github.com/artiz/poll-endpoint and that this is a fork of (stale?) https://github.com/emilioschepis/wait-for-endpoint. For now I think we're OK but I suppose if GitHub really does remove the functionality we will need to change something.