Skip to content

Commit

Permalink
Add WithContext for configuration repo get call (#318)
Browse files Browse the repository at this point in the history
* add context

Signed-off-by: troychiu <[email protected]>

* spell error

Signed-off-by: troychiu <[email protected]>

---------

Signed-off-by: troychiu <[email protected]>
  • Loading branch information
troychiu authored Jun 12, 2024
1 parent 0683d18 commit f601edb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flyteadmin/pkg/repositories/gormimpl/configuration_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (r *ConfigurationRepo) GetActive(ctx context.Context) (models.Configuration
var metadata models.ConfigurationDocumentMetadata
timer := r.metrics.GetDuration.Start()
// Get the only one active configuration document
tx := r.db.Where(&models.ConfigurationDocumentMetadata{
tx := r.db.WithContext(ctx).Where(&models.ConfigurationDocumentMetadata{
Active: true,
}).Take(&metadata)
timer.Stop()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func newBufferedEventRecorder() *bufferedEventRecorder {
}

func TestGetPluginLogs(t *testing.T) {
// intitialize log plugin
// initialize log plugin
logConfig := &logs.LogConfig{
Templates: []tasklog.TemplateLogPlugin{
tasklog.TemplateLogPlugin{
Expand Down

0 comments on commit f601edb

Please sign in to comment.