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

Update eqx init to support Serverless re #244 #245

Merged
merged 4 commits into from
Sep 29, 2020
Merged

Update eqx init to support Serverless re #244 #245

merged 4 commits into from
Sep 29, 2020

Conversation

OmnipotentOwl
Copy link
Contributor

@OmnipotentOwl OmnipotentOwl commented Sep 29, 2020

resolves #244

@CLAassistant
Copy link

CLAassistant commented Sep 29, 2020

CLA assistant check
All committers have signed the CLA.

@bartelink
Copy link
Collaborator

Interesting to look at how its done in V4 - maybe if no RUs are specified, it should not touch the RUs?
https://github.com/jet/equinox/blob/cosmossdk4/src/Equinox.CosmosStore/CosmosStore.fs#L354

In general this looks great - I want to do some other merges/syncs with v2 branches before I merge this but it should be later today :fingerscrossed:

@OmnipotentOwl OmnipotentOwl marked this pull request as ready for review September 29, 2020 13:52
@bartelink bartelink changed the title Update eqx init to address serverless account type allocations and adjustments resolves #244 Update eqx init to support Serverless; Resolves #244 Sep 29, 2020
let client,dName,cName = conn log sargs
log.Information("Provisioning `Equinox.CosmosStore` Store at {mode:l} level for {rus:n0} RU/s", modeStr, rus)
let mode = (CosmosInitInfo iargs).ProvisioningMode
match mode with
Copy link
Collaborator

Choose a reason for hiding this comment

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

Arguably, this logging code could move up into CosmosInitInfo - splitting parsing/logging from the doing, but in general in the tool, I don't follow the rules the templates do to the same degree

@OmnipotentOwl
Copy link
Contributor Author

Confirmed the functionality of serverless provisioning for after the merges. One thought I did have around this when I was implementing the provisioning logic was that the aux container setup may also need the same updates to support serverless. I also didn't see right away if the aux container provisioning supported the shared Db RUs or not.

@bartelink
Copy link
Collaborator

Thanks for all the work and for validating; I'll merge it and cherry-pick it onto the v2 branch for the next release (2.2.x)

The aux provisioning is driven by propulsion.tool in the propulsion repo.

In general, if you're running a CFP somewhere with state in an aux container, you can be pretty sure there's continual usage (not sure how triggers run with Azure Functions driven off CFPs though)

As a result, I'd say you want to stick with non-serverless allocation for aux containers, in general.

The V3 API has a variety of scenarios for how one can consume from a Change Feed (i.e. its not hard wired to storing state in an aux container in the same way).

@bartelink bartelink changed the title Update eqx init to support Serverless; Resolves #244 Update eqx init to support Serverless re #244 Sep 29, 2020
@bartelink bartelink merged commit 8ee2c73 into jet:master Sep 29, 2020
@bartelink bartelink deleted the feature/cosmos-serverless branch September 29, 2020 22:38
bartelink pushed a commit that referenced this pull request Sep 29, 2020
* Add configuration for init tool to support Cosmos DB Serverless accounts.
* Update inline help text to include default value if not provided.
bartelink pushed a commit that referenced this pull request Sep 29, 2020
* Add configuration for init tool to support Cosmos DB Serverless accounts.
* Update inline help text to include default value if not provided.
@bartelink
Copy link
Collaborator

(☝️ Second is the relevant commit on v2 that cherry-picks this change for inclusion in 2.2.x)

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.

Cosmos: Add Serverless account type support
3 participants