Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use OCI API for Oracle providers #42

Merged
merged 18 commits into from
Dec 8, 2020
Merged

Use OCI API for Oracle providers #42

merged 18 commits into from
Dec 8, 2020

Conversation

harryjsmith
Copy link
Member

@harryjsmith harryjsmith commented Dec 3, 2020

This adds a shim layer to the Oracle providers, to translate Fnv2 API to OCI API. Incoming Fnv2 requests are translated into OCI API requests made using the OCI Functions SDK, and the responses are translated back to Fnv2. This allows consumers of fn_go (namely Fn CLI) to silently have their calls routed to the OCI API when an Oracle provider is used.

The first 2 commits are quite 'noisy' as they include bumping dependency versions and regenerating the go-swagger code to bring things up-to-date.

Closes #34

This results in the removal of some old concepts such as 'calls' and 'logs' (which I think are long disused and date from the v1 days?)
Mock out OCI SDK backend for this
Apps only for now. This respects the existing config precedence of env vars > Fn CLI context > OCI config file
These are just stubbed out as Oracle Functions doesn't support Triggers
This is used by the invoke code in Fn CLI, so it's required. Fortunately, we can simply extract the key information from the OCI config provider we've constructed.
Also, allow user provider to derive API endpoint entirely from OCI config
Copy link

@ant1eicher ant1eicher left a comment

Choose a reason for hiding this comment

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

Looks good to me. I suggest we thoroughly integration test this before using in Fn CLI, since it's a large change.

clientv2/apps/apps_client.go Show resolved Hide resolved
provider/oracle/shim/apps.go Outdated Show resolved Hide resolved
provider/oracle/shim/apps.go Show resolved Hide resolved
provider/oracle/shim/apps.go Show resolved Hide resolved
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.

api-url should be computed from region in selected profile
2 participants