Skip to content

feat(PLATENG-800): Replace @lifeomic/alpha with @jupiterone/platform-sdk-fetch#1188

Open
tokio-on-jupiter wants to merge 39 commits intomainfrom
feat/PLATENG-800-replace-lifeomic-alpha
Open

feat(PLATENG-800): Replace @lifeomic/alpha with @jupiterone/platform-sdk-fetch#1188
tokio-on-jupiter wants to merge 39 commits intomainfrom
feat/PLATENG-800-replace-lifeomic-alpha

Conversation

@tokio-on-jupiter
Copy link
Contributor

Summary

Replace @lifeomic/alpha with @jupiterone/platform-sdk-fetch canary release (6.0.3-canary-487-1.0).

Changes

File Changes
packages/integration-sdk-runtime/package.json Updated dependency
packages/integration-sdk-runtime/src/api/index.ts Replaced Alpha with RequestClient
packages/integration-sdk-runtime/src/synchronization/*.ts Removed axios types
packages/cli/src/import/importAssetsFromCsv.ts Updated type import
tsconfig.dist.json Added skipLibCheck for external type issues
Tests Updated mocks for RequestClient

Breaking Changes

  • ApiClient type is now RequestClient instead of Alpha
  • Deprecated options: alphaOptions and proxyUrl (not supported by RequestClient)

Test Plan

Related

@tokio-on-jupiter tokio-on-jupiter requested a review from a team as a code owner January 23, 2026 19:19
Copilot AI review requested due to automatic review settings January 23, 2026 19:19
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 replaces the deprecated @lifeomic/alpha HTTP client with @jupiterone/platform-sdk-fetch canary release to modernize the API client implementation.

Changes:

  • Updated dependency from @lifeomic/alpha to @jupiterone/platform-sdk-fetch
  • Replaced Alpha type with RequestClient throughout the codebase
  • Removed proxy configuration support and deprecated alphaOptions/proxyUrl parameters

Reviewed changes

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

Show a summary per file
File Description
packages/integration-sdk-runtime/package.json Updated dependency to platform-sdk-fetch canary
packages/integration-sdk-runtime/src/api/index.ts Replaced Alpha with RequestClient, removed proxy support
packages/integration-sdk-runtime/src/synchronization/index.ts Updated type imports and error handling
packages/integration-sdk-runtime/src/synchronization/events.ts Updated config type imports
packages/integration-sdk-runtime/src/synchronization/error.ts Replaced AxiosError with custom RequestClientError interface
packages/integration-sdk-runtime/tsconfig.dist.json Added skipLibCheck to handle external type issues
packages/cli/src/import/importAssetsFromCsv.ts Updated type imports
packages/integration-sdk-runtime/src/api/tests/index.test.ts Updated mocks for RequestClient
packages/cli/src/tests/cli-import.test.ts Updated test mocks

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

Comment on lines 118 to 120
export const compressRequest: RequestInterceptor = function (config) {
if (
config.method === 'post' &&
config.method === 'POST' &&
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The compressRequest interceptor now only sets the 'Content-Encoding' header but does not actually compress the data. The comment on lines 126-128 notes this issue but doesn't implement actual compression. This means data won't be compressed despite the header claiming it is, which could cause server-side decompression failures.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This interceptor was removed in a subsequent commit. Compression is now handled directly in `uploadDataChunk()` in `synchronization/index.ts` (lines 537-547), where `gzipData(data)` compresses the payload and sends it via `rawBody` with the `Content-Encoding: gzip` header. The interceptor approach was replaced because `RequestClient` handles request config differently than Alpha.

@@ -23,7 +35,7 @@ export function synchronizationApiError(
return new IntegrationError({
code: 'UNEXPECTED_SYNCRONIZATION_ERROR',
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Corrected spelling of 'SYNCRONIZATION' to 'SYNCHRONIZATION'.

Suggested change
code: 'UNEXPECTED_SYNCRONIZATION_ERROR',
code: 'UNEXPECTED_SYNCHRONIZATION_ERROR',

Copilot uses AI. Check for mistakes.
'Content-Encoding': 'gzip',
};
}
config.data = await gzipData(config.data);

Choose a reason for hiding this comment

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

Does config.data need to be compressed here?

Choose a reason for hiding this comment

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

This comment is on a deleted line. I'm not sure what action should be taken.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The compression interceptor was intentionally removed from createApiClient. Compression is now handled directly in uploadDataChunk() (synchronization/index.ts:537-547) where gzipData(data) compresses the payload and sends it via rawBody with the Content-Encoding: gzip header. This approach is more explicit — compression happens at the upload call site rather than as an opaque interceptor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No action needed — this was a deleted line from the old Alpha import.

@tokio-on-jupiter
Copy link
Contributor Author

/canary-release

export const getAccountFromEnvironment = () =>
getFromEnv('JUPITERONE_ACCOUNT', IntegrationAccountRequiredError);

function parseProxyUrl(proxyUrl: string) {

Choose a reason for hiding this comment

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

Does the proxy support need to be maintained?

Choose a reason for hiding this comment

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

The comment above suggests that proxy support can still be achieved by setting the HTTPS_PROXY environment variable. I'm not sure if that's true, though. I didn't see any tests that covered that scenario.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Proxy support was specific to @lifeomic/alpha's internal HTTP client. RequestClient from platform-sdk-fetch does not have built-in proxy configuration — it relies on environment-level proxy settings (e.g. HTTPS_PROXY, HTTP_PROXY) which Node.js and the underlying HTTP client respect natively.

The proxyUrl param is kept in the interface for backward compatibility but now emits a DeprecationWarning when provided, directing users to use environment variables instead. This avoids a breaking change for callers that pass proxyUrl while making it clear the option no longer has any effect.

@tokio-on-jupiter
Copy link
Contributor Author

/canary-release

Copilot AI review requested due to automatic review settings January 23, 2026 19:40
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

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.


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

Comment on lines 118 to 137
export const compressRequest: RequestInterceptor = function (config) {
if (
config.method === 'post' &&
config.method === 'POST' &&
config.url &&
/\/persister\/synchronization\/jobs\/[0-9a-fA-F-]+\/(entities|relationships)/.test(
config.url,
)
) {
if (config.headers) {
config.headers['Content-Encoding'] = 'gzip';
} else {
config.headers = {
// Note: Compression is handled differently in RequestClient
// The data compression would need to be applied at the request level
// For now, we mark the headers - actual compression may need additional handling
return {
...config,
headers: {
...config.headers,
'Content-Encoding': 'gzip',
};
}
config.data = await gzipData(config.data);
},
};
}
return config;
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The compressRequest interceptor sets the 'Content-Encoding: gzip' header but does not actually compress the data. The previous implementation called gzipData(config.data) but this logic has been removed. This will cause the server to expect compressed data but receive uncompressed data, resulting in decompression failures. Either implement the actual data compression using gzipData or remove this interceptor entirely if compression is handled elsewhere.

Copilot uses AI. Check for mistakes.
code: 'UNEXPECTED_SYNCRONIZATION_ERROR',
message: errorMessage,
cause: err,
cause: err instanceof Error ? err : undefined,
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Setting cause to undefined when the error is not an instance of Error loses error information. The original implementation passed err directly to preserve all error details. Consider using cause: err as Error or structuring the error differently to retain the original error object for debugging purposes.

Suggested change
cause: err instanceof Error ? err : undefined,
cause: err as Error,

Copilot uses AI. Check for mistakes.

Choose a reason for hiding this comment

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

I agree with this comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed — now wraps non-Error objects with `new Error(String(err))` instead of discarding them. This preserves the error context for debugging while satisfying the `Error` type requirement for `cause`.

});

describe('getApiKeyFromEnvironment', () => {
describe('getAccountFromEnvironment', () => {
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The describe block name 'getAccountFromEnvironment' is a duplicate of line 55's describe block name which should be 'getApiKeyFromEnvironment'. This appears to be a copy-paste error from the original code that should be corrected for clarity.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not a copy-paste error. Line 53 is `getApiKeyFromEnvironment` (tests for `JUPITERONE_API_KEY`) and line 76 is `getAccountFromEnvironment` (tests for `JUPITERONE_ACCOUNT`). They are two separate describe blocks for two different exported functions.

Copilot AI review requested due to automatic review settings January 23, 2026 19:50
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

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.


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

Comment on lines 115 to 138
/**
* Request interceptor that compresses upload data for synchronization endpoints
*/
export const compressRequest: RequestInterceptor = function (config) {
if (
config.method === 'post' &&
config.method === 'POST' &&
config.url &&
/\/persister\/synchronization\/jobs\/[0-9a-fA-F-]+\/(entities|relationships)/.test(
config.url,
)
) {
if (config.headers) {
config.headers['Content-Encoding'] = 'gzip';
} else {
config.headers = {
// Note: Compression is handled differently in RequestClient
// The data compression would need to be applied at the request level
// For now, we mark the headers - actual compression may need additional handling
return {
...config,
headers: {
...config.headers,
'Content-Encoding': 'gzip',
};
}
config.data = await gzipData(config.data);
},
};
}
return config;
};
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The compressRequest interceptor sets the 'Content-Encoding: gzip' header but doesn't actually compress the data. The original implementation called gzipData(config.data) to compress the request body. Without actual compression, servers expecting gzipped data will fail to process the request.

Copilot uses AI. Check for mistakes.
Comment on lines 54 to 65
accessToken,
retryOptions,
compressUploads,
alphaOptions,
proxyUrl,
}: CreateApiClientInput): ApiClient {
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The deprecated parameters alphaOptions and proxyUrl are destructured but never used in the function body. Either remove them from the destructuring or explicitly acknowledge their deprecation with a warning log.

Copilot uses AI. Check for mistakes.
code: 'UNEXPECTED_SYNCRONIZATION_ERROR',
message: errorMessage,
cause: err,
cause: err instanceof Error ? err : undefined,
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

When err is not an Error instance, setting cause to undefined loses error context. Consider converting unknown errors to Error instances or using the original value to preserve debugging information.

Suggested change
cause: err instanceof Error ? err : undefined,
cause: err,

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings January 23, 2026 20:56
@tokio-on-jupiter
Copy link
Contributor Author

/canary-release

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

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.


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

},
);
rawBody: compressedData,
} as any);
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Using as any type assertion bypasses type safety. Consider defining a proper type for the options parameter that includes the rawBody property, or add a TODO comment explaining this is temporary until the upstream types are updated.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already addressed — a `RequestConfigWithRawBody` interface extending `RequestClientRequestConfig` was added (lines 44-47) and is used instead of `as any`. The TODO comment documents that this can be removed once `platform-sdk-fetch` officially exports `rawBody` in its types.

@github-actions
Copy link

🚀 Canary release workflow has been triggered.

You can follow the progress here.

@github-actions
Copy link

Canary release failed.

Check the workflow run for details.

@tokio-on-jupiter
Copy link
Contributor Author

/canary-release

@github-actions
Copy link

🚀 Canary release workflow has been triggered.

You can follow the progress here.

@github-actions
Copy link

Canary release failed.

Check the workflow run for details.

@tokio-on-jupiter
Copy link
Contributor Author

/canary-release

@github-actions
Copy link

🚀 Canary release workflow has been triggered.

You can follow the progress here.

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

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


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

client.interceptors.response.use(
(response) => response,
(error: any) => {
async (error: any) => {
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The error parameter is typed as any, which reduces type safety. Consider defining a proper error type that captures the expected error structure from RequestClient.

Copilot uses AI. Check for mistakes.

export function synchronizationApiError(
err: AxiosError<SynchronizationApiErrorResponse>,
err: RequestClientError | Error | unknown,
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The parameter accepts unknown in addition to specific error types, but then performs type assertions without proper type guards. Consider adding a type guard function to safely narrow the type before accessing properties.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

Canary release failed.

Check the workflow run for details.

@tokio-on-jupiter
Copy link
Contributor Author

/canary-release

Copilot AI review requested due to automatic review settings February 3, 2026 17:56
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

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


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

Comment on lines +129 to +130
// Store compression flag on client for use by upload functions
// Default to true to match previous Alpha behavior where uploads were always compressed
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The default compression behavior (enabled when compressUploads !== false) should be documented. Consider adding a JSDoc comment explaining that compression is enabled by default to maintain backward compatibility with the previous Alpha implementation.

Suggested change
// Store compression flag on client for use by upload functions
// Default to true to match previous Alpha behavior where uploads were always compressed
/**
* Store compression flag on client for use by upload functions.
*
* Note: Upload compression is enabled by default when `compressUploads !== false`
* to maintain backward compatibility with the previous Alpha implementation,
* where uploads were always compressed.
*/

Copilot uses AI. Check for mistakes.
Comment on lines +546 to +547
rawBody: compressedData,
} as RequestConfigWithRawBody);
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The TODO comment at line 43 indicates this is a temporary workaround. Consider tracking this technical debt more formally (e.g., in a Jira ticket) or removing the TODO if this approach is now the permanent solution.

Copilot uses AI. Check for mistakes.
- Remove skipLibCheck from tsconfig.base.json (revert to match main)
- Add skipLibCheck to dist tsconfigs only (needed for platform-sdk-fetch
  type declarations that reference unresolvable modules)
- Replace logger as Function casts with .apply() pattern to avoid
  TS2556 spread-into-overloaded-function errors
- Replace logger.ts double assertion with @ts-expect-error for
  @types/bunyan RingBuffer.end() incompatibility
- Create shared MockApiClient factory in integration-sdk-testing
- Update bulkDownloadToJson.test.ts to use shared mock factory
- Add integration-sdk-testing as devDependency to cli and runtime
Replace as any casts with @ts-expect-error directives and proper types:
- cli-import/cli-export tests: @ts-expect-error for mock ApiClient
- api/index.test: @ts-expect-error for deprecated option tests
- synchronization/index.test: mockResolvedValueOnce/mockRejectedValueOnce
  instead of (): any, @ts-expect-error for noop mock
- request.ts and managedQuestionFileValidator.test: new Headers() and {}
  instead of {} as any for mock response fields
Type the error parameter as unknown and narrow via an interface,
matching the pattern used in the adjacent error.ts file.
Copilot AI review requested due to automatic review settings February 3, 2026 21:56
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

Copilot reviewed 32 out of 33 changed files in this pull request and generated 3 comments.


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

baseUrl: 'https://api.us.jupiterone.io',
onSyncJobCreateResponse(req, res) {
expect(req.headers['Authorization']).toEqual('Bearer testing-key');
// node-fetch used by platform-sdk-fetch stores headers as arrays
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The comment explains the workaround for array-based headers but doesn't clarify why the change was necessary. Consider adding context about the difference between the previous axios implementation and the new platform-sdk-fetch implementation.

Suggested change
// node-fetch used by platform-sdk-fetch stores headers as arrays
// platform-sdk-fetch (via node-fetch) represents request headers as arrays,
// whereas the previous axios-based HTTP client exposed them as simple strings.
// Normalize the Authorization header so this test continues to work across both.

Copilot uses AI. Check for mistakes.
"lerna": "^7.1.4",
"lint-staged": "^10.2.6",
"prettier": "^3.0.0",
"prettier": "3.2.5",
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

Prettier was pinned to a specific version without explanation. Since the PR is about replacing alpha with platform-sdk-fetch, this change should be explained or moved to a separate commit/PR.

Suggested change
"prettier": "3.2.5",
"prettier": "^3.2.5",

Copilot uses AI. Check for mistakes.
package.json Outdated
"@types/node": "^18"
},
"overrides": {
"@sinclair/typebox@^0.32": "0.32.30"
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The typebox override was added without explanation. Document why this specific version override is necessary to prevent confusion during future dependency updates.

Suggested change
"@sinclair/typebox@^0.32": "0.32.30"
"@sinclair/typebox@^0.32": "0.32.30"
},
"overridesComment": {
"@sinclair/typebox@^0.32": "Pin typebox 0.32.x to 0.32.30 to avoid breaking changes in later 0.32 releases that altered validation/runtime behavior; update or remove this override once all dependent packages have been verified against a newer compatible version."

Copilot uses AI. Check for mistakes.
CI uses tsc -b with tsconfig.json (not tsconfig.dist.json). Add
skipLibCheck to packages that depend on platform-sdk-fetch, and fix
Headers type mismatch in test mock helpers.
- Replace custom ErrorWithRequestConfig interface with proper
  isRequestClientError type guard from platform-sdk-fetch
- Remove dead config.data deletion (RequestClientError.config
  does not have a data property)
- Fix test: use RequestClientError instead of plain Error with
  Object.assign, fix "Authroization" typo, verify non-sensitive
  headers are preserved
Copilot AI review requested due to automatic review settings February 3, 2026 22:54
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

Copilot reviewed 37 out of 38 changed files in this pull request and generated 1 comment.


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

Comment on lines +46 to +48
interface RequestConfigWithRawBody extends RequestClientRequestConfig {
rawBody?: Buffer;
}
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The TODO comment indicates this interface should be removed once platform-sdk-fetch officially exports rawBody. Consider creating a tracking issue or adding a reference to ensure this technical debt is addressed when the dependency is updated.

Copilot uses AI. Check for mistakes.
@tokio-on-jupiter
Copy link
Contributor Author

/canary-release

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

🚀 Canary release workflow has been triggered.

You can follow the progress here.

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Canary release published successfully!

Published packages:

  • @jupiterone/cli@17.2.2-canary-1188-21651197416.0
  • @jupiterone/integration-sdk-cli@17.2.2-canary-1188-21651197416.0
  • @jupiterone/integration-sdk-core@17.2.2-canary-1188-21651197416.0
  • @jupiterone/integration-sdk-dev-tools@17.2.2-canary-1188-21651197416.0
  • @jupiterone/integration-sdk-entities@17.2.2-canary-1188-21651197416.0
  • @jupiterone/integration-sdk-entity-validator@17.2.2-canary-1188-21651197416.0
  • @jupiterone/integration-sdk-http-client@17.2.2-canary-1188-21651197416.0
  • @jupiterone/integration-sdk-runtime@17.2.2-canary-1188-21651197416.0
  • @jupiterone/integration-sdk-testing@17.2.2-canary-1188-21651197416.0

Install with:

npm install @jupiterone/cli@17.2.2-canary-1188-21651197416.0
npm install @jupiterone/integration-sdk-cli@17.2.2-canary-1188-21651197416.0
npm install @jupiterone/integration-sdk-core@17.2.2-canary-1188-21651197416.0
npm install @jupiterone/integration-sdk-dev-tools@17.2.2-canary-1188-21651197416.0
npm install @jupiterone/integration-sdk-entities@17.2.2-canary-1188-21651197416.0
npm install @jupiterone/integration-sdk-entity-validator@17.2.2-canary-1188-21651197416.0
npm install @jupiterone/integration-sdk-http-client@17.2.2-canary-1188-21651197416.0
npm install @jupiterone/integration-sdk-runtime@17.2.2-canary-1188-21651197416.0
npm install @jupiterone/integration-sdk-testing@17.2.2-canary-1188-21651197416.0

Downstream consumers (e.g. graph-aws) still pass alphaOptions to
createApiClient. Throwing breaks them at runtime. Switch to
console.warn deprecation notices so migration can proceed
incrementally.
@tokio-on-jupiter
Copy link
Contributor Author

/canary-release

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

🚀 Canary release workflow has been triggered.

You can follow the progress here.

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Canary release published successfully!

Published packages:

  • @jupiterone/cli@17.2.2-canary-1188-21651857611.0
  • @jupiterone/integration-sdk-cli@17.2.2-canary-1188-21651857611.0
  • @jupiterone/integration-sdk-core@17.2.2-canary-1188-21651857611.0
  • @jupiterone/integration-sdk-dev-tools@17.2.2-canary-1188-21651857611.0
  • @jupiterone/integration-sdk-entities@17.2.2-canary-1188-21651857611.0
  • @jupiterone/integration-sdk-entity-validator@17.2.2-canary-1188-21651857611.0
  • @jupiterone/integration-sdk-http-client@17.2.2-canary-1188-21651857611.0
  • @jupiterone/integration-sdk-runtime@17.2.2-canary-1188-21651857611.0
  • @jupiterone/integration-sdk-testing@17.2.2-canary-1188-21651857611.0

Install with:

npm install @jupiterone/cli@17.2.2-canary-1188-21651857611.0
npm install @jupiterone/integration-sdk-cli@17.2.2-canary-1188-21651857611.0
npm install @jupiterone/integration-sdk-core@17.2.2-canary-1188-21651857611.0
npm install @jupiterone/integration-sdk-dev-tools@17.2.2-canary-1188-21651857611.0
npm install @jupiterone/integration-sdk-entities@17.2.2-canary-1188-21651857611.0
npm install @jupiterone/integration-sdk-entity-validator@17.2.2-canary-1188-21651857611.0
npm install @jupiterone/integration-sdk-http-client@17.2.2-canary-1188-21651857611.0
npm install @jupiterone/integration-sdk-runtime@17.2.2-canary-1188-21651857611.0
npm install @jupiterone/integration-sdk-testing@17.2.2-canary-1188-21651857611.0

ESLint no-console rule blocks console.warn in CI. Switch to
process.emitWarning with DeprecationWarning type, which is the
Node.js standard for deprecation notices.
Copilot AI review requested due to automatic review settings February 4, 2026 17:34
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

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


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

if: steps.changed.outputs.has_changes == 'true'
run: |
PRERELEASE_ID="canary-${{ github.event.issue.number }}-${{ github.run_attempt }}"
PRERELEASE_ID="canary-${{ github.event.issue.number }}-${{ github.run_id }}"
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

Changed from github.run_attempt to github.run_id for generating the prerelease ID. This changes the versioning scheme for canary releases. Verify that downstream consumers can handle this versioning change, and ensure that canary version uniqueness is maintained across workflow runs.

Copilot uses AI. Check for mistakes.
* Internal flag indicating whether uploads should be compressed.
* @internal
*/
_compressUploads?: boolean;
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The _compressUploads flag is stored as a mutable property on the client object. Consider making this configuration immutable by storing it in a WeakMap or closure to prevent accidental modification at runtime.

Suggested change
_compressUploads?: boolean;
readonly _compressUploads?: boolean;

Copilot uses AI. Check for mistakes.
@tokio-on-jupiter
Copy link
Contributor Author

/canary-release

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

🚀 Canary release workflow has been triggered.

You can follow the progress here.

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Canary release published successfully!

Published packages:

  • @jupiterone/cli@17.2.2-canary-1188-21682081974.0
  • @jupiterone/integration-sdk-cli@17.2.2-canary-1188-21682081974.0
  • @jupiterone/integration-sdk-core@17.2.2-canary-1188-21682081974.0
  • @jupiterone/integration-sdk-dev-tools@17.2.2-canary-1188-21682081974.0
  • @jupiterone/integration-sdk-entities@17.2.2-canary-1188-21682081974.0
  • @jupiterone/integration-sdk-entity-validator@17.2.2-canary-1188-21682081974.0
  • @jupiterone/integration-sdk-http-client@17.2.2-canary-1188-21682081974.0
  • @jupiterone/integration-sdk-runtime@17.2.2-canary-1188-21682081974.0
  • @jupiterone/integration-sdk-testing@17.2.2-canary-1188-21682081974.0

Install with:

npm install @jupiterone/cli@17.2.2-canary-1188-21682081974.0
npm install @jupiterone/integration-sdk-cli@17.2.2-canary-1188-21682081974.0
npm install @jupiterone/integration-sdk-core@17.2.2-canary-1188-21682081974.0
npm install @jupiterone/integration-sdk-dev-tools@17.2.2-canary-1188-21682081974.0
npm install @jupiterone/integration-sdk-entities@17.2.2-canary-1188-21682081974.0
npm install @jupiterone/integration-sdk-entity-validator@17.2.2-canary-1188-21682081974.0
npm install @jupiterone/integration-sdk-http-client@17.2.2-canary-1188-21682081974.0
npm install @jupiterone/integration-sdk-runtime@17.2.2-canary-1188-21682081974.0
npm install @jupiterone/integration-sdk-testing@17.2.2-canary-1188-21682081974.0

Add npm override to force fast-xml-parser@5.3.4, fixing the
RangeError DoS vulnerability in numeric entities parsing.
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

Copilot reviewed 37 out of 38 changed files in this pull request and generated 3 comments.


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

* Extended request config that includes rawBody for sending pre-serialized/compressed data.
* This extends the standard RequestClientRequestConfig to support gzip-compressed uploads.
*
* TODO: Remove this interface once platform-sdk-fetch officially exports rawBody in its types.
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

This TODO comment should include a link to the tracking issue or PR in the platform-sdk-fetch repository where rawBody type support is being discussed or implemented. This will make it easier to track when this workaround can be removed.

Suggested change
* TODO: Remove this interface once platform-sdk-fetch officially exports rawBody in its types.
* TODO: Remove this interface once platform-sdk-fetch officially exports rawBody in its types.
* Tracking issue/PR: https://github.com/jupiterone/platform-sdk-fetch/issues?q=rawBody

Copilot uses AI. Check for mistakes.
}

function isRequestUploadTooLargeError(err): boolean {
function isRequestUploadTooLargeError(err: Record<string, any>): boolean {
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

The parameter type Record<string, any> is too permissive. Consider creating a specific type or using unknown with proper type guards to ensure type safety. This would make the function more robust and easier to maintain.

Copilot uses AI. Check for mistakes.
Comment on lines +641 to 645
function cleanRequestError(err: unknown) {
if (isRequestClientError(err) && err.config?.headers?.Authorization) {
delete err.config.headers.Authorization;
}

if (err.config?.data) {
delete err.config.data;
}
}
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

The removed data cleanup (delete err.config.data) is intentional, but the reason is not documented. Consider adding a comment explaining why data is no longer cleaned from errors in the RequestClient implementation, or confirming this is the intended behavior.

Copilot uses AI. Check for mistakes.
Add package.json exports map for @jupiterone/integration-sdk-testing
with a separate ./mockApiClient entry point. This allows CLI tests
to import createMockApiClient without loading recording.ts, which
uses polly/graceful-fs and conflicts with jest.mock('fs').

Addresses review feedback from @ryanmcafee.
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.

3 participants