mirror of
https://github.com/therealpaulgg/ssh-sync-server.git
synced 2026-04-25 07:35:49 +03:00
[PR #27] Remove machine_id from SSH config #31
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ssh-sync-server#31
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?
📋 Pull Request Information
Original PR: https://github.com/therealpaulgg/ssh-sync-server/pull/27
Author: @Copilot
Created: 5/22/2025
Status: 🔄 Open
Base:
main← Head:copilot/fix-23📝 Commits (7)
40283beInitial plan for issuef948a3cRemove machine_id reference from SSH config in DeleteMachine9231adcAdd tests for DeleteMachine function5227a84Fix test implementation for DeleteMachine116f23fAdd proper tests for DeleteMachine function2d71d79Improve tests for DeleteMachine functionefc5039Add proper tests for DeleteMachine function📊 Changes
5 files changed (+442 additions, -6 deletions)
View changed files
📝
go.mod(+11 -1)📝
go.sum(+147 -0)➕
pkg/database/mocks/pgx_mock.go(+118 -0)📝
pkg/database/repository/machine.go(+1 -4)📝
pkg/database/repository/machine_test.go(+165 -1)📄 Description
This PR removes the unnecessary reference to
machine_idin SSH config that was causing data problems.Changes
The issue was in the
DeleteMachinefunction where it was trying to delete SSH configs associated with a machine ID:As stated in the issue, this was unnecessary and causing data problems. The fix simply removes this SQL query while keeping the core functionality intact.
The SshConfig model doesn't have a machine_id field, and no other code relies on this relationship, confirming that this reference was problematic and should be removed.
After this change, deleting a machine no longer attempts to delete SSH configs based on machine_id.
Fixes #23.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.