Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(w3c trace context): do not pass down unknown flags. #417

Merged
merged 1 commit into from
May 15, 2023

Conversation

basti1302
Copy link
Contributor

The W3C trace context specification mandates that a participant must only send known flags downstream. See
https://www.w3.org/TR/trace-context/#other-flags: "The behavior of other flags, such as (00000100) is not defined and is reserved for future use. Vendors MUST set those to zero."

@github-actions
Copy link

@basti1302 the signed-off-by was not found in the following 1 commits:

  • 65678d6: fix(w3c trace context): do not pass down unknown flags.

📝 What should I do to fix it?

All proposed commits should include a sign-off in their messages, ideally at the end.

❔ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO, reformatted for readability:

By making a contribution to this project, I certify that:

a. The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

b. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

c. The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

d. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <randomdeveloper@example.com>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

@basti1302 basti1302 force-pushed the do-not-pass-unknown-flags-downstream branch from 65678d6 to 43c7dd0 Compare May 10, 2023 07:49
@github-actions
Copy link

@basti1302 the signed-off-by was not found in the following 1 commits:

  • 43c7dd0: fix(w3c trace context): do not pass down unknown flags.

📝 What should I do to fix it?

All proposed commits should include a sign-off in their messages, ideally at the end.

❔ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO, reformatted for readability:

By making a contribution to this project, I certify that:

a. The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

b. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

c. The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

d. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <randomdeveloper@example.com>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

@basti1302 basti1302 force-pushed the do-not-pass-unknown-flags-downstream branch from 43c7dd0 to 5572d75 Compare May 10, 2023 07:50
@basti1302 basti1302 marked this pull request as draft May 10, 2023 08:01
@basti1302 basti1302 added the wip work in progress label May 10, 2023
@Ferenc-
Copy link
Collaborator

Ferenc- commented May 12, 2023

@basti1302 Rebasing onto the current master branch should unblock you.

@basti1302 basti1302 force-pushed the do-not-pass-unknown-flags-downstream branch 3 times, most recently from 65caa18 to 5c4d33b Compare May 15, 2023 05:01
@basti1302 basti1302 added Review & Merge and removed wip work in progress labels May 15, 2023
@basti1302 basti1302 marked this pull request as ready for review May 15, 2023 05:02
@basti1302 basti1302 requested review from Ferenc- and a team and removed request for Ferenc- May 15, 2023 05:02
Copy link
Member

@pvital pvital left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Great job.

@pvital
Copy link
Member

pvital commented May 15, 2023

@basti1302 this PR needs to rebase before merging it.

@basti1302 basti1302 force-pushed the do-not-pass-unknown-flags-downstream branch from 5c4d33b to 232aaa4 Compare May 15, 2023 08:08
@basti1302
Copy link
Contributor Author

@basti1302 this PR needs to rebase before merging it.

@pvital I just rebased again, should be good now.

@Ferenc-
Copy link
Collaborator

Ferenc- commented May 15, 2023

@basti1302 this PR needs to rebase before merging it.

@pvital I just rebased again, should be good now.

My apologies, #421 went in the meantime.

@pvital
Copy link
Member

pvital commented May 15, 2023

@basti1302 this PR needs to rebase before merging it.

@pvital I just rebased again, should be good now.

My apologies, #421 went in the meantime.

@basti1302 if the PR is OK, we can rebase before merging it. Just say, and we can do it.

The W3C trace context specification mandates that a participant must
only send known flags downstream. See
https://www.w3.org/TR/trace-context/#other-flags: "The behavior of other
flags, such as (00000100) is not defined and is reserved for future use.
Vendors MUST set those to zero."

In particular, this commit changes the way traceparent.py handles the
flags. Instead of persisting the complete flags field from traceparent,
we specifically parse the flag(s) that we understand and keep them as
individual boolean attributes. This will also make it easier to
handle the random trace ID flag correctly when updating support to W3C
trace context level 2.

In addition we now correctly pass down the version field as 00, since
that is the traceparent version we support (instead of passing down the
incoming version value).

Signed-off-by: Bastian Krol <bastian.krol@ibm.com>
@basti1302 basti1302 force-pushed the do-not-pass-unknown-flags-downstream branch from 232aaa4 to df2a32c Compare May 15, 2023 09:33
@basti1302
Copy link
Contributor Author

My apologies, #421 went in the meantime.

@basti1302 if the PR is OK, we can rebase before merging it. Just say, and we can do it.

Lolol, no merges since weeks and today you are merging all the PRs 🎉 No worries, I rebased again. But if you plan to merge more PRs before this one, you can also feel free to rebase this on your own.

@basti1302 basti1302 merged commit d87a8bf into master May 15, 2023
@basti1302 basti1302 deleted the do-not-pass-unknown-flags-downstream branch May 15, 2023 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants