Azure / Azure/elastic-db-tools

SMM: Document immutabilty of Mapping objects

Open
#107 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
147
Forks
108
PR merge metrics
No merged PRs in 30d

Description

In SMM, Mapping objects are immutable. Any operation that changes the Mappings returns a new Mapping object with updated version id; the old mapping object is now unusable. Some users have found that this design is not very obvious. User education can be improved by doing the following:

a) improving the error message to make it very obvious how to fix the code (e.g. "did you mean to....")

b) on the /// documentation for MarkMappingOffline and MarkMappingOnline noting these methods make existing references invalid, but the return value provides a new reference to the mapping

c) on the /// doc for DeleteMapping recommending use of pattern sm.DeleteMapping(sm.MarkMappingOffline(rm)) if you are deleting right after marking offline

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the error message and the documentation for MarkMappingOffline, MarkMappingOnline, and DeleteMapping. Update them to explain that marking invalidates existing references, that the return value is the new reference, and that the suggested deletion pattern can be used; done means all three user-education requests are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
databases, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.