Write DomainMetrics and add FF to switch reads from calculated properties #35522
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Technical Summary
SAAS-16283
Writes "calculated properties" currently stored on the
Domain
Elasticsearch doc to the newDomainMetrics
SQL model and adds a feature flag so that reads can be switched from the ES doc to the SQL model once populated. This is part 2 of 3 for moving calculated properties into SQL, following #35415. This should be reviewable by commit.Feature Flag
Adds the slightly wordy
CALCULATED_PROPERTIES_FROM_DOMAIN_METRICS
feature flag, which can be used to switch calculated properties reads over to the SQL model for a single domain, to toggle on for all domains.Safety Assurance
Safety story
This doesn't affect existing data or the write process for calculated properties on the ES doc. Reading from the new model is controlled by a feature flag, so if there are any issues after switching over, it can easily be switched back.
Automated test coverage
Adds automated tests for identifying the correct project spaces to have their
DomainMetrics
updated. These are based on existing tests that look to see the right domains will get their calculated properties updated.QA Plan
I can see an argument for QA, but not planning it at this time. I think dev testing on staging will suffice.
Migrations
Rollback instructions
Labels & Review