Skip to content

Conversation

@tamirkamara
Copy link
Collaborator

What is being addressed

The api healthcheck script is mainly used in cicd to test if it's healthy before starting sending requests to it. The current method isn't efficient as it sleep time between attempts starts with high numbers (180 secs) and is reduced as attempts are made, the result is several minutes are waisted on cicd runs I've seen recently.
Another issue was that the script didn't recognize some situations correctly and first attempts on new environments are likely to produce a failure. I'm not sure why exactly but this new version seem to work better.

How is this addressed

  • Fixed time between attempts of 10 secs, max 7 mins.
  • Echo results more clearly.

@tamirkamara tamirkamara requested a review from a team as a code owner January 13, 2026 12:33
Copilot AI review requested due to automatic review settings January 13, 2026 12:33
@github-actions
Copy link

github-actions bot commented Jan 13, 2026

Unit Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit e51b549.

♻️ This comment has been updated with latest results.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rewrites the API health check script to improve efficiency in CI/CD pipelines by replacing variable sleep intervals (starting at 180 seconds) with fixed 10-second intervals and a 7-minute maximum timeout.

Changes:

  • Replaced retry logic with fixed 10-second check intervals and 7-minute maximum timeout
  • Refactored code into dedicated functions for better separation of concerns
  • Enhanced output messages with clearer progress indicators and elapsed time tracking

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
devops/scripts/api_healthcheck.sh Complete rewrite of health check logic with fixed intervals, better structure, and improved output
CHANGELOG.md Added entry documenting the script improvements

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Copy link
Member

@marrobi marrobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it works, LGTM! Is an outstanding copilot comment...

@tamirkamara tamirkamara force-pushed the tamirkamara/update-health-script branch from dd78080 to e7ef3eb Compare January 18, 2026 08:50
@tamirkamara tamirkamara requested a review from JC-wk January 18, 2026 08:51
@tamirkamara
Copy link
Collaborator Author

/test

@github-actions
Copy link

🤖 pr-bot 🤖

🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/21109558672 (with refid f6f3b68a)

(in response to this comment from @tamirkamara)

1 similar comment
@github-actions
Copy link

🤖 pr-bot 🤖

🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/21109558672 (with refid f6f3b68a)

(in response to this comment from @tamirkamara)

@tamirkamara tamirkamara enabled auto-merge (squash) January 18, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants