Skip to content

Conversation

@julz
Copy link
Contributor

@julz julz commented Jan 15, 2021

ContextHandler uses the first RevisonName/Namespace header, whereas RequestLog uses the last.

In practice the Revision headers are added by AppendHeaders which (confusingly) actually overwrites rather than appending, so there's only ever one value of the header so this doesn't make any difference -- but doing it the same way in both places is (a) nicer / less confusing and (b) lets us drop our custom LastHeaderValue function in favour of using the standard golang net/http header.Get in both places.

/assign @markusthoemmes @vagababov

Context_handler uses the _first_ RevisonName/Namespace header, whereas
request_log uses the _last_.

In practice the Revision header is added by AppendHeaders which
(confusingly) actually overwrites rather than appending, so there's only
ever one value of the header so this doesn't make any difference -- but
doing it the same way in both places is both (a) nicer / less confusing
and (b) lets us drop our custom LastHeaderValue function in favour of
using the standard golang net/http header.Get in both places.
@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Jan 15, 2021
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 15, 2021
@codecov
Copy link

codecov bot commented Jan 15, 2021

Codecov Report

Merging #10563 (9dbf37c) into master (66389d3) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10563      +/-   ##
==========================================
- Coverage   88.07%   88.07%   -0.01%     
==========================================
  Files         186      185       -1     
  Lines        8831     8827       -4     
==========================================
- Hits         7778     7774       -4     
  Misses        811      811              
  Partials      242      242              
Impacted Files Coverage Δ
cmd/activator/request_log.go 88.46% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 66389d3...9dbf37c. Read the comment docs.

@vagababov
Copy link
Contributor

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 15, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: julz, vagababov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 15, 2021
@knative-prow-robot knative-prow-robot merged commit 078edf2 into knative:master Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/autoscale area/networking cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants