Skip to content

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)
  • Add canary release workflow for SDK monorepo
  • Update all type imports from Alpha/axios to RequestClient equivalents

Changes

File Changes
.github/workflows/canary.yaml New canary release workflow
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
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

  • All 274 unit tests pass in integration-sdk-runtime
  • All 6 CLI import tests pass
  • Trigger canary release after merge
  • Test in integrations/aws with canary release deployed to dev

Related

…sdk-fetch

- Replace @lifeomic/alpha with @jupiterone/platform-sdk-fetch canary release
- Update createApiClient to use createRequestClient from platform-sdk-fetch
- Replace Alpha, AlphaOptions, AlphaInterceptor types with RequestClient equivalents
- Update synchronization modules to use RequestClient types instead of axios types
- Add canary.yaml workflow for SDK monorepo canary releases
- Add skipLibCheck to tsconfig.dist.json for external type issues
- Update CLI tests to mock RequestClient instead of axios

BREAKING CHANGE: ApiClient type is now RequestClient instead of Alpha
@tokio-on-jupiter tokio-on-jupiter requested a review from a team as a code owner January 23, 2026 19:16
Copilot AI review requested due to automatic review settings January 23, 2026 19:16
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​jupiterone/​platform-sdk-fetch@​6.0.3-canary-487-1.0100100100100100

View full report

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 @lifeomic/alpha HTTP client with @jupiterone/platform-sdk-fetch (canary version 6.0.3-canary-487-1.0) across the integration SDK runtime and CLI packages.

Changes:

  • Dependency swap from @lifeomic/alpha to @jupiterone/platform-sdk-fetch canary release
  • Type migrations from Alpha/Axios to RequestClient equivalents
  • Addition of canary release workflow for automated deployments

Reviewed changes

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

Show a summary per file
File Description
.github/workflows/canary.yaml Adds automated canary release workflow
packages/integration-sdk-runtime/package.json Updates dependency from @lifeomic/alpha to @jupiterone/platform-sdk-fetch
packages/integration-sdk-runtime/tsconfig.dist.json Adds skipLibCheck compiler option
packages/integration-sdk-runtime/src/api/index.ts Replaces Alpha client with RequestClient, removes proxy support
packages/integration-sdk-runtime/src/synchronization/index.ts Updates type imports and adds response interface
packages/integration-sdk-runtime/src/synchronization/events.ts Updates type import from Axios to RequestClient
packages/integration-sdk-runtime/src/synchronization/error.ts Replaces AxiosError with RequestClientError interface
packages/cli/src/import/importAssetsFromCsv.ts Updates type import from Alpha to RequestClient
packages/integration-sdk-runtime/src/api/__tests__/index.test.ts Updates mocks for RequestClient
packages/cli/src/__tests__/cli-import.test.ts Updates mocks for RequestClient

💡 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 function sets the 'Content-Encoding: gzip' header but does not actually compress the data. The previous implementation called await gzipData(config.data) to compress the payload. Without compressing config.data, servers will receive uncompressed data with a gzip header, causing request failures.

Copilot uses AI. Check for mistakes.
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 should have a more specific type than 'any'. Consider using 'unknown' or defining an error type to improve type safety.

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 instance of Error, setting cause to undefined loses potentially valuable error information. Consider converting err to an Error or preserving its value in a different property to maintain debugging information.

Copilot uses AI. Check for mistakes.
/**
* Request interceptor that compresses upload data for synchronization endpoints
*/
export const compressRequest: RequestInterceptor = function (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 function is not declared as async, but the previous implementation was async because it called await gzipData(config.data). If compression is to be implemented, this function will need to be async again.

Suggested change
export const compressRequest: RequestInterceptor = function (config) {
export const compressRequest: RequestInterceptor = async function (config) {

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

Splitting into separate PRs: #1187 (canary workflow) and #1188 (lifeomic/alpha replacement)

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