From 7e9c0a8102c4ad678dbde71711fbf6993f514dd9 Mon Sep 17 00:00:00 2001 From: richter Date: Tue, 10 Mar 2026 17:58:18 -0300 Subject: [PATCH 1/3] fix(url): Removed possible extra character in base URLs, to avoid issues when building path for requests. --- src/api-client/base-client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api-client/base-client.ts b/src/api-client/base-client.ts index fa06baa0..adabf9b4 100644 --- a/src/api-client/base-client.ts +++ b/src/api-client/base-client.ts @@ -58,7 +58,7 @@ export class BaseClient { headers = { ...headers, ...extraHeaders }; - const endpointPath = `${this.apiUrl}/${endpoint + const endpointPath = `${this.apiUrl.replace(/\/$/, '')}/${endpoint .replace( '{project_id}', params && 'project_id' in params ? (params.project_id as string) : '' @@ -209,7 +209,7 @@ export class BaseClient { headers = { ...headers, ...extraHeaders }; - const endpointPath = `${this.apiUrl}/${endpoint + const endpointPath = `${this.apiUrl.replace(/\/$/, '')}/${endpoint .replace( '{project_id}', params && 'project_id' in params ? (params.project_id as string) : '' From 7c4cc1581a5a188a1a20af5c8524c9a325fec842 Mon Sep 17 00:00:00 2001 From: richter Date: Wed, 11 Mar 2026 17:34:08 -0300 Subject: [PATCH 2/3] fix(wrapper): Removed rule interfering with retrieval of logger. --- src/wrappers.ts | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/wrappers.ts b/src/wrappers.ts index a5d2957c..729440bb 100644 --- a/src/wrappers.ts +++ b/src/wrappers.ts @@ -245,25 +245,11 @@ export function log( // set via experimentContext.run() or init(). If no context exists, use getClient() to // retrieve the last logger configured during the ongoing workflow. const exp = experimentContext.getStore(); - const logStore = loggerContext.getStore(); - - // Priority: logStore (loggerContext) > exp (experimentContext) > getClient() - const hasLogStoreData = - logStore && - (logStore.logStreamName || - logStore.sessionId || - (logStore.parentStack && logStore.parentStack.length > 0)); + const hasExpData = exp && (exp.projectName || exp.experimentId || exp.logStreamName); - if (hasLogStoreData) { - // Use loggerContext data if available - logger = GalileoSingleton.getInstance().getLogger({ - projectName: exp?.projectName, - experimentId: exp?.experimentId, - logstream: logStore?.logStreamName ?? exp?.logStreamName - }); - } else if (hasExpData) { + if (hasExpData) { // Use experimentContext data if available logger = GalileoSingleton.getInstance().getLogger({ projectName: exp?.projectName, From f112c61cb0cb2da79b14df61914791ddb0d01a93 Mon Sep 17 00:00:00 2001 From: richter Date: Wed, 11 Mar 2026 19:51:19 -0300 Subject: [PATCH 3/3] fix(apiUrl): Refactored use of apiUrl for getter-setter. --- src/api-client/base-client.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/api-client/base-client.ts b/src/api-client/base-client.ts index adabf9b4..79ababe7 100644 --- a/src/api-client/base-client.ts +++ b/src/api-client/base-client.ts @@ -33,10 +33,17 @@ export const GENERIC_ERROR_MESSAGE = 'This error has been automatically tracked. Please try again.'; export class BaseClient { - protected apiUrl: string = ''; + private _apiUrl: string = ''; protected token: string = ''; protected client: Client | undefined = undefined; + protected get apiUrl(): string { + return this._apiUrl; + } + protected set apiUrl(url: string) { + this._apiUrl = url.replace(/\/$/, ''); + } + /** * Make an HTTP request to the Galileo API and return the raw Axios response. */ @@ -58,7 +65,7 @@ export class BaseClient { headers = { ...headers, ...extraHeaders }; - const endpointPath = `${this.apiUrl.replace(/\/$/, '')}/${endpoint + const endpointPath = `${this.apiUrl}/${endpoint .replace( '{project_id}', params && 'project_id' in params ? (params.project_id as string) : '' @@ -209,7 +216,7 @@ export class BaseClient { headers = { ...headers, ...extraHeaders }; - const endpointPath = `${this.apiUrl.replace(/\/$/, '')}/${endpoint + const endpointPath = `${this.apiUrl}/${endpoint .replace( '{project_id}', params && 'project_id' in params ? (params.project_id as string) : ''