Skip to content

Commit

Permalink
Merge branch 'main' into AlpnCommentary
Browse files Browse the repository at this point in the history
  • Loading branch information
bretambrose authored Jan 11, 2024
2 parents ce7e200 + 6225ebb commit dc755e9
Show file tree
Hide file tree
Showing 88 changed files with 6,398 additions and 5,092 deletions.
17 changes: 11 additions & 6 deletions .builder/actions/pkcs11_test_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,21 @@ class Pkcs11TestSetup(Builder.Action):
"""

def run(self, env):
if not env.project.needs_tests(env):
print("Skipping PKCS#11 setup because tests disabled for project")
return

self.env = env

# total hack: don't run PKCS#11 tests when building all C libs with -DBUILD_SHARED_LIBS=ON.
# here's what happens: libsofthsm2.so loads the system libcrypto.so and
# s2n loads the aws-lc's libcrypto.so and really strange things start happening.
# this wouldn't happen in the real world, just in our tests, so just bail out
if any('BUILD_SHARED_LIBS=ON' in arg for arg in env.args.args):
print("WARNING: PKCS#11 tests disabled when BUILD_SHARED_LIBS=ON due to weird libcrypto.so behavior")
return
if hasattr(env.args, "cmake_extra"):
if any('BUILD_SHARED_LIBS=ON' in arg for arg in env.args.cmake_extra):
print(
"WARNING: PKCS#11 tests disabled when BUILD_SHARED_LIBS=ON due to weird libcrypto.so behavior")
return

# try to install softhsm
try:
Expand Down Expand Up @@ -69,16 +75,15 @@ def _find_softhsm_lib(self):
# some installers put it in weird places where ldconfig doesn't look
# (like in a subfolder under lib/)

for lib_dir in ['lib64', 'lib']: # search lib64 before lib
for base_dir in ['/usr/local', '/usr', '/',]:
for lib_dir in ['lib64', 'lib']: # search lib64 before lib
for base_dir in ['/usr/local', '/usr', '/', ]:
search_dir = os.path.join(base_dir, lib_dir)
for root, dirs, files in os.walk(search_dir):
for file_name in files:
if 'libsofthsm2.so' in file_name:
return os.path.join(root, file_name)
return None


def _exec_softhsm2_util(self, *args, **kwargs):
if not 'check' in kwargs:
kwargs['check'] = True
Expand Down
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Declare files that will always have CRLF line endings on checkout.
tests/resources/testparse_crlf.crt text eol=crlf
82 changes: 82 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
name: "🐛 Bug Report"
description: Report a bug
title: "(short issue description)"
labels: [bug, needs-triage]
assignees: []
body:
- type: textarea
id: description
attributes:
label: Describe the bug
description: What is the problem? A clear and concise description of the bug.
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: |
What did you expect to happen?
validations:
required: true
- type: textarea
id: current
attributes:
label: Current Behavior
description: |
What actually happened?
Please include full errors, uncaught exceptions, stack traces, and relevant logs.
If service responses are relevant, please include wire logs.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction Steps
description: |
Provide a self-contained, concise snippet of code that can be used to reproduce the issue.
For more complex issues provide a repo with the smallest sample that reproduces the bug.
Avoid including business logic or unrelated code, it makes diagnosis more difficult.
The code sample should be an SSCCE. See http://sscce.org/ for details. In short, please provide a code sample that we can copy/paste, run and reproduce.
validations:
required: true
- type: textarea
id: solution
attributes:
label: Possible Solution
description: |
Suggest a fix/reason for the bug
validations:
required: false
- type: textarea
id: context
attributes:
label: Additional Information/Context
description: |
Anything else that might be relevant for troubleshooting this bug. Providing context helps us come up with a solution that is most useful in the real world.
validations:
required: false

- type: input
id: aws-c-io-version
attributes:
label: aws-c-io version used
validations:
required: true

- type: input
id: compiler-version
attributes:
label: Compiler and version used
validations:
required: true

- type: input
id: operating-system
attributes:
label: Operating System and version
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 💬 General Question
url: https://github.com/awslabs/aws-c-io/discussions/categories/q-a
about: Please ask and answer questions as a discussion thread
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: "📕 Documentation Issue"
description: Report an issue in the API Reference documentation or Developer Guide
title: "(short issue description)"
labels: [documentation, needs-triage]
assignees: []
body:
- type: textarea
id: description
attributes:
label: Describe the issue
description: A clear and concise description of the issue.
validations:
required: true

- type: textarea
id: links
attributes:
label: Links
description: |
Include links to affected documentation page(s).
validations:
required: true
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: 🚀 Feature Request
description: Suggest an idea for this project
title: "(short issue description)"
labels: [feature-request, needs-triage]
assignees: []
body:
- type: textarea
id: description
attributes:
label: Describe the feature
description: A clear and concise description of the feature you are proposing.
validations:
required: true
- type: textarea
id: use-case
attributes:
label: Use Case
description: |
Why do you need this feature? For example: "I'm always frustrated when..."
validations:
required: true
- type: textarea
id: solution
attributes:
label: Proposed Solution
description: |
Suggest how to implement the addition or change. Please include prototype/workaround/sketch/reference implementation.
validations:
required: false
- type: textarea
id: other
attributes:
label: Other Information
description: |
Any alternative solutions or features you considered, a more detailed explanation, stack traces, related issues, links for context, etc.
validations:
required: false
- type: checkboxes
id: ack
attributes:
label: Acknowledgements
options:
- label: I may be able to implement this feature request
required: false
- label: This feature might incur a breaking change
required: false
29 changes: 20 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'main'

env:
BUILDER_VERSION: v0.9.16
BUILDER_VERSION: v0.9.48
BUILDER_SOURCE: releases
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
PACKAGE_NAME: aws-c-io
Expand All @@ -18,7 +18,7 @@ env:

jobs:
linux-compat:
runs-on: ubuntu-20.04 # latest
runs-on: ubuntu-22.04 # latest
strategy:
fail-fast: false
matrix:
Expand All @@ -35,10 +35,10 @@ jobs:
- name: Build ${{ env.PACKAGE_NAME }}
run: |
aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }} downstream
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }}
linux-byo-crypto:
runs-on: ubuntu-20.04 # latest
runs-on: ubuntu-22.04 # latest
steps:
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
- name: Build ${{ env.PACKAGE_NAME }} + consumers
Expand All @@ -47,7 +47,7 @@ jobs:
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-al2-x64 build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBYO_CRYPTO=ON
linux-compiler-compat:
runs-on: ubuntu-20.04 # latest
runs-on: ubuntu-22.04 # latest
strategy:
matrix:
compiler:
Expand All @@ -70,7 +70,7 @@ jobs:
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --compiler=${{ matrix.compiler }}
clang-sanitizers:
runs-on: ubuntu-20.04 # latest
runs-on: ubuntu-22.04 # latest
strategy:
matrix:
sanitizers: [",thread", ",address,undefined"]
Expand All @@ -82,14 +82,25 @@ jobs:
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --compiler=clang-11 --cmake-extra=-DENABLE_SANITIZERS=ON --cmake-extra=-DSANITIZERS="${{ matrix.sanitizers }}"
linux-shared-libs:
runs-on: ubuntu-20.04 # latest
runs-on: ubuntu-22.04 # latest
steps:
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
- name: Build ${{ env.PACKAGE_NAME }}
run: |
aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
# Test downstream repos.
# This should not be required because we can run into a chicken and egg problem if there is a change that needs some fix in a downstream repo.
downstream:
runs-on: ubuntu-22.04 # latest
steps:
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
- name: Build ${{ env.PACKAGE_NAME }}
run: |
aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build downstream -p ${{ env.PACKAGE_NAME }}
windows:
runs-on: windows-2022 # latest
steps:
Expand Down Expand Up @@ -129,10 +140,10 @@ jobs:
python .\aws-c-io\build\deps\aws-c-common\scripts\appverifier_ctest.py --build_directory .\aws-c-io\build\aws-c-io
osx:
runs-on: macos-11 # latest
runs-on: macos-13 # latest
steps:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
chmod a+x builder
./builder build -p ${{ env.PACKAGE_NAME }} downstream
./builder build -p ${{ env.PACKAGE_NAME }}
17 changes: 17 additions & 0 deletions .github/workflows/closed-issue-message.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Closed Issue Message
on:
issues:
types: [closed]
jobs:
auto_comment:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/closed-issue-message@v1
with:
# These inputs are both required
repo-token: "${{ secrets.GITHUB_TOKEN }}"
message: |
### ⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
18 changes: 18 additions & 0 deletions .github/workflows/handle-stale-discussions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: HandleStaleDiscussions
on:
schedule:
- cron: '0 */4 * * *'
discussion_comment:
types: [created]

jobs:
handle-stale-discussions:
name: Handle stale discussions
runs-on: ubuntu-latest
permissions:
discussions: write
steps:
- name: Stale discussions action
uses: aws-github-ops/handle-stale-discussions@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
7 changes: 5 additions & 2 deletions .github/workflows/proof-alarm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ jobs:

- name: Check
run: |
git diff --quiet 754ba168f source/linux/epoll_event_loop.c
TMPFILE=$(mktemp)
echo "c624a28de5af7f851a240a1e65a26c01 source/linux/epoll_event_loop.c" > $TMPFILE
md5sum --check $TMPFILE
# No further steps if successful

Expand All @@ -24,4 +26,5 @@ jobs:
run: |
echo "The VCC proofs are based on a snapshot of epoll_event_loop.c.
This push updates this file so the proofs must be rechecked to ensure they remain valid.
Please contact Nathan Chong."
Please contact Nathan Chong.
You can also update md5sum value by running `md5sum source/linux/epoll_event_loop.c` if the changes are trivial."
Loading

0 comments on commit dc755e9

Please sign in to comment.