Skip to content

Update main#5

Merged
katiewasnothere merged 46 commits intomainfrom
update_main
Jun 25, 2025
Merged

Update main#5
katiewasnothere merged 46 commits intomainfrom
update_main

Conversation

@katiewasnothere
Copy link
Owner

No description provided.

katiewasnothere and others added 30 commits June 11, 2025 13:12
)

Closes apple#126 

This PR additionally removes the ability to set
`disable-progress-updates` for `container create` calls while we
investigate why output get jumbled there.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
Remove trailing whitespace from GitHub workflows
I would love feedback on how people feel about these issue templates, if
there should be more or less templates, or if there are any fields that
people think we should add.

You can see an example of how to use these by testing opening an issue
on my fork [here](https://github.com/katiewasnothere/container/issues).

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
Added .idea to .gitignore file
This PR updates the protos to match the recent changes in
apple/container-builder-shim#15.

This PR additionally adds the builder shim version as a variable in
Package.swift. This allows us to be consistent with the builder tag used
for the builder shim image and when building protobuf files.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
When we were setting up the repos, we needed these environment variables
for the GitHub Actions CI to be able to run the tests. Now that the
images are public, these can be removed.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
this PR defines a variable, `decoder`, which represents the
`JSONDecoder` class, rather than doing it in the for loop in `load()`

Signed-off-by: Elijah Wright <git@elijahs.space>
This change consolidates the UserDefaults service name
`com.apple.container.defaults` to a single constant under the extension
file and also renamed the extension file.

Signed-off-by: Yibo Zhuang <yibzhuang@gmail.com>
This PR resolves the problem of dropped progress updates and ensures the
accuracy of the information provided in the progress bar. Additionally,
it adds the displaying of the finished state to the progress bar.
Requires merging and tagging
apple/containerization#91.
Fixes apple#121

Gets port from the given registry server URL and use it in a
RegistryClient.

Signed-off-by: Alexey Makhov <makhov.alex@gmail.com>
Please see commits for the list of changes.
This adds a default year to use when a file does not yet have git
attributes (aka for a newly created file).

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
…apple#187)

## 🔧 Summary
This PR improves the release.yml GitHub Actions workflow by addressing
several critical issues to ensure consistent and reliable behavior
during tag-based releases.

## ✅ Changes Included
### 1. Fixed tag trigger regex
- Escaped dots in the tag regex ([0-9]+\\.[0-9]+\\.[0-9]+) to ensure
only semantic version tags like 1.2.3 trigger the workflow.
#####  Explanation
- Old **Regex** is incorrect because . matches **any character**, so it
matched:

`1-2-3`, `1_2_3`, even `1a2b3`, which is invalid for versioning.

 - Fixed **Regex** is strict — matches only 1.2.3.
 #### Find attached tested SCREEN SHOT BELOW .
**Bad Match with Old Regex:**

![proofwithBadMatch](https://github.com/user-attachments/assets/6dbec50d-6ffb-4338-a258-7b3629b08e24)


**Proper Match with Fixed Regex:**

![withfixedbadstring](https://github.com/user-attachments/assets/1c9b6315-074b-4db4-a911-6493a76b4b64)
---
### 💬 Note: If you're planning to adopt alternate version tag formats in
the future — such as:

 - v1.0.2 (semantic with prefix)

- release-1.0.2 or rel-1.0.2

- 1.0.2-beta, 1.0.2-rc.1 (prereleases with suffixes)

 - x1.0.2x (custom wrapping formats)

**…feel free to reach out. I'm happy to help extend the workflow to
support those formats reliably and safely.**
---
### 2. Added strict release job guard
- Prevented **accidental release runs** on non-tag events using if:
startsWith(github.ref, 'refs/tags/').

### 3. Explicit artifact validation
- **Introduced a shell check** using ls and test to ensure .zip and .pkg
files exist before attempting release. This gives early, clear failure
instead of a **vague error** from `action-gh-release`.

### 4. Clarified GitHub token usage
- Switched from ${{ secrets.GITHUB_TOKEN }} to ${{ github.token }} for
better readability and consistency with GitHub Actions best practices.

@katiewasnothere @wlan0
Hi there,

some small typos I fixed using
[`typos`](https://github.com/crate-ci/typos).

Cheers,
Patrick
Just as Containerization does, we should advertise the status of the
project and source/tool stability guarantees for version numbers.
Closes apple#175

Also does some housekeeping - update availability checks and fix a typo

Signed-off-by: Aditya Ramani <a_ramani@apple.com>
…apple#178)

## 🔧 Improvements Summary

This PR introduces three improvements focused on safety,
maintainability, and readability of the GitHub Actions workflow.

---

### 1. Define Global Environment Variable

**Before:**

Environment variable `CURRENT_SDK` was defined repeatedly in multiple
steps.

**After:**

 Declared in gloabally one time. 

#### Why This Matters:

-  Eliminates duplication across steps.
-  Makes it easier to update or remove the variable in the future.
-  Still allows per-step override when necessary.

### 2. Fix Unsafe Shell Conditional on inputs.release
- Using **[[ ... ]]** **instea**d of **[ ... ]** for conditionals.
- Adding **double quotes** around inputs and refs to **avoid**
evaluation issues.
**PREVIOUSLY FIXED** Containerization project.
[https://github.com/apple/containerization/pull/68](url)
  
 ### 3.  Removed EXCLUSION AND TODO comment.
  #### Affected Steps:

 `check Formatting`

`make proto`

### Improvements:

Now that the repositories are public, we no longer need to exclude files
like Package.swift and Package.resolved from formatting and proto
checks.

- Removed EXCLUDES logic
- Removed related TODO comments
- Updated git diff checks to include all files

@wlan0 @katiewasnothere
These should be up to users to maintain, as trying to add everyones
editor of choice config directories here isn't ideal.

Matches apple/containerization#106

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
This PR updates the names of Xcode and macOS to the official names used
in https://developer.apple.com/download/applications/.
This PR updates to Swift 6.2 and resolves a build error after updating
to Swift 6.2-snapshot in
apple/containerization#94.
This PR adds a warning that the performance may be degraded when running
a debug build.

Debug build:
```
% bin/container run -it --rm alpine:latest date
Warning! Running debug build. Performance may be degraded.
Fri Jun 13 18:10:35 PDT 2025
```

Release build:
```
% bin/container run -it --rm alpine:latest date
Fri Jun 13 18:10:35 PDT 2025
```
We actually use the output (both stderr and stdout) of the command.
This PR corrects misspellings identified by the [check-spelling
action](https://github.com/marketplace/actions/check-spelling)

The misspellings have been reported at
https://github.com/jsoref/container/actions/runs/15662939575/attempts/1
The action reports that the changes in this PR would make it happy:
https://github.com/jsoref/container/actions/runs/15662939742/attempts/1#summary-44123289718

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: crosbymichael <michael_crosby@apple.com>
dkovba and others added 16 commits June 16, 2025 12:35
…pple#200)

Right now swift testing does not have finer grain test parallelization
controls. As a result our easy options are either to have ALL tests in
ALL test suites run sequentially or have tests within a given test suite
run sequentially while other test suites are run at the same time.

This has been problematic for our CI since we opted for the second
option above, where, for examples, the tests in the builder test suite
run sequentially, but the builder test suite runs at the same time as
the container run test suite. When this happens, a lot of different
tests try to pull the necessary images for testing at the same time,
causing some tests to timeout.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
Implements a way for the CLI to wait until the IO streams from the
SandboxService have been drained before closing them.

Follows the same pattern as
apple/containerization#110

This change also performs some cleanup in the
`SandboxService.startProcess` method - splitting the code paths to
handle the init process and an exec'd process into two different private
methods to make easier reading

---------

Signed-off-by: Aditya Ramani <a_ramani@apple.com>
The bin directory for placing built binaries to should be lazily
evaluated, as we change BUILD_CONFIGURATION during `make release`.
This PR resolves a race condition when removing a container immediately
after stopping it, caused by the `stop` command returning before the
container fully transitions to the stopped state (apple#130).

**Changes:**
- Enhanced `TestCLIRmRace.swift` with robust test logic and helper
methods (`containerExists`, `safeRemove`).
- Improved error handling to distinguish race conditions from successful
removals.
- Added exponential backoff retry logic for cleanup operations.
- Updated `CLITest.swift` with missing `doRemove` method.
- Fixed `BuilderStart.swift` to handle `.stopping` case.
- Improved error messages with container ID for better debugging.

**Testing:**
- ✅ All tests pass (`make test`, `make integration`).
- ✅ Verified on macOS 26.
- ✅ Race condition test validates success and failure scenarios.
- ✅ Code formatted (`make fmt`).

Hopefully, this will pass the integration tests on GitHub.

Signed-off-by: ramsyana <47033578+ramsyana@users.noreply.github.com>
…le#179)

Closes apple#80

Adds the following help message if you try to run `container` against a
host that hasn't started the container system:

```
❯ /usr/local/bin/container list
Error: internalError: "failed to list containers" (cause: "interrupted: "Connection invalid: ensure container system has been started with `container system start`"")

❯ /usr/local/bin/container run -it --rm docker.io/alpine
Error: interrupted: "Connection invalid: ensure container system has been started with `container system start`"
```
Signed-off-by: renee chang <rchang25@apple.com>
constrains build to run on apple/container

fixes apple#209
This PR removes `@unchecked Sendable` from the tests.
This PR allows using `make docs` without manually removing the existing
`_site` folder.
Depends on apple/container-builder-shim#24 

Related to apple#252

---------

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
…le#257)

- Addresses apple#166
- Memory utilization explodes since there is no mechanism for
backpressure
- Using a synchronous buffered reader seem to provide similar
performance without the memory explosion issue
- 4MB buffer seems to provide the best results

| Metric | 1MB Buffer | 4MB Buffer | Unbounded Zero-Copy |

|--------------------------|------------|------------|---------------------|
| Build Time | 149.33s | 138.57s | 139.79s |
| Max RAM Used | 2.16 GB | 3.02 GB | 3.52 GB |
| Peak Memory Footprint | 8.30 GB | 8.17 GB | 10.21 GB |
| Page Reclaims | 1,085,559 | 1,039,677 | 1,619,943 |
| Page Faults | 115 | 148 | 143 |
| CPU Usage (User+Sys) | 53.71s | 53.12s | 60.44s |
@katiewasnothere katiewasnothere merged commit 1a91987 into main Jun 25, 2025
2 checks passed
@katiewasnothere katiewasnothere deleted the update_main branch June 25, 2025 22:06
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.