Pass controller runtime objects with Context
This MR introduces runtime context where runtime object of Controller, for example the Client, are embedded in the Context.
This make it easier to pass down the request-scoped information to other components.
The following are included:
-
ContextBuilder
type for building a new runtime context with theClient
,Logger
, etc. -
ClientFromContext
function to retrieve theClient
from a context. -
RecorderFromContext
function to retrieve theEventRecorder
from a context.
Related to #889 (closed)
Closes #440 (closed)
Closes #325 (closed)
Merge request reports
Activity
changed milestone to %15.6
assigned to @pursultani
added typefeature label
1 Warning c6589b89: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. 1 Message CHANGELOG missing: If you want to create a changelog entry for GitLab FOSS, add the
Changelog
trailer to the commit message you want to add to the changelog.If you want to create a changelog entry for GitLab EE, also add the
EE: true
trailer to your commit message.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangeradded workflowready for review label
mentioned in merge request !550 (closed)
- Resolved by Mitchell Nielsen
@pursultani this should also help with addressing #325 (closed), correct?
requested review from @rmarshall
added workflowin review label and removed workflowready for review label
- Resolved by Mitchell Nielsen
- Resolved by Mitchell Nielsen
- Resolved by Mitchell Nielsen
- Resolved by Hossein Pursultani
- Resolved by Mitchell Nielsen
- Resolved by Mitchell Nielsen
Took a first pass at the review here.
My primary nits here are:
- wording/language of comments
- maintainability/readability/yagni (you ain't gonna need it) concerns
cc @mnielsen
requested review from @mnielsen
- Resolved by Hossein Pursultani
- Resolved by Hossein Pursultani
added 1 commit
- c6589b89 - Use optional arguments instead of Builder pattern
- Resolved by Mitchell Nielsen
- Resolved by Mitchell Nielsen
mentioned in issue #325 (closed)
mentioned in commit 20e9dbe3
picked the changes into the branch
0-14-stable
with commit 56da770cmentioned in commit 56da770c
mentioned in issue #966 (closed)