[PR #2051] [MERGED] Fix command get policy works with relative policy path #2468

Closed
opened 2025-12-29 03:21:24 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2051
Author: @chuangbo
Created: 8/10/2024
Status: Merged
Merged: 8/12/2024
Merged by: @kradalby

Base: mainHead: fix/get-policy-api-with-relative-policy-path


📝 Commits (1)

  • b4345c3 Fix command get policy works with relative policy path

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 hscontrol/grpcv1.go (+2 -1)

📄 Description

  • have read the CONTRIBUTING.md file
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

This PR addresses the issue where the gRPC API fails to resolve relative policy file paths, unlike the server startup behavior. The fix ensures consistent handling of relative paths across server startup, CLI commands, and gRPC API calls.

Changes

  • Modified the policy file path resolution logic in the gRPC API handler to match the server startup behavior.
  • Ensured that relative paths are resolved relative to the location of the config.yaml file.

Fixes #2050


🔄 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/juanfont/headscale/pull/2051 **Author:** [@chuangbo](https://github.com/chuangbo) **Created:** 8/10/2024 **Status:** ✅ Merged **Merged:** 8/12/2024 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `fix/get-policy-api-with-relative-policy-path` --- ### 📝 Commits (1) - [`b4345c3`](https://github.com/juanfont/headscale/commit/b4345c3c3db796b307f5a7317d513202d29fe065) Fix command get policy works with relative policy path ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `hscontrol/grpcv1.go` (+2 -1) </details> ### 📄 Description <!-- Headscale is "Open Source, acknowledged contribution", this means that any contribution will have to be discussed with the Maintainers before being submitted. This model has been chosen to reduce the risk of burnout by limiting the maintenance overhead of reviewing and validating third-party code. Headscale is open to code contributions for bug fixes without discussion. If you find mistakes in the documentation, please submit a fix to the documentation. --> <!-- Please tick if the following things apply. You… --> - [x] have read the [CONTRIBUTING.md](./CONTRIBUTING.md) file - [x] raised a GitHub issue or discussed it on the projects chat beforehand - [ ] added unit tests - [ ] added integration tests - [ ] updated documentation if needed - [ ] updated CHANGELOG.md <!-- If applicable, please reference the issue using `Fixes #XXX` and add tests to cover your new code. --> This PR addresses the issue where the gRPC API fails to resolve relative policy file paths, unlike the server startup behavior. The fix ensures consistent handling of relative paths across server startup, CLI commands, and gRPC API calls. ## Changes - Modified the policy file path resolution logic in the gRPC API handler to match the server startup behavior. - Ensured that relative paths are resolved relative to the location of the config.yaml file. Fixes #2050 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 03:21:24 +01:00
adam closed this issue 2025-12-29 03:21:24 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2468