Closed
Bug 1574251
Opened 6 years ago
Closed 6 years ago
[azure-entities] allow context to be specified once
Categories
(Taskcluster :: Services, enhancement)
Taskcluster
Services
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: dustin, Unassigned, Mentored)
Details
azure-entities has an interesting way of defining multiple versions of a particular table:
let MyTable = Entity.configure({
version: 1,
partitionKey: ..,
rowKey: ..,
properties: ..
}).configure({
version: 2,
properties: ..,
migrate: async item => { ... },
});
For the most part, options such as rowKey that are passed to the first configure are persisted through subsequent calls to configure.
However, the context property is not. So, this:
let MyTable = Entity.configure({
version: 1,
partitionKey: ..,
rowKey: ..,
properties: ..,
context: ['a', 'b'],
}).configure({
version: 2,
properties: ..,
migrate: async item => { ... },
});
does not work: trying to call setup({ ..., context: {a: 10, b: 20}}) will complain that a and b were not provided to Entity.configure:
AssertionError [ERR_ASSERTION]: context key 'a' was not declared in Entity.configure
Let's fix that.
| Reporter | ||
Comment 1•6 years ago
|
||
Not using this library anymore :)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•