Skip to content

fix(ci): copyright check improvement#2890

Merged
boquan-fang merged 3 commits intoaws:mainfrom
boquan-fang:boquan-fang/check-amazon-copyright
Nov 10, 2025
Merged

fix(ci): copyright check improvement#2890
boquan-fang merged 3 commits intoaws:mainfrom
boquan-fang:boquan-fang/check-amazon-copyright

Conversation

@boquan-fang
Copy link
Copy Markdown
Contributor

@boquan-fang boquan-fang commented Nov 10, 2025

Release Summary:

Resolved issues:

resolves #2889.

Description of changes:

Instead of checking for the word Copyright in our CI, we should check the phrase Copyright Amazon.com, Inc. or its affiliates. to ensure all files contain Amazon's copyright statement.

Call-outs:

I add the -i option to the command, because case distinction shouldn't affect this check. In fact, we do have at least one file that is using copyright Amazon.com, Inc. or its affiliates:

// Modifications copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

Testing:

Local test: I removed the Amazon copy right statement in if_xdp.rs. The file would still have the word Copyright at the top, but this test will error:

EC2:path to 2n-quic$ ./scripts/copyright_check 
Copyright Check Failed: /home/ubuntu/workspace/s2n-quic/tools/xdp/s2n-quic-xdp/src/if_xdp.rs
FAILED Copyright Check

Github test: I remove that line on this PR to show that copy right will fail. I then revert the commit to pass the test.
Negative test: for commit: 2ebfdb4, the copyright test failed: https://github.com/aws/s2n-quic/actions/runs/19242825789/job/55009419600?pr=2890.

Positive test: I revert the negative test commit. The new commit is 31cefd6, the copyright test passed: https://github.com/aws/s2n-quic/actions/runs/19242880178/job/55009601767?pr=2890.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

* remove the Amazon's copyright statement, but keep the copyright's word
  at top.
@boquan-fang boquan-fang marked this pull request as ready for review November 10, 2025 19:02
@boquan-fang boquan-fang requested a review from a team as a code owner November 10, 2025 19:02
@boquan-fang boquan-fang enabled auto-merge (squash) November 10, 2025 19:23
@boquan-fang
Copy link
Copy Markdown
Contributor Author

The udeps failure will be fixed by #2884.

@boquan-fang boquan-fang merged commit dacaf10 into aws:main Nov 10, 2025
121 of 122 checks passed
@boquan-fang boquan-fang deleted the boquan-fang/check-amazon-copyright branch November 10, 2025 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

s2n-quic's Copyright checks improvement

2 participants