Skip to content

Commit

Permalink
Bugfixes + breaking changes (#21)
Browse files Browse the repository at this point in the history
* Bugfixes + breaking changes

Breaking changes:
1. The `subscribe` and `unsubscribe` methods for `ShadowClient` return a single task and list of ids instead of a list of task, id pairs to be less confusing.
2. Callbacks used to run sequentially, now they run concurrently.
3. macOS support dropped due to crashes.
4. AWSCRT downgraded to 0.1.2. This will be updated in the future.

New features:
1. Added `wait_until_synced`

Other notes:
Removed ForeignCallbacks.jl now that the foreign threads work is merged into base Julia.

* update aqua to get bugfix
  • Loading branch information
Octogonapus authored Mar 15, 2024
1 parent b0ed11b commit 103cf41
Show file tree
Hide file tree
Showing 19 changed files with 1,843 additions and 800 deletions.
111 changes: 103 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,129 @@
name: CI

on: [push, pull_request]
on:
pull_request:
branches:
- main

permissions:
contents: read

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
name: test ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "1.9"
- "1.10"
os:
- ubuntu-latest
- macOS-latest
# - macOS-latest
arch:
- x64
permissions:
id-token: write # for OIDC
contents: read # to clone
env:
AWS_DEFAULT_REGION: us-east-1
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}

- uses: julia-actions/cache@v1

- uses: julia-actions/julia-buildpkg@v1

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::533267155197:role/AWSCRT-OIDC
role-session-name: awscrt-test
role-duration-seconds: 3600
aws-region: ${{ env.AWS_DEFAULT_REGION }}

- name: Run regular tests
uses: julia-actions/julia-runtest@v1
env:
ENDPOINT: ${{ secrets.ENDPOINT }}
CERT_STRING: ${{ secrets.CERT_STRING }}
PRI_KEY_STRING: ${{ secrets.PRI_KEY_STRING }}

- name: Run parallel tests
env:
ENDPOINT: ${{ secrets.ENDPOINT }}
CERT_STRING: ${{ secrets.CERT_STRING }}
PRI_KEY_STRING: ${{ secrets.PRI_KEY_STRING }}
AWSCRT_TESTS_PARALLEL: true
run: |
NTHREADS=$(($(nproc) * 2))
NTIMES=50
julia -t $NTHREADS test/run_parallel_commands.jl $NTIMES julia -t 2 --project -e 'using Pkg; Pkg.test()'
- uses: julia-actions/julia-processcoverage@v1

- uses: codecov/codecov-action@v4
with:
file: ./lcov.info
fail_ci_if_error: false

downgrade-test:
name: downgrade-test ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "1.9"
- "1.10"
os:
- ubuntu-latest
# - macOS-latest
arch:
- x64
permissions:
id-token: write # for OIDC
contents: read # to clone
env:
AWS_DEFAULT_REGION: us-east-1
steps:
- uses: actions/checkout@v4

- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}

- uses: julia-actions/cache@v1

- uses: julia-actions/julia-downgrade-compat@v1

- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::533267155197:role/AWSCRT-OIDC
role-session-name: awscrt-test
role-duration-seconds: 3600
aws-region: ${{ env.AWS_DEFAULT_REGION }}

- name: Run regular tests
uses: julia-actions/julia-runtest@v1
env:
ENDPOINT: ${{ secrets.ENDPOINT }}
CERT_STRING: ${{ secrets.CERT_STRING }}
PRI_KEY_STRING: ${{ secrets.PRI_KEY_STRING }}

- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2

- uses: codecov/codecov-action@v4
with:
file: ./lcov.info
fail_ci_if_error: false
Expand All @@ -46,19 +136,24 @@ jobs:
matrix:
version:
- "1.9"
- "1.10"
os:
- ubuntu-latest
- macOS-latest
# - macOS-latest
arch:
- x64
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}

- uses: julia-actions/cache@v1

- uses: julia-actions/julia-buildpkg@v1

- run: |
julia --project -e 'import Pkg; Pkg.develop(path=".."); Pkg.instantiate(); Pkg.build();'
MQTT_ENABLED=false julia --project=sysimage -e 'import Pkg; Pkg.instantiate(); Pkg.build(); include(joinpath("sysimage", "build_sysimage.jl")); build()'
Expand Down
18 changes: 13 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "AWSCRT"
uuid = "df31ea59-17a4-4ebd-9d69-4f45266dc2c7"
version = "0.1.5"
version = "0.2.0"

[deps]
AWSCRT_jll = "01db5350-6ea1-5d9a-9a47-8a31a394cb9c"
Expand All @@ -11,19 +11,27 @@ JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
LibAWSCRT = "df7458b6-5204-493f-a0e7-404b4eb72fac"

[compat]
AWSCRT_jll = "0.1"
AWSCRT_jll = "=0.1.2"
AWS = "1.78"
Aqua = "0.8.4"
CEnum = "0.4"
CountDownLatches = "2"
ForeignCallbacks = "0.1"
Dates = "1"
Documenter = "1"
ForeignCallbacks = "0.1.1"
JSON = "0.21"
LibAWSCRT = "0.1"
LibAWSCRT = "=0.1.0"
Random = "1"
Test = "1"
julia = "1.9"

[extras]
AWS = "fbe9abb3-538b-5e4e-ba9e-bc94f4f92ebc"
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "Documenter", "Random", "Test"]
test = ["AWS", "Aqua", "Dates", "Documenter", "Random", "Test"]
Loading

2 comments on commit 103cf41

@Octogonapus
Copy link
Owner Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/102951

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.0 -m "<description of version>" 103cf41800c68b4de4e11e7f03bd77df8eca0ade
git push origin v0.2.0

Please sign in to comment.