Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get data-option-for-cluster-xxx to work #4004

Closed
akesandgren opened this issue Dec 10, 2024 · 3 comments
Closed

Can't get data-option-for-cluster-xxx to work #4004

akesandgren opened this issue Dec 10, 2024 · 3 comments
Milestone

Comments

@akesandgren
Copy link

akesandgren commented Dec 10, 2024

I can't get data-option-for-cluster-xxx to work
Other data-option-for-something-yyy does work
Running 3.1.10

form.yml:
---
cluster:
  - "kebnekaise"
...
form:
  - version
attributes:
  version:
    widget: select
    label: "R version"
    help: "This defines the version of R you want to load."
    options:
      - [ 
          "4.4.1", "foss/2023b RStudio-Server/2024.09.0+375-Java-11-R-4.4.1",
          data-option-for-cluster-kebnekaise: false,
        ]
      - [ 
          "4.0.1", "foss/2023b RStudio-Server/2024.09.0+375-Java-11-R-4.4.1",
          data-option-for-cluster-kebnekaise: true,
        ]

bc_dynamic_js is true, checked by looking in the web page source under ood_config

I've been trying everything I can think of but it just doesn't take effect, I always see both version choices.

The app is converted from bc_osc_rstudio_server (https://github.com/OSC/bc_osc_rstudio_server.git)

@osc-bot osc-bot added this to the Backlog milestone Dec 10, 2024
@johrstrom
Copy link
Contributor

You're running into this issue: #3857 which will be fixed in 4.0.

The issue is that you only have 1 cluster defined (kebnekaise). So if 4.4.1 isn't available for the only cluster you have an option for, why's it in the form? at least that was the rationale for why it behaves like this currently.

If you wanted to hot patch your system you could apply the same patch in #3931, but I'd suggest you back up any files first.

@akesandgren
Copy link
Author

I tried having two clusters (one fake) listed in the form and it still didn't work.
Although there is only one cluster defined in clusters.d, is that the reason?

I was just testing things and wanted to see if that worked :-)

@akesandgren
Copy link
Author

And yes, patching app.rb makes things work perfectly :-)

Thanks, at least I know it wasn't me misunderstanding things completely ...

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

No branches or pull requests

3 participants