Skip to content

Salesforce impl: REST client, GraphQL client and gRPC implementation - #1

Open
ness-david-dedu wants to merge 5 commits into
feature/salesforce-phase-1from
feature/salesforce-rest-graphql-grpc
Open

Salesforce impl: REST client, GraphQL client and gRPC implementation#1
ness-david-dedu wants to merge 5 commits into
feature/salesforce-phase-1from
feature/salesforce-rest-graphql-grpc

Conversation

@ness-david-dedu

Copy link
Copy Markdown
Owner

No description provided.

Comment thread internal/impl/salesforce/salesforcegrpc/proto/pubsub_api.proto
log: mgr.Logger(),
res: mgr,
req: req,
binLogCache: cacheResource,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It would be good to move the fields exposed as configuration options to a dedicated, exported config struct. See the Oracle CDC component for example.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

done

return nil, err
}

cdcReplayPreset, err := conf.FieldString("cdc_replay_preset")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider moving these duplicate string literals used for the config definition and parsing to a dedicated constant to reduce the chance of them getting out of sync. See the Oracle CDC component for example.

We also tend to follow a pattern of prefixing them with an abbreviation of the component name (so sfiCdcReplayPreset for instance (where sfi equals Sales Force Input)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

done

if err != nil {
return nil, err
}
s.log.Debugf("Fetching from Salesforce.. Input: %s", string(inputMsg))

@josephwoodward josephwoodward Mar 10, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm not sure we need this. I can imagine this getting quite noisy and the potential to leak sensitive data?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

done

if err != nil {
return nil, err
}
//if err := license.CheckRunningEnterprise(mgr); err != nil {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Did you mean to commit this change?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

done

// limitations under the License.
// https://github.com/redpanda-data/connect/blob/main/licenses/rcl.md

// salesforce_helper.go provides helpers for making HTTP requests

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is all of this documentation intentional?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

updated the documentation

@josephwoodward josephwoodward Mar 17, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should return ctx.Err() here instead of context.Canceled.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

done

Comment thread internal/impl/salesforce/resources.go Outdated
// Try loading new format first
raw, err := s.accessCache(ctx, "sf_state")
if err != nil {
return ProcessorState{}, nil

@josephwoodward josephwoodward Mar 17, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should we be logging this error or being more intentional about it to ensure we don't skip important errors? One option might be for the caller to make this decision based on the type or error returned?

The same applies to line 514 as well.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

done

Comment thread public/components/salesforce/package.go Outdated
// Copyright 2026 Redpanda Data, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This license also needs updating to the enterprise license.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

done

}

// WithBackoff configures the reconnection backoff parameters.
func WithBackoff(base, max time.Duration, maxAttempts int) ClientOption {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A change was recently merged into main to add composable HTTP types. At some point it may be worth switching to these if easy enough.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

will be done at a later date

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