chore: spammy log cleanup

This commit is contained in:
Aarnav Tale
2025-12-04 03:37:48 -05:00
parent bf3fdd47cd
commit a824ea3dcf
3 changed files with 20 additions and 22 deletions
+3
View File
@@ -10,6 +10,9 @@
- Secret path loading has been reworked from the ground up to be more reliable (closes [#334](https://github.com/tale/headplane/issues/334)).
- Added better testing and validation for configuration loading
- Re-worked the OIDC integration to adhere to the correct standards and surface more errors to the user.
- Removed several unnecessarily verbose or spammy log messages.
- Updated the minimum Docker API used to support the latest Docker versions (via [#370](https://github.com/tale/headplane/pull/370)).
- Enhanced the node tag dialog to show a dropdown of assignable tags (via [#362](https://github.com/tale/headplane/pull/362)).
---
# 0.6.1 (October 12, 2025)
+6 -3
View File
@@ -7,7 +7,7 @@ import { Agent, type Dispatcher, request } from 'undici';
import log from '~/utils/log';
import endpointSets, { RuntimeApiClient } from './endpoints';
import { undiciToFriendlyError } from './error';
import { HeadscaleAPIError } from './error-client';
import { HeadscaleAPIError, isApiError } from './error-client';
import { detectApiVersion, isAtLeast, type Version } from './version';
/**
@@ -238,8 +238,11 @@ export async function createHeadscaleInterface(
Object.keys(hashes).length,
);
return hashes;
} catch (err) {
log.warn('api', 'Error during OpenAPI polling: %o', err);
} catch (error) {
if (isApiError(error)) {
log.debug('api', 'Failed to fetch OpenAPI spec: %d', error.statusCode);
}
return null;
}
}
+11 -19
View File
@@ -219,36 +219,28 @@ export async function createSessionStorage(options: AuthSessionOptions) {
}
async function migrateUserDatabase(path: string, db: LibSQLDatabase) {
log.info('config', 'Migrating old user database from %s', path);
const realPath = resolve(path);
log.warn(
'config',
'oidc.user_storage_file is deprecated and will be removed in Headplane 0.7.0',
);
log.warn(
'config',
'You can ignore this warning if you do not use OIDC authentication.',
);
log.warn(
'config',
'Data will be automatically migrated to the new SQL database.',
);
log.warn(
'config',
'Refer to server.data_path to ensure this path is mounted correctly is using Docker.',
);
try {
const handle = await open(realPath, 'a+');
await handle.close();
} catch (error) {
if (
error != null &&
typeof error === 'object' &&
'code' in error &&
error.code === 'ENOENT'
) {
log.debug('config', 'No old user database file found at %s', realPath);
return;
}
log.warn('config', 'Failed to migrate old user database at %s', realPath);
log.warn(
'config',
'This is not an error, but existing users will not be migrated',
);
log.warn('config', 'Unable to open user database file: %s', error);
log.warn('config', 'Unable to open user database file: %s', String(error));
log.debug('config', 'Error details: %s', error);
return;
}