Skip to content

Conversation

@sechmann
Copy link
Contributor

No description provided.

@github-actions
Copy link

github-actions bot commented Dec 29, 2025

📝 Changelog preview

Below is a preview of the Changelog that will be added to the next release. Only commit messages that follow the Conventional Commits specification will be included in the Changelog.

v1.11.0 - 2025-12-29

Full Changelog: v1.10.4...v1.11.0

🚀 Features

  • Ny tag for 72 grace periode (98e0914)
  • New kolide api (9eb7920)
  • Fix kolide tests and nil reference unmarshal (ecc81c7)
  • Inform user when Kolide is not linked (77e7729)

🐛 Bug Fixes

⚙️ Miscellaneous Changes

  • Hvordan deploye apiserver (73e0648)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates to the new Kolide API version (2023-05-26), updating data structures and removing "last seen" tracking functionality in favor of Kolide's native issue tracking system.

  • Updated Kolide API client to use new API version with string-based IDs instead of int64
  • Removed client-side "last seen" issue generation logic, relying on Kolide's native issue tracking
  • Changed database linking method from SetDeviceSeenByKolide to LinkKolideDevice without timestamp tracking

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/pb/devices.go Removed UpdateLastSeenIssues method and related constants for client-side last-seen tracking
internal/apiserver/kolide/types.go Renamed types (DeviceFailure→Issue, DeviceOwner→Person) and changed ID fields from int64 to string
internal/apiserver/kolide/types_test.go Updated tests to match new API response format with string IDs and new field names
internal/apiserver/kolide/transport.go Added API version header and renamed MaxHttpRetries to MaxHTTPRetries
internal/apiserver/kolide/client.go Updated API endpoints and renamed functions/variables (baseUrl→baseURL, WithBaseUrl→WithBaseURL)
internal/apiserver/kolide/client_test.go Updated tests to use test data files instead of inline JSON
internal/apiserver/kolide/cache.go Removed entire generic Cache implementation (no longer needed)
internal/apiserver/kolide/cache_test.go Removed tests for deleted Cache
internal/apiserver/kolide/fakeclient.go Updated method signatures to use Issue instead of DeviceFailure
internal/apiserver/kolide/testdata/*.json Added test data files for new API response format
internal/apiserver/database/kolide_issues.go Updated to handle string IDs and new field names, removed last-seen issue generation
internal/apiserver/database/device_issues.go Removed last-seen issue generation logic
internal/apiserver/database/database.go Renamed SetDeviceSeenByKolide to LinkKolideDevice, removed timestamp parameter
internal/apiserver/database/interface.go Updated interface method signatures
internal/apiserver/database/mock_database.go Regenerated mock with updated method signatures
internal/apiserver/database/database_test.go Updated tests to remove LastSeen field and use new method names
internal/apiserver/api/device.go Removed LastSeen field assignment from UpdateAllDevices
internal/apiserver/auth/sessionstore_test.go Removed LastSeen field from test device creation
internal/integration_test/integration_test.go Updated to use new Kolide types and removed LastSeen assignments
cmd/apiserver/main.go Changed from SetDeviceSeenByKolide to LinkKolideDevice
Comments suppressed due to low confidence (1)

internal/apiserver/database/database.go:122

  • Missing required field: the Healthy field is required by the UpdateDevice SQL query but is not set here. This will cause the Healthy field to be set to its zero value (false), potentially marking devices as unhealthy when they shouldn't be. Consider setting Healthy based on whether Kolide is enabled or other relevant criteria.
	return db.queries.UpdateDevice(ctx, sqlc.UpdateDeviceParams{
		Serial:   serial,
		Platform: platform,
		LastUpdated: sql.NullString{
			String: timeToString(time.Now().UTC()),
			Valid:  true,
		},
		ExternalID: sql.NullString{
			String: externalID,
			Valid:  externalID != "",
		},
	})

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sechmann sechmann merged commit e7d4104 into main Dec 29, 2025
27 checks passed
@sechmann sechmann deleted the new_kolide_api branch December 29, 2025 02:05
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