-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add job name prefix just before job submit. #3887
Add job name prefix just before job submit. #3887
Conversation
I think I see what's going on here.
So I think the fix is likely leaving |
I'm still a bit baffled by this. For the following example, Fixed Job Name:form.yml
cache.json
Has Job Name:form.yml
cache.json
I see no difference in the serialization and yet the name has a duplicated prefix if |
My solution normalizes what is submitted to the cluster but doesn't address why it needs to be normalized. |
OK- I actually know what's going on here. We get duplicate prefixes when you press You can inspect the HTML of this element and see it's a hidden Pressing this button sends this to the controller, which then appends the prefix again. The form is built from this method, where we're calling So, I think the best solution is just to have a simple --- a/apps/dashboard/app/lib/smart_attributes/attributes/auto_job_name.rb
+++ b/apps/dashboard/app/lib/smart_attributes/attributes/auto_job_name.rb
@@ -17,7 +17,7 @@ module SmartAttributes
# Defaults to ondemand/[dev,sys]/projects
# @return [String] attribute value
def value
- job_name(opts[:value] || 'Project Manager Job')
+ opts[:value] || 'Project Manager Job'
end
def widget
@@ -32,7 +32,7 @@ module SmartAttributes
# @param fmt [String, nil] formatting of hash
# @return [Hash] submission hash
def submit(*)
- { script: { job_name: value } }
+ { script: { job_name: job_name(value) } }
end |
This makes sense. Thank you! |
This fix checks job_name for a path before prepending said path to it.
Findings:
data/projects/<project_id>/.ondemand/scripts/<launcher_id>/cache.json
.Potential issue: