PecanProject / pecan-status-board

workflow integration testing status board
Other
2 stars 3 forks source link

Error in `statusboard::run_app()`: 'id variables not found in data: Workflow_id' #19

Open Sweetdevil144 opened 4 months ago

Sweetdevil144 commented 4 months ago

Description

Encountering repeated errors when using statusboard::run_app() in the PEcAn project. This issue seems to be a common point of failure in our runs with the following error message:

Warning: Error in : id variables not found in data: Workflow_id
  52: stop
  51: melt_check
  50: melt.data.frame
  48: module
  43: callModule
  42: moduleServer
  41: mod_workflows_satus_server
  40: server
   3: runApp
   2: print.shiny.appobj
   1: <Anonymous>
Error: id variables not found in data: Workflow_id

Notice the stack calls made which start from either R/app_server.R OR R/mod_workflows_status.R.

Steps to Reproduce

  1. Run statusboard::run_app() after running library(statusboard)
  2. Any other steps or conditions under which the error occurs, i.e, similar further cases where error messgae may pinpoint to two or more different error origins.

Expected Behavior

If we were to create specifc error messages and specific test cases for each of our /R/*.R files beforehand, we'd find ease to pinpoint exact origins of errors in such scenarios.

Actual Behavior

The application fails to run, showing the error message related to missing 'Workflow_id' in the data.

Possible Solution (Proposal)

I'd like to propose crafting specific test cases for such condition specific functions to ease the process of debugging.

This error could be indicative of an issue with the data structure expected by the melt.data.frame function or the input provided to it. Debugging each file involved in the stack trace could help locate the exact source of the error. For instance:

This approach should make it easier to identify whether the issue is with the data being passed to the function or within the function itself.

New WARNING logs noticed. Notice the stack calls made which start from either R/app_server.R OR R/mod_workflows_status.R.

Originally posted in #13 over here : https://github.com/PecanProject/pecan-status-board/issues/13#issuecomment-2003199707