-
Notifications
You must be signed in to change notification settings - Fork 116
chore: rie private to public upload #176
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
Merged
+4
−4
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e970820
Update from upstream - 2026-03-18
50fd571
Update from upstream - 2026-03-18
9707bee
Update from upstream - 2026-03-18
1ed266f
Update from upstream - 2026-03-19
7cbb9c1
Update from upstream - 2026-03-19
c09024d
Potential fix for code scanning alert no. 7: Workflow does not contai…
tobixlea 17dc38a
Update from upstream - 2026-03-27
22d7a58
Update from upstream - 2026-03-30
1140f7f
Update from upstream - 2026-04-01
a5f1986
Merge branch 'develop' into rie-private-to-public
tobixlea File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,8 @@ on: | |
| branches: | ||
| - develop | ||
| - main | ||
|
|
||
| merge_group: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| name: Validate PR Branch into Main | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| validate-pr-branch: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check source branch | ||
| run: | | ||
| SOURCE_BRANCH="${{ github.head_ref }}" | ||
| if [[ "$SOURCE_BRANCH" != "develop" ]]; then | ||
| echo "Error: Only pull requests from develop branch are allowed into main" | ||
| echo "Current source branch ($SOURCE_BRANCH)." | ||
| exit 1 | ||
| fi | ||
| echo "Source branch is develop - merge allowed" | ||
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
internal/lambda-managed-instances/aws-lambda-rie/internal/telemetry/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # RIE Telemetry Package | ||
|
|
||
| The RIE (Runtime Interface Emulator) telemetry package provides Telemetry API. | ||
|
|
||
| ## Architecture Overview | ||
|
|
||
| ``` | ||
| ┌─────────────────┐ ┌─────────────────┐ ┌──────────────────┐ | ||
| │ EventsAPI │ │ LogsEgress │ │ SubscriptionAPI │ | ||
| │ │ │ │ │ │ | ||
| │ • Platform │ │ • Runtime logs │ │ • Subscription │ | ||
| │ events │ │ • Extension │ │ management │ | ||
| │ • Lifecycle │ │ logs │ │ • Schema │ | ||
| │ events │ │ • Log capture │ │ validation │ | ||
| └─────────┬───────┘ └─────────┬───────┘ └──────────┬───────┘ | ||
| │ │ │ | ||
| └──────────────┬───────────────────────────────┘ | ||
| │ | ||
| ┌────▼────┐ | ||
| │ Relay │ | ||
| │ │ | ||
| │ Event │ | ||
| │ Broker │ | ||
| └────┬────┘ | ||
| │ | ||
| ┌──────────────┼──────────────┐ | ||
| │ │ │ | ||
| ┌─────▼─────┐ ┌─────▼─────┐ ┌─────▼─────┐ | ||
| │Subscriber │ │Subscriber │ │Subscriber │ | ||
| │ A │ │ B │ │ C │ | ||
| └─────┬─────┘ └─────┬─────┘ └─────┬─────┘ | ||
| │ │ │ | ||
| ┌─────▼─────┐ ┌─────▼─────┐ ┌─────▼─────┐ | ||
| │TCP Client │ │HTTP Client│ │TCP Client │ | ||
| └───────────┘ └───────────┘ └───────────┘ | ||
| ``` | ||
|
|
||
| ## Core Components | ||
|
|
||
| ### 1. EventsAPI (`events_api.go`) | ||
| **Responsibility**: Platform event generation and distribution | ||
|
|
||
| The EventsAPI serves as the primary interface for generating and broadcasting AWS Lambda platform events. It implements the `EventsAPI` interface and handles various lifecycle events including initialization, invocation, and error reporting. | ||
|
|
||
| ### 2. LogsEgress (`logs_egress.go`) | ||
| **Responsibility**: Log capture and forwarding | ||
|
|
||
| The LogsEgress component implements the `StdLogsEgressAPI` interface to capture stdout/stderr from both runtime and extensions, forwarding them to telemetry subscribers while maintaining original console output. | ||
|
|
||
| ### 3. Relay (`relay.go`) | ||
| **Responsibility**: Event broadcasting and subscriber management | ||
|
|
||
| The Relay acts as a central event broker, managing subscribers and broadcasting events to all registered telemetry consumers. | ||
|
|
||
| ### 4. SubscriptionAPI (`subscription_api.go`) | ||
| **Responsibility**: Subscription management and validation | ||
|
|
||
| The SubscriptionAPI handles telemetry subscription requests, validates them against JSON schemas, and manages the subscription lifecycle. | ||
|
|
||
| ## Internal Components | ||
|
|
||
| ### 1. Subscriber (`internal/subscriber.go`) | ||
| **Responsibility**: Event batching and delivery | ||
|
|
||
| Each subscriber represents a telemetry consumer and manages efficient event delivery through batching and asynchronous processing. | ||
|
|
||
| ### 2. Client (`internal/client.go`) | ||
| **Responsibility**: Protocol-specific event delivery | ||
|
|
||
| The client abstraction provides protocol-specific implementations for delivering events to telemetry consumers. | ||
|
|
||
| ### 3. Batch (`internal/batch.go`) | ||
| **Responsibility**: Event collection and timing | ||
|
|
||
| The batch component manages collections of events with size and time-based flushing logic. | ||
|
|
||
| ### 4. Types (`internal/types.go`) | ||
| **Responsibility**: Type definitions and constants | ||
|
|
||
| Centralized type definitions for protocols, event categories, and configuration structures. | ||
|
|
||
| ## Event Flow | ||
|
|
||
| ### 1. Subscription Flow | ||
| ``` | ||
| Extension/Agent → SubscriptionAPI → Schema Validation → Subscriber Creation → Relay Registration | ||
| ``` | ||
|
|
||
| ### 2. Event Flow | ||
| ``` | ||
| Event Source → EventsAPI → Relay → Subscribers → Batching → Client | ||
| ``` | ||
|
|
||
| ### 3. Log Flow | ||
| ``` | ||
| Runtime/Extension → LogsEgress → Console Output + Relay → Subscribers → Batching → Client | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package main | ||
|
|
||
| import ( | ||
| "github.com/aws/aws-lambda-runtime-interface-emulator/internal/lambda-managed-instances/aws-lambda-rie/run" | ||
| ) | ||
|
|
||
| func main() { | ||
| run.Run() | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
internal/lambda-managed-instances/interop/mock_reserve_idle_runtime_request.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package interop | ||
|
|
||
| import mock "github.com/stretchr/testify/mock" | ||
|
|
||
| type MockReserveIdleRuntimeRequest struct { | ||
| mock.Mock | ||
| } | ||
|
|
||
| func (_m *MockReserveIdleRuntimeRequest) InvokeID() string { | ||
| ret := _m.Called() | ||
|
|
||
| if len(ret) == 0 { | ||
| panic("no return value specified for InvokeID") | ||
| } | ||
|
|
||
| var r0 string | ||
| if rf, ok := ret.Get(0).(func() string); ok { | ||
| r0 = rf() | ||
| } else { | ||
| r0 = ret.Get(0).(string) | ||
| } | ||
|
|
||
| return r0 | ||
| } | ||
|
|
||
| func NewMockReserveIdleRuntimeRequest(t interface { | ||
| mock.TestingT | ||
| Cleanup(func()) | ||
| }) *MockReserveIdleRuntimeRequest { | ||
| mock := &MockReserveIdleRuntimeRequest{} | ||
| mock.Mock.Test(t) | ||
|
|
||
| t.Cleanup(func() { mock.AssertExpectations(t) }) | ||
|
|
||
| return mock | ||
| } |
26 changes: 26 additions & 0 deletions
26
internal/lambda-managed-instances/interop/mock_reserve_idle_runtime_response.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package interop | ||
|
|
||
| import mock "github.com/stretchr/testify/mock" | ||
|
|
||
| type MockReserveIdleRuntimeResponse struct { | ||
| mock.Mock | ||
| } | ||
|
|
||
| func (_m *MockReserveIdleRuntimeResponse) reserveIdleRuntimeResponse() { | ||
| _m.Called() | ||
| } | ||
|
|
||
| func NewMockReserveIdleRuntimeResponse(t interface { | ||
| mock.TestingT | ||
| Cleanup(func()) | ||
| }) *MockReserveIdleRuntimeResponse { | ||
| mock := &MockReserveIdleRuntimeResponse{} | ||
| mock.Mock.Test(t) | ||
|
|
||
| t.Cleanup(func() { mock.AssertExpectations(t) }) | ||
|
|
||
| return mock | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.