openml / openml/OpenML

backend: Add missing error logging for ElasticSearch indexing failures

Open
#1,297 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
755
Forks
128
PR merge metrics
No merged PRs in 30d

Description

Description

Currently, several API models and the ElasticSearch library contain empty catch blocks that silently swallow exceptions during ElasticSearch indexing (e.g., when uploading datasets, flows, runs, or studies). These blocks contain // TODO: should log comments left by maintainers.

Silently ignoring these exceptions makes it difficult to diagnose why certain entities fail to appear in ElasticSearch indices in production.

We should replace these empty catch blocks with CodeIgniter's log_message('error', ...) function so that indexing failures are properly recorded in the system logs.

Files needing updates:

  • openml_OS/models/api/v1/Api_data.php
  • openml_OS/models/api/v1/Api_flow.php (2 locations)
  • openml_OS/models/api/v1/Api_run.php
  • openml_OS/models/api/v1/Api_study.php
  • openml_OS/libraries/ElasticSearch.php (2 locations)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the empty catch blocks and TODO comments in openml_OS/models/api/v1/Api_data.php, Api_flow.php, Api_run.php, Api_study.php, and openml_OS/libraries/ElasticSearch.php. Start by comparing the surrounding indexing flows and existing CodeIgniter logging usage. Done means each listed indexing failure records an error through log_message('error', ...) instead of being silently ignored.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, php
Domain
backend, observability, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.