Task #2845 (closed)
Bug: script edit can lead to missing script
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | minor | Milestone: | OMERO-4.4 |
Component: | Scripting | Version: | n.a. |
Keywords: | n.a. | Cc: | jburel, wmoore |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.0d |
Sprint: | 2012-01-17 (6) |
Description
~/code/omero.git/dist $ bin/omero script edit file=18152 Using session ef6f9088-4545-4ffe-9169-791bef4bc947 (root@localhost). Idle timeout: 10.0 min. Current group: system Failed to find script: 18152 (exception ::omero::ValidationException { serverStackTrace = serverExceptionClass = message = Can't find params for 18152. No stderr }) ~/code/omero.git/dist $ vicp ../components/tools/OmeroPy/scripts/omero/analysis_scripts/Run_Cecog_4.1.py lib/scripts/omero/analysis_scripts/ Copied. ~/code/omero.git/dist $ bin/omero script list Using session ef6f9088-4545-4ffe-9169-791bef4bc947 (root@localhost). Idle timeout: 10.0 min. Current group: system id | Official scripts -------+-------------------------------------------- 4814 | /omero/analysis_scripts/FLIM.py 4815 | /omero/export_scripts/Make_Movie.py 4816 | /omero/figure_scripts/Movie_Figure.py 16151 | /omero/figure_scripts/Movie_ROI_Figure.py 4818 | /omero/figure_scripts/ROI_Split_Figure.py 4819 | /omero/figure_scripts/Split_View_Figure.py 4820 | /omero/figure_scripts/Thumbnail_Figure.py 4821 | /omero/import_scripts/Populate_ROI.py 4822 | /omero/setup_scripts/FLIM_initialise.py 4823 | /omero/util_scripts/Combine_Images.py 4824 | /omero/util_scripts/Images_From_ROIs.py (11 rows)
Change History (7)
comment:1 Changed 12 years ago by jmoore
- Milestone changed from Unscheduled to OMERO-Beta4.4
- Owner set to jmoore
- Sprint set to 2012-01-17 (6)
comment:2 Changed 12 years ago by jmoore
- Cc jburel wmoore added
- Status changed from new to accepted
comment:3 Changed 12 years ago by jmoore
- Owner jmoore deleted
- Status changed from accepted to new
comment:4 Changed 12 years ago by wmoore
I think the current handling is fine. Same as when you try to upload an invalid script, right? The error and message are perfectly clear I think.
Can you recover by using 'edit' or 'replace' to get the script running again? I seem to remember that working fine using 'replace'. If it also works with 'edit' then that's fine I think?
comment:5 Changed 12 years ago by jmoore
- Owner set to jmoore
- Remaining Time set to 0.1
- Status changed from new to accepted
comment:6 Changed 12 years ago by jmoore
- Remaining Time changed from 0.1 to 0
- Resolution set to fixed
- Status changed from accepted to closed
replace does work as expected, Will. edit does not, because there is currently no way to get the text from the bad script. An option like --overwrite would need to be added. I'll mention that under #2890. For the moment, I'm committing to my sprint6-server-backlog branch a minor fix to print:
~/git/dist $ bin/omero script edit 1565 Using session 09c00720-9fe6-4faa-982f-1e762470ee4a (root@localhost:4064). Idle timeout: 10.0 min. Current group: system No text for script: 1565 Does this file appear in the script list? If not, try 'replace'
If you have any suggestions, let me know.
comment:7 Changed 12 years ago by jmoore <josh@…>
(In [5cd136469e7860291011f97947c04b8213087c56/ome.git] on branch develop) Add help message on bad edit (Fix #2845, See #2890)
This is certainly happening, but the question is, how far should we go to prevent it. The file is still available, but has been marked as "not a script" in order to prevent something not-runnable from being listed by bin/omero script list. Suggestions on how best to handle it? Should we roll back the edit which could fail itself? Should we print a larger warning?
Here's a sample session with this issue: