Skip to content

Conversation

@vikaxsh
Copy link
Collaborator

@vikaxsh vikaxsh commented Sep 3, 2025

…ove health checks

Description

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Scenario A
  • Scenario B

Screenshots or Recordings

Related PR's (If Any):

@vikaxsh vikaxsh changed the title feat: add retry with exponential backoff for Temporal client and impr… feat: add health check in temporal service and retry with exponential backoff for Temporal client Sep 3, 2025
@vishalm0509
Copy link
Collaborator

Retry count is not equal to MaxRetryCount defined in the constant. Can you check once.

There is something in the library called backoff.WithMaxRetries, check if that can help

Screenshot 2025-09-11 at 4 14 36 PM

// Construct a query for workflows related to this project and job
query := fmt.Sprintf("WorkflowId between 'sync-%s-%d' and 'sync-%s-%d-~'", projectIDStr, job.ID, projectIDStr, job.ID)
// List workflows using the direct query
if c.tempClient == nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

In destination.go and source.go we are using

if c.tempClient != nil { 

}

Here we are checking

if c.tempClient == nil {
		utils.ErrorResponse(&c.Controller, http.StatusInternalServerError, "Temporal client is not initialized")
		return
	}

Can we make it consistent

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

to avoid extra lines of code, at some places we not using response from function

Copy link
Collaborator

Choose a reason for hiding this comment

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

if c.tempClient == nil {  
        utils.ErrorResponse(&c.Controller, http.StatusInternalServerError, "Temporal client is not initialized")  
        return  
    }

I mean we are throwing this error only in job, and not in source and destination. Just to make it consistent.

@shubham19may
Copy link
Contributor

Closing as already implemented backoff in refactoring.

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.

5 participants