Skip to content

Conversation

@Harsh-Microsoft
Copy link
Contributor

Purpose

This pull request improves the retry mechanism for uploading files to Azure Blob Storage in the infra/scripts/copy_kb_files.sh script. The changes increase the maximum retry attempts, enhance logging for better visibility, and refine the retry logic to handle failures more effectively.

Enhancements to retry mechanism:

  • Increased the maximum number of retry attempts from 3 to 5 for uploading files to Azure Blob Storage. (maxRetries variable added and used consistently)
  • Improved logging to include the current attempt number and the total number of retries, along with the wait time before the next retry.
  • Updated retry logic to double the sleep time between attempts and added a final error message if all retry attempts fail.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

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 improves the retry mechanism for Azure Blob Storage file uploads by increasing retry attempts from 3 to 5, enhancing error messaging with attempt counters, and refining the retry logic to better handle upload failures.

  • Increased maximum retry attempts from 3 to 5 for better resilience
  • Enhanced logging to show current attempt number and wait time
  • Fixed retry logic by removing duplicate sleep calls and adding proper failure handling

if [ $? -ne 0 ]; then
retries=3
maxRetries=5
retries=$maxRetries
Copy link

Copilot AI Jul 16, 2025

Choose a reason for hiding this comment

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

The retry logic is duplicated between two upload operations. Consider extracting this into a reusable function to reduce code duplication and improve maintainability.

Copilot uses AI. Check for mistakes.
@Roopan-Microsoft Roopan-Microsoft merged commit c8e986c into main Jul 16, 2025
8 checks passed
@Roopan-Microsoft Roopan-Microsoft deleted the hb/fix-upload-scripts branch July 16, 2025 14:39
@github-actions
Copy link

🎉 This PR is included in version 1.6.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Roopan-Microsoft added a commit that referenced this pull request Jul 17, 2025
* updated model capacity minimume to 200 (#602)

* docs: Added file and images (#577)

* Create exp.md

* Add files via upload

* Delete docs/images/re_use_log/exp.md

* Add files via upload

* Update CustomizingAzdParameters.md

* Update DeploymentGuide.md

add the section Reusing an Existing Log Analytics Workspace

* Update re-use-log-analytics.md

update the back link url and remove extra space

---------

Co-authored-by: Roopan-Microsoft <[email protected]>
Co-authored-by: Thanusree-Microsoft <[email protected]>

* docs:  Add and update links for CustomizingAzdParameters.md and re-use-log-analytics.md (#606)

* Update CustomizingAzdParameters.md

Added link

* Update re-use-log-analytics.md

Updated link

* fix: Increase retry attempts and improve error messaging for Azure Blob Storage uploads (#607)

---------

Co-authored-by: Priyanka-Microsoft <[email protected]>
Co-authored-by: Atulku-Microsoft <[email protected]>
Co-authored-by: Roopan-Microsoft <[email protected]>
Co-authored-by: Thanusree-Microsoft <[email protected]>
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.

3 participants