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

More database refactoring #661

Merged
merged 4 commits into from
Sep 27, 2024
Merged

More database refactoring #661

merged 4 commits into from
Sep 27, 2024

Conversation

mbarnes
Copy link
Collaborator

@mbarnes mbarnes commented Sep 27, 2024

What this PR does

More database refactoring ahead of more important upcoming changes.

Jira: Related to ARO-9674 : Frontend needs to run with at least two replicas
Link to demo recording:

Special notes for your reviewer

Matthew Barnes added 4 commits September 27, 2024 14:00
Factors out all the system-defined properties for a Cosmos container
item. Also uses azcore.ETag for the ETag type for compatibility with
the azcosmos.ItemOptions.IfMatchEtag field.
Dropping this for a couple reasons:

1) It's used once to create an azcosmos.DatabaseClient and then
   never touched again.
2) It assumes we want a DefaultAzureCredential, which may end up
   being correct but we shouldn't build that assumption into the
   config struct.

Instead, NewCosmosDBClient just takes an azcosmos.DatabaseClient
which is created in the command-line processing code.
So middleware functions can access the DBClient more easily.
@mjlshen mjlshen enabled auto-merge (rebase) September 27, 2024 20:52
@mjlshen mjlshen merged commit 88a0e37 into main Sep 27, 2024
22 checks passed
@mjlshen mjlshen deleted the database-refactoring branch September 27, 2024 20:53
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