Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2b5405a
WIP : init plugin
sebsto Nov 7, 2024
cc08a9a
WIP deploy plugin
sebsto Nov 7, 2024
405906f
Merge branch 'main' into sebsto/plugin-scaffold
sebsto Nov 13, 2024
9f7b043
change plugin invocation name for consistency
sebsto Nov 13, 2024
9361bed
Merge branch 'main' into sebsto/plugin-scaffold
sebsto Nov 16, 2024
bd46345
add implementation of AWS v4 Signer from aws-signer-v4 and HMAC+SHA25…
sebsto Nov 16, 2024
90517ad
swift format
sebsto Nov 16, 2024
2bdd645
WIP : migrate archive plugin to new lambda-build
sebsto Nov 17, 2024
47dd245
use Foundation to access Process on Linux
sebsto Nov 17, 2024
0665430
add --with-url option
sebsto Nov 24, 2024
0bdc813
swift format
sebsto Nov 25, 2024
0518a48
Merge branch 'main' into sebsto/new-plugins
sebsto Jan 8, 2025
3a5ef4e
Merge branch 'main' into sebsto/new-plugins
sebsto Mar 13, 2025
062c496
Merge branch 'main' into sebsto/new-plugins
sebsto Mar 13, 2025
32a0062
Merge branch 'main' into sebsto/new-plugins
sebsto Jul 30, 2025
e3a579c
minor wording changes
sebsto Jul 30, 2025
63702a5
Merge branch 'main' into sebsto/new-plugins
sebsto Sep 23, 2025
bf83300
Merge branch 'main' into sebsto/new-plugins
Oct 22, 2025
781bf3b
Merge branch 'main' into sebsto/new-plugins
sebsto Nov 2, 2025
088ac9b
Merge branch 'main' into sebsto/new-plugins
sebsto Nov 2, 2025
174c967
fix license headers
sebsto Nov 2, 2025
90ff596
fix shell check
sebsto Nov 2, 2025
6502638
more license header fixes
sebsto Nov 2, 2025
77d29af
more fixes fro shell checks
sebsto Nov 2, 2025
da47411
mor elicense fixes
sebsto Nov 2, 2025
bf73943
more license header fix
sebsto Nov 2, 2025
71c6a89
fix unit test errors on nightly-main
sebsto Nov 2, 2025
030a6c0
fix plugin package
sebsto Nov 2, 2025
728150c
fix 6.0 language mode
sebsto Nov 2, 2025
19b8ff1
Merge branch 'main' into sebsto/new-plugins
Nov 3, 2025
24d4022
Merge branch 'main' into sebsto/new-plugins
sebsto Jan 27, 2026
37a30a4
Update Plugin Spec doc to add Apple container
sebsto Feb 17, 2026
f3fbfb4
Merge branch 'main' into sebsto/new-plugins
sebsto Feb 17, 2026
3cbc9f9
Merge branch 'main' into sebsto/new-plugins
sebsto Feb 17, 2026
5d1b670
Merge branch 'main' into sebsto/new-plugins
Jun 3, 2026
c89cb8c
add .kiro directory for project history
Jun 3, 2026
3e86ec4
Initial Commit for plugins v2
Jun 4, 2026
534cd29
remove .kiro/ from license check
Jun 4, 2026
a80721a
fix integration test
Jun 4, 2026
65800ff
add @available(LambdaSwift 2.0, *) annotations for soto-core compatib…
sebsto Jun 5, 2026
637a4d9
add --profile option to lambda-deploy for named AWS profile selection
sebsto Jun 5, 2026
134ee8e
check sso and login when --profile is selected
Jun 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ Package.resolved
.vscode
.devcontainer
.amazonq
.kiro
nodejs
.ash
18 changes: 18 additions & 0 deletions .kiro/hooks/swift-syntax-check.kiro.hook
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"enabled": true,
"name": "Swift Syntax Checker",
"description": "Automatically runs Swift syntax checking in the background whenever a Swift file is saved using the check-format.sh script. You don't need to fix the issues reported. The script does it automatically. Just run the script and stay silent.",
"version": "1",
"when": {
"type": "userTriggered",
"patterns": [
"**/*.swift",
"Sources/",
"Tests/"
]
},
"then": {
"type": "askAgent",
"prompt": "A Swift file has been saved. Please run the syntax check script located at scripts/check-format.sh to validate the Swift code formatting and syntax. Report any issues found or confirm that the syntax is correct."
}
}
198 changes: 198 additions & 0 deletions .kiro/settings/lsp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
{
"languages": {
"cpp": {
"name": "clangd",
"command": "clangd",
"args": [
"--background-index"
],
"file_extensions": [
"cpp",
"cc",
"cxx",
"c",
"h",
"hpp",
"hxx"
],
"project_patterns": [
"CMakeLists.txt",
"compile_commands.json",
"Makefile"
],
"exclude_patterns": [
"**/build/**",
"**/cmake-build-**/**"
],
"multi_workspace": false,
"initialization_options": {},
"request_timeout_secs": 60
},
"typescript": {
"name": "typescript-language-server",
"command": "typescript-language-server",
"args": [
"--stdio"
],
"file_extensions": [
"ts",
"js",
"tsx",
"jsx"
],
"project_patterns": [
"package.json",
"tsconfig.json"
],
"exclude_patterns": [
"**/node_modules/**",
"**/dist/**"
],
"multi_workspace": false,
"initialization_options": {
"preferences": {
"disableSuggestions": false
}
},
"request_timeout_secs": 60
},
"go": {
"name": "gopls",
"command": "gopls",
"args": [],
"file_extensions": [
"go"
],
"project_patterns": [
"go.mod",
"go.sum"
],
"exclude_patterns": [
"**/vendor/**"
],
"multi_workspace": false,
"initialization_options": {
"usePlaceholders": true,
"completeUnimported": true
},
"request_timeout_secs": 60
},
"rust": {
"name": "rust-analyzer",
"command": "rust-analyzer",
"args": [],
"file_extensions": [
"rs"
],
"project_patterns": [
"Cargo.toml"
],
"exclude_patterns": [
"**/target/**"
],
"multi_workspace": false,
"initialization_options": {
"cargo": {
"buildScripts": {
"enable": true
}
},
"diagnostics": {
"enable": true,
"enableExperimental": true
},
"workspace": {
"symbol": {
"search": {
"scope": "workspace"
}
}
}
},
"request_timeout_secs": 60
},
"python": {
"name": "pyright",
"command": "pyright-langserver",
"args": [
"--stdio"
],
"file_extensions": [
"py"
],
"project_patterns": [
"pyproject.toml",
"setup.py",
"requirements.txt",
"pyrightconfig.json"
],
"exclude_patterns": [
"**/__pycache__/**",
"**/venv/**",
"**/.venv/**",
"**/.pytest_cache/**"
],
"multi_workspace": false,
"initialization_options": {},
"request_timeout_secs": 60
},
"ruby": {
"name": "solargraph",
"command": "solargraph",
"args": [
"stdio"
],
"file_extensions": [
"rb"
],
"project_patterns": [
"Gemfile",
"Rakefile"
],
"exclude_patterns": [
"**/vendor/**",
"**/tmp/**"
],
"multi_workspace": false,
"initialization_options": {},
"request_timeout_secs": 60
},
"java": {
"name": "jdtls",
"command": "jdtls",
"args": [],
"file_extensions": [
"java"
],
"project_patterns": [
"pom.xml",
"build.gradle",
"build.gradle.kts",
".project"
],
"exclude_patterns": [
"**/target/**",
"**/build/**",
"**/.gradle/**"
],
"multi_workspace": false,
"initialization_options": {
"settings": {
"java": {
"compile": {
"nullAnalysis": {
"mode": "automatic"
}
},
"configuration": {
"annotationProcessing": {
"enabled": true
}
}
}
}
},
"request_timeout_secs": 60
}
}
}
1 change: 1 addition & 0 deletions .kiro/specs/al2-deprecation-warning/.config.kiro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"specId": "fbbaa416-0f18-4730-9125-3159b272b477", "workflowType": "requirements-first", "specType": "feature"}
116 changes: 116 additions & 0 deletions .kiro/specs/al2-deprecation-warning/design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Design Document

## Overview

This design describes the changes to the `AWSLambdaPackager` plugin to revert the default Docker base image to Amazon Linux 2 and introduce a prominent deprecation warning when AL2 is used. The warning informs developers about the EOL status and guides them to migrate to AL2023.

The changes are confined to a single file (`Plugins/AWSLambdaPackager/Plugin.swift`) plus documentation updates. No new modules or dependencies are introduced.

## Architecture

### Flow Diagram

```
performCommand()
├── Parse configuration (baseDockerImage defaults to amazonlinux2)
├── if isAmazonLinux2() (native on AL2)
│ ├── print deprecation warning
│ └── proceed with native build
├── if isAmazonLinux2023() (native on AL2023)
│ └── proceed with native build (no warning)
└── else (not on Amazon Linux → Docker build)
├── if baseDockerImage contains "amazonlinux2" but NOT "amazonlinux2023"
│ └── print deprecation warning
└── proceed with Docker build
```

## Components and Interfaces

### Modified Components

| Component | File | Change |
|-----------|------|--------|
| `Configuration` struct | `Plugin.swift` | Revert `baseDockerImage` to always use `amazonlinux2` |
| `AWSLambdaPackager.performCommand()` | `Plugin.swift` | Add deprecation warning logic before build |
| `AWSLambdaPackager.isAmazonLinux()` | `Plugin.swift` | Split into `isAmazonLinux2()` and `isAmazonLinux2023()` |
| `AWSLambdaPackager.displayHelpMessage()` | `Plugin.swift` | Update default image text and add migration note |
| Quick-setup docs | `quick-setup.md` | Add migration note |
| Readme | `readme.md` | Add migration note |

### New Methods

```swift
/// Prints a prominent deprecation warning about Amazon Linux 2 EOL.
private func displayDeprecationWarning()

/// Returns true if running natively on Amazon Linux 2 (not AL2023).
private func isAmazonLinux2() -> Bool

/// Returns true if running natively on Amazon Linux 2023.
private func isAmazonLinux2023() -> Bool
```

### Interfaces

No public API changes. All modifications are internal to the plugin.

## Testing Strategy

Since this is a SwiftPM plugin, automated unit testing is limited. Verification approach:

1. **macOS Docker build (AL2 default)** — Run `swift package --allow-network-connections docker archive` and verify the deprecation warning appears, then the build completes
2. **macOS Docker build (AL2023 explicit)** — Run with `--base-docker-image swift:6.3-amazonlinux2023` and verify no warning appears
3. **Native on AL2** — Run inside an AL2 container and verify the warning appears, then the build completes
4. **Native on AL2023** — Run inside an AL2023 container and verify native build proceeds without warning
5. **Help message** — Run with `--help` and verify the updated text

## Data Models

### Configuration Change

The `baseDockerImage` property computation reverts to the pre-7615923 logic:

```swift
// Before (commit 7615923): version-based AL2/AL2023 selection
// After (this change): always amazonlinux2
self.baseDockerImage =
baseDockerImageArgument.first ?? "swift:\(swiftVersion.map { $0 + "-" } ?? "")amazonlinux2"
```

No new data models or stored state are introduced.

## Error Handling

### Native Build on AL2

When the plugin detects it is running natively on Amazon Linux 2, it prints the deprecation warning and proceeds with the native build. No error is thrown — this is a non-blocking warning.

### Docker Build with AL2 Image

When building via Docker with an AL2 image, the warning is printed and the build continues normally. No error is thrown — this is a non-blocking warning.

### AL2023 (Native or Docker)

No warning, no error. Build proceeds as normal.

## Correctness Properties

### Property 1: Warning Uniqueness
When multiple products are built in a single invocation, the deprecation warning is printed exactly once before the first build starts, not repeated per product.
**Validates: Requirements 2.9**

### Property 2: AL2 vs AL2023 Detection
The string matching uses `hasPrefix("Amazon Linux release 2")` with a negative check for `hasPrefix("Amazon Linux release 2023")` to correctly distinguish AL2 from AL2023.
**Validates: Requirements 3.1**

### Property 3: Docker Image String Matching
Uses `contains("amazonlinux2")` with negative `contains("amazonlinux2023")` to handle various image name formats (e.g., `swift:6.3-amazonlinux2`, `swift:amazonlinux2`).
**Validates: Requirements 2.1**

### Property 4: Backward Compatibility
The `--base-docker-image` flag still allows developers to specify any image, bypassing the default entirely.
**Validates: Requirements 1.3**
Loading
Loading