mirror of
https://github.com/amidaware/tacticalrmm.git
synced 2026-04-26 06:55:52 +03:00
[GH-ISSUE #1486] Feature Request: Provide a sane path for life cycle of community scripts #2874
Labels
No labels
In Process
bug
bug
dev-triage
documentation
duplicate
enhancement
fixed
good first issue
help wanted
integration
invalid
pull-request
question
requires agent update
security
ui tweak
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tacticalrmm#2874
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NiceGuyIT on GitHub (Apr 16, 2023).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1486
Is your feature request related to a problem? Please describe.
As a user, if I start using a community script, what happens if that script is later renamed, deprecated or has a breaking change?
As a developer, how do I communicate to people using the script that a script is deprecated, has a breaking change, or possibly renamed/removed?
Describe the solution you'd like
I would like a clear path for the life cycle of community scripts, and have this documented in the documentation. Here are some ideas to improve visibility of the life cycle.
Describe alternatives you've considered
N/A
Additional context
Related to issue #1206 which stores custom scripts in a separate repo. This feature request is specifically about community scripts.
The current path needs documentation. I believe changes are applied automatically, but I don't know about renaming or deleting scripts. Are those removed from the user's dashboard?
@silversword411 commented on GitHub (Apr 16, 2023):
The path has been existing scripts aren't approved unless I make sure someone doesn't break something (why there's 1-2 unaccepted PRs ATM)
I think there's something in the contributing docs that mentions that fact
@NiceGuyIT commented on GitHub (Apr 17, 2023):
I'm cleaning up some policies and if a custom script is modified after being added to a policy:
This makes it very difficult to see which (task) script is creating the output. A small workaround might be to output the script name, last modified and version number in a header for all scripts. I'm talking custom scripts because you can't modify community scripts.
@silversword411 commented on GitHub (Apr 18, 2023):
There's definitely some room for improvements to the system, let's discuss!
@NiceGuyIT commented on GitHub (Apr 18, 2023):
I created a script called
🔥🔥🔥🔥🔥🔥Test - File Rename. This was manually added to the community scripts and then imported. I can see it in the script manager. Then I added the script to a policy as both a script check and task. Finally, I renamed the script to🧊🧊🧊🧊🧊🧊Test - File Renameand imported it again. Let's see which systems are updated with the new name.Script manager was updated, obviously.

Automation Manager >Checks was updated.

Automation Manager > Tasks was not updated. Note: You need to edit the task to see which scripts are attached since multiple scripts can be attached to a single task.

Agent > Checks was updated.

Agent > Tasks does not show the script name.
TL/DR: Bug confirmed: Renaming the script does not rename the script in the task. All other place are renamed. I'll open an issue for this.
While writing this, I added the necessary information to the
community_scripts.jsonwhich includes a UUID. I realize now if the UUID does not change, the name can be anything and is separate from the filename on disk. From a systems perspective, anything that is upstream is automatically applied when updating.@NiceGuyIT commented on GitHub (Apr 18, 2023):
Deleting the script from the community script library appears to remove it from all sources. The script is removed from the task and the task remains because it can have multiple scripts. How is the user notified if the script is no longer attached to the task? The current system silently deletes the script from their task.
@silversword411 commented on GitHub (Apr 18, 2023):
I had a feeling that's what would happen, why I did that huge update a while ago pre-policy rework, and have been very careful on script updates ever since.
We should definitely have some safeguards in place though.
@silversword411 commented on GitHub (Aug 30, 2023):
Related: https://github.com/amidaware/tacticalrmm/issues/1489
@silversword411 commented on GitHub (Aug 30, 2023):
How about starting with naming and keyword conventions:
If a script has become deprecated or invalid for some reason for now we can't just delete the community script. Best practices would be to:
name:field in the .json to start withzzDEPRECATEDfilename:field in the .json to start withzzDEPRECATED_description:field in the .json. Include notes/URLs as appropriate.category:field toDEPRECATED/scripts/to match jsonfilename:Once we have a fixed workflow on how script files are deleted from the community script library that are in use in peoples TRMM servers we can work on making them go away permanently.
@dinger1986 commented on GitHub (Aug 30, 2023):
Sounds perfect to me
@NiceGuyIT commented on GitHub (Jul 20, 2025):
To expand on this, adding a standard header to the files may help. If the file is coming from another system, like another git repo, having (duplicating) the fields in a header at the top of the script will help make the scripting system play nice with other systems.
Adding a version to the JSON or header will help, even if the version is a commit hash. Exporting the scripts will retain the version and help with the overall life cycle of the script.
As Tactical matures, versioning the community-scripts repo to match a tacticalrmm version makes sense. The community scripts are not versioned and the Tactical update process uses git pull to update the scripts from main before importing.