Unexpected errors when using a keyword "format" in form.yml

Hi developers,

We are using Open OnDemand version 4.1.1 on Rocky Linux 9.7 with the Slurm scheduler. The same issue also occurs with Open OnDemand version 4.0.8.

When the keyword format is used in form.yml, unexpected behavior occurs.

Example

form:
  - format

attributes:
  format:
    widget: 'select'
    options:
      - ["zip"]
      - ["gz"]

When submitting the job using the “Launch” button, the following error occurs:

However, if the keyword is changed from format to format2, the job submission works correctly.

Is the format a reserved keyword in interactive apps?

Best regards,

Yes I believe it’s a ruby function for formatting strings, but I thought we’d fixed this issue long ago (parititon was the erroneous name we’d fixed before if I recall correctly).

I’ll take a look at it and file a ticket upstream if it’s a bug.

I’ve created this issue below upstream for this. I have the fix in the ticket but I see it may be in other places too so that may not be the actual fix we use.

In any case, with 4.2 being so soon and small in scope I don’t know when we’ll patch this.

@jeff.ohrstrom Thank you for your reply.

The partition issue is mentioned in the warning on the following page:

Thus, I assumed the issue had not been fully resolved and didn’t mention it earlier.

parititon was the erroneous name we’d fixed before if I recall correctly

However, based on the current behavior, it seems the problem still exists. I used the following example:

form:
- partition

attributes:
  partition:
    widget: 'select'
    options:
      - ["fx700"]
      - ["genoa"]

The job submission is successful. However, after the job finishes, clicking the “Relaunch” button results in an error.


If the attribute name is changed from partition to partition2, the issue does not occur.

Best regards,

We likely need to remove that item from the documentation which I’ll do shortly.

I think your issue wish partition is as simple as it’s being cached. I’m guessing one value is being cached and the other value is being used in the submit.yml.erb.

I.e., partition is in your cache, but submit.yml.erb expects/uses the variable partition2. When you reluanch you use the cached values - but since partition2 is being used in the submit.yml.erb it’s being evaluated as an empty string because partition is the variable that’s being populated.

Thank you for your suggestion.

I tried the following steps to rule out any caching issues:

  1. Removed the my data directory for OOD (${HOME}/ondemand)
  2. Clicked “Restart Web Server” from the navigation bar
  3. Launched a job using the variable partition in both form.yml.erb and submit.yml.erb
  4. Stopped the job manually using scancel command
  5. Clicked Relaunch

However, I still encounter the same error.

Given that ${HOME}/ondemand was removed and the web server was restarted, I believe any cached values should have been cleared at that point.

Best regards,

1,000 apologies. You’re right about partition - when I thought I fixed this, I wrote a test case for it and only checked how it renders in the form. partition renders in the form correctly - but is then evaluated differently when it submits.

I’ve created this ticket upstream for the same.

1 Like