-
Notifications
You must be signed in to change notification settings - Fork 5
[DO NOT MERGE] Batch connect erb fix #449
base: master
Are you sure you want to change the base?
Conversation
When building navigation menu, we previously rendered the form.yml.erb files to get the title and description. This change prevents rendering the erb to build the navigation menu by default. For "subapps" i.e. desktop configs, you can add a manifest per config with the same name as the form.yml, but with .manifest.yml as the extension. Otherwise the titleized form of the filename will be used. For previous functionality set OOD_RENDER_BATCH_CONNECT_ERB_FOR_NAV=1
I need to fix something. This method still does erb rendering:
In fact, it would be proper or even ideal to have a separate |
|
if Configuration.render_batch_connect_erb_for_nav? is false, we avoid rendering erb when generating nav by defining form_config as {} we also define a separate BatchConnect::App#authorized? that doesn't check the validity of form_config and only ensures if a cluster is defined the user can submit jobs to it note: this authorized? method still needs to be fixed to enable specifying the cluster or clusters used in the manifest since this wouldn't be available from form_config
The last commit I made to the PR is problematic and doesn't have tests. I mean it probably works, but other edge case bugs are introduced. For example:
These edge cases aren't worth fixing though IMHO. We should not have "subapps" to begin with which is what introduces the complexity here. Proper tests would verify a normal batch connect app (Jupyter) and a sub app (some Desktop) would both be "uauthorized" if they submitted to "ruby" cluster and you werent part of the required group, for example (i.e. mock |
Fixes #417
When building navigation menu, we previously rendered the form.yml.erb
files to get the title and description.
This change prevents rendering the erb to build the navigation menu by default.
For "subapps" i.e. desktop configs, you can add a manifest per config with the same
name as the form.yml, but with .manifest.yml as the extension. Otherwise the titleized
form of the filename will be used.
For previous functionality set
OOD_RENDER_BATCH_CONNECT_ERB_FOR_NAV=1
I copied an integration test that was already testing the interactive apps menu built because it was easy. That test can probably be simplified and setup duplication moved to a helper method - or even this set of tests moved to a separate test file - that might make things clearer.