-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: get job run from Optimus DB #278
base: release-v0.16
Are you sure you want to change the base?
Conversation
// JobRun currently gets the job runs from scheduler based on the criteria | ||
// TODO: later should collect the job runs from optimus | ||
// GetJobRun gets job runs from optimus DB based on the criteria | ||
func (h JobRunHandler) GetJobRun(ctx context.Context, req *pb.GetJobRunsRequest) (*pb.GetJobRunsResponse, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we provide test for this handler?
@@ -146,6 +149,27 @@ func (s *JobRunService) JobRunInput(ctx context.Context, projectName tenant.Proj | |||
return s.compiler.Compile(ctx, details, config, executedAt) | |||
} | |||
|
|||
func (s *JobRunService) GetJobRunsByFilter(ctx context.Context, projectName tenant.ProjectName, jobName scheduler.JobName, filters ...filter.FilterOpt) ([]*scheduler.JobRun, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also add test for this function as well
@@ -90,6 +91,56 @@ func (j *JobRunRepository) GetByID(ctx context.Context, id scheduler.JobRunID) ( | |||
return jr.toJobRun() | |||
} | |||
|
|||
func (j *JobRunRepository) GetLatestRun(ctx context.Context, project tenant.ProjectName, jobName scheduler.JobName, runState *scheduler.State) (*scheduler.JobRun, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also provide test GetLatestRun
and GetRunsByTimeRange
can you update proto commit reference in Makefile? I believe this should be changed according to this PR |
No description provided.