diff --git a/plugins/source/oracle/client/client.go b/plugins/source/oracle/client/client.go index 7becbf460e8a48..b736eacab5551d 100644 --- a/plugins/source/oracle/client/client.go +++ b/plugins/source/oracle/client/client.go @@ -5,7 +5,6 @@ import ( "fmt" "strings" - "github.com/cloudquery/cloudquery/plugins/source/oracle/client/spec" "github.com/cloudquery/plugin-sdk/v4/schema" "github.com/oracle/oci-go-sdk/v65/common" "github.com/oracle/oci-go-sdk/v65/identity" @@ -36,7 +35,7 @@ type Client struct { logger zerolog.Logger } -func New(ctx context.Context, logger zerolog.Logger, _ spec.Spec) (schema.ClientMeta, error) { +func New(ctx context.Context, logger zerolog.Logger) (schema.ClientMeta, error) { // common.DefaultRetryPolicy handles (409, IncorrectState), (429, TooManyRequests) + 5XX errors defaultRetryPolicy := common.DefaultRetryPolicy() common.GlobalRetry = &defaultRetryPolicy diff --git a/plugins/source/oracle/docs/overview.md b/plugins/source/oracle/docs/overview.md index 489391cae7663c..2cec7d3ea96f9f 100644 --- a/plugins/source/oracle/docs/overview.md +++ b/plugins/source/oracle/docs/overview.md @@ -25,10 +25,25 @@ The following example sets up the Oracle plugin, and connects it to a postgresql See [tables](/docs/plugins/sources/oracle/tables) for a full list of available tables. -## Oracle Spec +### Oracle Spec This is the (nested) spec used by Oracle Source Plugin -- `concurrency` (int, optional, default: 10000): +- `concurrency` (`integer`) (optional) (default: `10000`) + The best effort maximum number of Go routines to use. Lower this number to reduce memory usage. + +## Dedicated regions + +[OCI Dedicated regions](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/dedicatedregions.htm) can be accessed via the following procedure: + +1. Specify the region to be used for the discovery as the dedicated region. + The following options are available: + * Set `OCI_CLI_region` environment variable + * Set `region` value in the configuration file + +2. Specify the dedicated region information: + The following options are available: + * Set `OCI_REGION_METADATA` [environment variable](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_adding_new_region_endpoints.htm#SDK_Adding_Regions_Environment_Variable) + * Add information to the [regions config file](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_adding_new_region_endpoints.htm#SDK_Adding_Regions_Config_File) diff --git a/plugins/source/oracle/go.mod b/plugins/source/oracle/go.mod index 20fd8c5bb5666f..93d81499371662 100644 --- a/plugins/source/oracle/go.mod +++ b/plugins/source/oracle/go.mod @@ -8,6 +8,7 @@ require ( github.com/cloudquery/plugin-sdk/v4 v4.25.0 github.com/oracle/oci-go-sdk/v65 v65.28.3 github.com/rs/zerolog v1.31.0 + github.com/stretchr/testify v1.8.4 golang.org/x/exp v0.0.0-20231226003508-02704c960a9b ) @@ -88,7 +89,6 @@ require ( github.com/sony/gobreaker v0.5.0 // indirect github.com/spf13/cobra v1.6.1 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/testify v1.8.4 // indirect github.com/tdewolff/minify/v2 v2.20.10 // indirect github.com/tdewolff/parse/v2 v2.7.7 // indirect github.com/thoas/go-funk v0.9.3 // indirect diff --git a/plugins/source/oracle/resources/plugin/client.go b/plugins/source/oracle/resources/plugin/client.go index 2ca432a0be8ee3..a2a8aff1489e23 100644 --- a/plugins/source/oracle/resources/plugin/client.go +++ b/plugins/source/oracle/resources/plugin/client.go @@ -38,7 +38,7 @@ func (c *Client) Sync(ctx context.Context, options plugin.SyncOptions, res chan< c.logger.Warn().Msg("State backend not supported in plugin, skipping") } - schedulerClient, err := client.New(ctx, c.logger, c.config) + schedulerClient, err := client.New(ctx, c.logger) if err != nil { return err }