[PR #11822] [MERGED] core: remove old Go API and extend misc/api.func with new backend #9772

Closed
opened 2026-02-26 17:31:40 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/11822
Author: @MickLesk
Created: 2/12/2026
Status: Merged
Merged: 2/12/2026
Merged by: @michelroegl-brunner

Base: mainHead: api_refactor


📝 Commits (3)

  • 29171d2 Remove Go API and extend misc/api.func
  • af83d3d Start install timer and refine error reporting
  • 564b8e6 Report install start/failure to telemetry API

📊 Changes

7 files changed (+854 additions, -803 deletions)

View changed files

api/.env.example (+0 -5)
api/go.mod (+0 -23)
api/go.sum (+0 -56)
api/main.go (+0 -450)
📝 misc/api.func (+750 -164)
📝 misc/build.func (+15 -6)
📝 misc/error_handler.func (+89 -99)

📄 Description

✍️ Description

Delete the Go-based API (api/main.go, api/go.mod, api/go.sum, api/.env.example) and significantly enhance misc/api.func. The shell telemetry file now includes telemetry configuration, repo source detection, GPU/CPU/RAM detection (if needed), expanded explain_exit_code mappings, and refactored post_to_api/post_to_api_vm to send non-blocking telemetry to telemetry.community-scripts.org while respecting DIAGNOSTICS/DEV_MODE and adding richer metadata (cpu/gpu/ram/repo_source). Also updates header and improves privacy/robustness and error handling.

What is collected:

  • Script name and installation status (success/failed)
  • Container/VM type and resource allocation (CPU, RAM, disk)
  • OS type and version
  • Proxmox VE version
  • Anonymous session ID (randomly generated UUID)

What is NOT collected:

  • IP addresses (not logged, not stored)
  • Hostnames or domain names
  • User credentials or personal information
  • Hardware identifiers (MAC addresses, serial numbers)
  • Network configuration or internal IPs
  • Any data that could identify a person or system

What this enables:

  • Understanding which scripts are most popular
  • Identifying scripts with high failure rates
  • Tracking resource allocation trends
  • Improving script quality based on real-world data

Repo for API-Service is now live here: https://github.com/community-scripts/telemetry-service
Dashboard for Everyone!: https://telemetry.community-scripts.org/

Fun-Fact:

  • all main contributor get an weekly report via mail with failure rates and top installed scripts.
  • we therefore intend to identify the scripts with the highest error rate, test them, and fix them immediately.

(Test Data from VED)
image

Fixes #

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/11822 **Author:** [@MickLesk](https://github.com/MickLesk) **Created:** 2/12/2026 **Status:** ✅ Merged **Merged:** 2/12/2026 **Merged by:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Base:** `main` ← **Head:** `api_refactor` --- ### 📝 Commits (3) - [`29171d2`](https://github.com/community-scripts/ProxmoxVE/commit/29171d2e27a4b8135e19ffca8e478ca7d2097cd0) Remove Go API and extend misc/api.func - [`af83d3d`](https://github.com/community-scripts/ProxmoxVE/commit/af83d3d4282ba9ccc60bb7702a0c012119b83084) Start install timer and refine error reporting - [`564b8e6`](https://github.com/community-scripts/ProxmoxVE/commit/564b8e68506bdb395f4c622d9da11742d07ab62c) Report install start/failure to telemetry API ### 📊 Changes **7 files changed** (+854 additions, -803 deletions) <details> <summary>View changed files</summary> ➖ `api/.env.example` (+0 -5) ➖ `api/go.mod` (+0 -23) ➖ `api/go.sum` (+0 -56) ➖ `api/main.go` (+0 -450) 📝 `misc/api.func` (+750 -164) 📝 `misc/build.func` (+15 -6) 📝 `misc/error_handler.func` (+89 -99) </details> ### 📄 Description <!--🛑 New scripts must be submitted to [ProxmoxVED](https://github.com/community-scripts/ProxmoxVED) for testing. PRs without prior testing will be closed. --> ## ✍️ Description Delete the Go-based API (api/main.go, api/go.mod, api/go.sum, api/.env.example) and significantly enhance misc/api.func. The shell telemetry file now includes telemetry configuration, repo source detection, GPU/CPU/RAM detection (if needed), expanded explain_exit_code mappings, and refactored post_to_api/post_to_api_vm to send non-blocking telemetry to telemetry.community-scripts.org while respecting DIAGNOSTICS/DEV_MODE and adding richer metadata (cpu/gpu/ram/repo_source). Also updates header and **improves privacy**/**robustness and error handling**. **What is collected:** - Script name and installation status (success/failed) - Container/VM type and resource allocation (CPU, RAM, disk) - OS type and version - Proxmox VE version - Anonymous session ID (randomly generated UUID) **What is NOT collected:** - IP addresses (not logged, not stored) - Hostnames or domain names - User credentials or personal information - Hardware identifiers (MAC addresses, serial numbers) - Network configuration or internal IPs - Any data that could identify a person or system **What this enables:** - Understanding which scripts are most popular - Identifying scripts with high failure rates - Tracking resource allocation trends - Improving script quality based on real-world data Repo for API-Service is now live here: https://github.com/community-scripts/telemetry-service Dashboard for Everyone!: https://telemetry.community-scripts.org/ Fun-Fact: - all main contributor get an weekly report via mail with failure rates and top installed scripts. - we therefore intend to identify the scripts with the highest error rate, test them, and fix them immediately. (Test Data from VED) <img width="403" height="564" alt="image" src="https://github.com/user-attachments/assets/7b0fab35-6ebd-46a4-9cb8-546a971afdc8" /> ## 🔗 Related Issue Fixes # ## ✅ Prerequisites (**X** in brackets) - [x] **Self-review completed** – Code follows project standards. - [x] **Tested thoroughly** – Changes work as expected. - [x] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [ ] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [x] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 17:31:40 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#9772
No description provided.