Skip to content

Get ePolyScat run lifecycle working: SDK enum compat, resource surfac…#4

Open
Softicles wants to merge 1 commit into
SciGaP:mainfrom
Softicles:epolyscat-run-lifecycle
Open

Get ePolyScat run lifecycle working: SDK enum compat, resource surfac…#4
Softicles wants to merge 1 commit into
SciGaP:mainfrom
Softicles:epolyscat-run-lifecycle

Conversation

@Softicles

Copy link
Copy Markdown

SDK enum API compatibility (models.py, views.py)

  • Situation: The installed airavata-python-sdk generates ExperimentState and DataType as enum.IntEnum, but the code still used the old Thrift-generated _VALUES_TO_NAMES / _NAMES_TO_VALUES lookup dicts, which no longer exist.
  • Task: Restore enum<->name lookups in a way compatible with the IntEnum API.
  • Action: Replaced _VALUES_TO_NAMES[x] with EnumType(x).name and _NAMES_TO_VALUES[name] with EnumType[name].value across experiment-status and output data-type handling.
  • Result: Status tracking and output-type resolution no longer raise AttributeError; experiment state is read correctly.

Expose the compute resource on the Run API (serializers.py)

  • Situation: The runs listing needed to show which compute resource each run targets, but RunSerializer did not expose a resource field.
  • Task: Surface the resource in the run's API representation.
  • Action: Enabled the resource SerializerMethodField and added "resource" to RunSerializer.Meta.fields.
  • Result: The API returns each run's resource (e.g. login.expanse.sdsc.edu).

Align the Run DB schema with nullable model fields (migrations/0023)

  • Situation: Creating a run via the API failed with HTTP 500 "NOT NULL constraint failed: epolyscat_django_app_run.experiment_id" because the database still enforced NOT NULL on columns the model declares nullable.
  • Task: Bring the schema in line with the model so a run can be created without an experiment/root.
  • Action: Generated the missing migration altering experiment, filepath, number and root on run.
  • Result: Run creation succeeds and experiment-less runs persist.

Redesign the Runs table (Runs.vue)

  • Situation: The runs table showed a Last Modified column, sorted by date, with one action set for every context and no way to filter.
  • Task: Match the new design—show the target resource, allow filtering, and tailor row actions to the viewing context.
  • Action: Added a filter search box, replaced Last Modified with a Resource column (sorted by resource name), and split row actions into an All-Runs set (clone, delete) versus a view/tutorial set (remove, clone, submit/resubmit, delete); refreshed layout and icons.
  • Result: Runs are filterable, display their resource, and show context-appropriate actions.

…ing, nullable schema, runs UI

Related fixes and enhancements so the ePolyScat run create/submit lifecycle
works end-to-end and the runs listing reflects the new design. Each change is
described with STAR (Situation, Task, Action, Result).

SDK enum API compatibility (models.py, views.py)
- Situation: The installed airavata-python-sdk generates ExperimentState and
  DataType as enum.IntEnum, but the code still used the old Thrift-generated
  _VALUES_TO_NAMES / _NAMES_TO_VALUES lookup dicts, which no longer exist.
- Task: Restore enum<->name lookups in a way compatible with the IntEnum API.
- Action: Replaced _VALUES_TO_NAMES[x] with EnumType(x).name and
  _NAMES_TO_VALUES[name] with EnumType[name].value across experiment-status and
  output data-type handling.
- Result: Status tracking and output-type resolution no longer raise
  AttributeError; experiment state is read correctly.

Expose the compute resource on the Run API (serializers.py)
- Situation: The runs listing needed to show which compute resource each run
  targets, but RunSerializer did not expose a `resource` field.
- Task: Surface the resource in the run's API representation.
- Action: Enabled the `resource` SerializerMethodField and added "resource" to
  RunSerializer.Meta.fields.
- Result: The API returns each run's resource (e.g. login.expanse.sdsc.edu).

Align the Run DB schema with nullable model fields (migrations/0023)
- Situation: Creating a run via the API failed with HTTP 500
  "NOT NULL constraint failed: epolyscat_django_app_run.experiment_id" because
  the database still enforced NOT NULL on columns the model declares nullable.
- Task: Bring the schema in line with the model so a run can be created without
  an experiment/root.
- Action: Generated the missing migration altering experiment, filepath, number
  and root on run.
- Result: Run creation succeeds and experiment-less runs persist.

Redesign the Runs table (Runs.vue)
- Situation: The runs table showed a Last Modified column, sorted by date, with
  one action set for every context and no way to filter.
- Task: Match the new design—show the target resource, allow filtering, and
  tailor row actions to the viewing context.
- Action: Added a filter search box, replaced Last Modified with a Resource
  column (sorted by resource name), and split row actions into an All-Runs set
  (clone, delete) versus a view/tutorial set (remove, clone, submit/resubmit,
  delete); refreshed layout and icons.
- Result: Runs are filterable, display their resource, and show
  context-appropriate actions.
@Softicles Softicles mentioned this pull request Jun 17, 2026
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.

1 participant