Closed
Bug 1124839
Opened 10 years ago
Closed 10 years ago
base: Entity support custom context
Categories
(Taskcluster :: General, defect)
Taskcluster
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jonasfj, Assigned: jonasfj)
References
Details
Attachments
(1 file)
It would be nice if we would inject some configuration constants when we call
Entity.setup()
These could just extend the prototype...
Additionally, it would be nice, if doing Entity.configure() we specified which configuration properties had to be injected..
Use:
var TaskGraph = base.Entity.configure({
...
context: ['schedulerId'] // Configurable constant
})
TaskGraph.prototype.status = function() {
return {
...
schedulerId: this.schedulerId
};
};
in bin/server.js
var data = require(...
var TaskGraph = data.TaskGraph.setup({
,,,
context: {
schedulerId: cfg.get('scheduler:schedulerId') // Loaded from configuration
}
});
This blocks bug 1088920, because we need to port to new entities first...
Assignee | ||
Comment 1•10 years ago
|
||
See description for what this does :)
I added lots of tests, so there is a reasonable chance this works...
Attachment #8553290 -
Flags: review?(jhford)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jopsen
Comment 2•10 years ago
|
||
Comment on attachment 8553290 [details] [review]
Github PR
Looks good to me and seems like a good feature to have
Attachment #8553290 -
Flags: review?(jhford) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Merged will be published with the next version of taskcluster-base
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Component: TaskCluster → General
Product: Testing → Taskcluster
Target Milestone: --- → mozilla41
Version: unspecified → Trunk
Comment 4•9 years ago
|
||
Resetting Version and Target Milestone that accidentally got changed...
Target Milestone: mozilla41 → ---
Version: Trunk → unspecified
You need to log in
before you can comment on or make changes to this bug.
Description
•