Skip to content

Conversation

@NordLee
Copy link

@NordLee NordLee commented Aug 14, 2025

minor changes to to documentation is just fixing invalid urls

NordLee added 3 commits July 18, 2025 13:59
Fixed small documentation issues in CONTRIBUTING.md and USAGE.md
Added logs to server.go
Added logs to spire_api.go for agent backend
)

func (s *Server) healthcheck(w http.ResponseWriter, r *http.Request) {
log.Printf("LOG is working")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this added unintentionally?

serverConfig := s.TornjakConfig.Server
if serverConfig.HTTPConfig == nil {
err = fmt.Errorf("HTTP Config error: no port configured")
log.Println("Error:", err) // <-- New log
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me that the previous error message was more descriptive

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't think it's necessary to add // <-- New log to all the new comments

if serverConfig.HTTPSConfig.ListenPort == 0 {
// Fail because this is required field in this section
err = fmt.Errorf("HTTPS Config error: no port configured. Starting insecure HTTP connection at %d", serverConfig.HTTPConfig.ListenPort)
log.Println("Error:", err) // <-- New log
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment, the previous error seems to be more descriptive

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these new files for?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a number of them including =, CACHED, and ERROR

Comment on lines 328 to +329
err = fmt.Errorf("server error serving on https: %w", err)
log.Println("HTTPS server error:", err) // <-- New log
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these two lines can be combined

Comment on lines 338 to +339
fmt.Printf("Starting to listen on %s...\n", addr)
log.Printf("Starting HTTP server on %s...\n", addr) // <-- New log
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These can also be combined

type HealthcheckResponse grpc_health_v1.HealthCheckResponse

func (s *Server) SPIREHealthcheck(inp HealthcheckRequest) (*HealthcheckResponse, error) { //nolint:govet //Ignoring mutex (not being used) - sync.Mutex by value is unused for linter govet
log.Println("SPIREHealthcheck: Starting health check for SPIRE server")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it's necessary to add SPIREHealthcheck to the beginning of all of these error messages. We can go with this for now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this manifest being used?

@Alan-Cha
Copy link
Collaborator

Alan-Cha commented Oct 1, 2025

Can you describe on a high level your intentions behind the refactoring the manager backend? If I had a better understanding of your strategy, I would have an easier time reviewing your PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants