Commit Graph

1251 Commits

Author SHA1 Message Date
Jamil
4091457788 ci: publish android 1.5.2 (#9735)
**NOTE**: This is for last week's release of 1.5.2. We will still need
to do a release to cut 1.5.3.
2025-07-01 14:11:48 +00:00
Jamil
a4cf3ead0f ci: publish gateway 1.4.12 (#9736) 2025-07-01 14:04:21 +00:00
Jamil
ac34635db8 fix(ci): fix update-release-draft for gui-client (#9734)
Needs contents-write perms to create draft releases.

Related: https://github.com/firezone/firezone/actions/runs/15990137167
2025-07-01 07:16:19 +00:00
Jamil
0b09d9f2f5 refactor(portal): don't rely on flows.expires_at (#9692)
The `expires_at` column on the `flows` table was never used outside of
the context in which the flow was created in the Client Channel. This
ephemeral state, which is created in the `Domain.Flows.authorize_flow/4`
function, is never read from the DB in any meaningful capacity, so it
can be safely removed.

The `expire_flows_for` family of functions now simply reads the needed
fields from the flows table in order to broadcast `{:expire_flow,
flow_id, client_id, resource_id}` directly to the subscribed entities.

This PR is step 1 in removing the reliance on `Flows` to manage
ephemeral access state. In a subsequent PR we will actually change the
structure of what state is kept in the channel PIDs such that reliance
on this Flows table will no longer be necessary.

Additionally, in a few places, we were referencing a Flows.Show view
that was never available in production, so this dead code has been
removed.

Lastly, the `flows` table subscription and associated hook processing
has been completely removed as it is no longer needed. We've implemented
in #9667 logic to remove publications from removed table subscriptions,
so we can expect to get a couple ingest warnings when we deploy this as
the `Hooks.Flows` processor no longer exists, and the WAL data may have
lingering flows records in the queue. These can be safely ignored.
2025-06-27 18:29:12 +00:00
Jamil
2b154d88bf fix(ci): use relaxed naming for ignored checks (#9666)
These jobs have the `ci / ` prefix when run on main, but no prefix when
run on PRs. To fix the ignored checks, we need to use `contains`.
2025-06-24 18:56:34 -07:00
Jamil
75740e4377 fix(ci): check for correct ignored job names (#9665)
These need the `ci / ` prefix.
2025-06-24 16:15:00 -07:00
Jamil
110d504516 fix(ci): maintain whitespace in sources list (#9663)
Another issue was introduced in #9590 - we need to maintain the
whitespace in the sources list when generating them.

Fixes
https://github.com/firezone/firezone/actions/runs/15859521283/job/44713395755
2025-06-24 21:03:11 +00:00
Jamil
85e67f1925 fix(ci): preserve sources whitespace (#9661)
Fixes a whitespace issue introduced in #9590
2025-06-24 19:13:54 +00:00
Thomas Eizinger
40f0609d90 ci: lint GitHub workflows with actionlint (#9590)
[`actionlint`](https://github.com/rhysd/actionlint) is a static analysis
tool for GitHub workflows and actions. It detects various issues ahead
of time and runs shellcheck on all `run` blocks. It is worth noting that
this does **not** lint the contents of composite actions so we still
need to be vigilant when working with those.
2025-06-24 08:05:10 +00:00
Jamil
56b70215a7 fix(ci): dont require upload-bencher (#9650)
Bencher is not the most reliable service, so this PR prevent us from
failing CI runs on the `uploader-bencher` job.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-24 08:03:06 +00:00
Thomas Eizinger
1bd3d2a382 chore(gateway): remove NAT64/46 module (#9626)
This has been disabled for several releases now and is not causing any
problems in production. We can therefore safely remove it.

It is about time we do this because our tests are actually still testing
the variant without the feature flag and therefore deviate from what we
do in production. We therefore have to convert the tests as well. Doing
so uncovered a minor problem in our ICMP error parsing code: We
attempted to parse the payload of an ICMP error as a fully-valid layer 4
header (e.g. TCP header or UDP header). However, per the RFC a node only
needs to embed the first 8 bytes of the original packet in an ICMPv4
error. That is not enough to parse a valid TCP header as those are at
least 20 bytes.

I don't expect this to be a huge problem in production right now though.
We only use this code to parse ICMP errors arriving on the Gateway and I
_think_ most devices actually include more than 8 bytes. This only
surfaced because we are very strict with only embedding exactly 8 bytes
when we generate an ICMP error.

Additionally, we change our ICMP errors to be sent from the resource IP
rather than the Gateway's TUN device. Given that we perform NAT on these
IPs anyway, I think this can still be argued to be RFC conform. The
_proxy_ IP which we are trying to contact can be reached but it cannot
be routed further. Therefore the destination is unreachable, yet the
source of this error is the proxy IP itself. I think this is actually
more correct than sending the packets from the Gateway's TUN device
because the TUN device itself is not a routing hop per-se: its IP won't
ever show up in the routing path.
2025-06-24 06:48:30 +00:00
Thomas Eizinger
9616296ebc ci: run all jobs if docker-compose.yml changes (#9639) 2025-06-24 06:16:25 +00:00
Jamil
a68d46bd24 chore(ci): remove write perms on winget workflow (#9598)
This wasn't the issue - the issue was that @firezone-bot needed access
to the firezone/winget-pkgs repo.

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2025-06-23 22:26:31 +00:00
Jamil
ec5c433f5b feat(ci): use larger runners for all jobs (#9646)
Append `-xlarge` to the previous runner labels to match new larger
runners.
2025-06-23 14:23:22 -07:00
Thomas Eizinger
259b8e2a32 ci: fix Tauri workflow permissions (#9628) 2025-06-23 15:52:35 +10:00
Thomas Eizinger
692b61d159 ci: move GUI smoke tests to tauri workflow (#9627) 2025-06-23 08:37:52 +10:00
Jamil
867f9dfad3 fix(ci): set github token for publish workflow (#9620)
This env var needs to be explicitly set.

Related: #9618
2025-06-21 20:37:38 -07:00
Jamil
e970e3f15a fix(ci): split newline correctly in github workflow file (#9619)
GitHub doesn't like this syntax.

Related: #9618
2025-06-21 20:26:02 -07:00
Jamil
2e065d6719 fix(ci): use publish inputs directly (#9618)
We can't use job outputs in the job specification for a subsequent
workflow.

Related: #9617
2025-06-21 20:22:41 -07:00
Jamil
cb4441eafa fix(ci): publish sha of images from release (#9617)
To publish retroactively artifacts for the gateway and headless client,
we need to pull the sha of the corresponding release tag.

Related: #9615
2025-06-21 20:18:01 -07:00
Jamil
3baefd0fcf fix(ci): remove unused id from step in publish (#9616)
This isn't a valid name and can be removed anyway.

Related: #9615
2025-06-21 19:47:16 -07:00
Jamil
2598df3030 feat(ci): allow publish workflow to be run manually (#9615)
This allows us to retroactively run publish workflows that may have
failed due to workflow bugs.

Needed to publish the 1.4.11 gateway image.
2025-06-21 19:44:34 -07:00
Jamil
6f2cdbdccb fix(ci): use release-tag override for winget-releaser (#9596) 2025-06-20 06:29:02 -07:00
Jamil
58e6c3d4c3 feat(ci): allow winget publish to be run manually (#9588)
- Updates winget publish workflow to be run manually to re-run it after
fixes
- Adds write permissions to the workflow
2025-06-20 07:43:33 +00:00
Jamil
081b075f2c chore: bump gui, apple, gateway (#9586)
The new publish automation still [has some
kinks](https://github.com/firezone/firezone/actions/runs/15764891111) so
publishing this manually.
2025-06-19 12:29:46 -07:00
Jamil
f50fa95778 fix(ci): lock xcode major (#9585)
Apple won't allow apps built with Xcode betas to be reviewed.

<img width="1146" alt="Screenshot 2025-06-19 at 9 04 17 AM"
src="https://github.com/user-attachments/assets/11470f04-603b-4c5c-aad2-fba0e4eb391a"
/>
2025-06-19 09:21:58 -07:00
Thomas Eizinger
bc854e1f9a ci: automatically create PR after publishing release (#9556)
To make releases even more smoother, this PR creates a bit of automation
that automatically bumps the versions in the `scripts/bump-versions.sh`
script and opens a PR for it.
2025-06-18 06:17:18 +00:00
Thomas Eizinger
92f8c8820f chore(gui-client): configure eslint (#9550)
Resolves: #9546
2025-06-17 20:46:39 +00:00
Jamil
9701cfca0f chore: publish gui 1.5.3 (#9547) 2025-06-17 10:04:04 +00:00
Thomas Eizinger
01ad87b1c0 chore(apple): format swift code with formatter (#9535)
When working on the Swift codebase, I noticed that running the formatter
produced a massive diff. This PR re-formats the Swift code with `swift
format . --recursive --in-place` and adds a CI check to enforce it going
forward.

Resolves: #9534

---------

Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2025-06-15 20:28:18 +00:00
Jamil
5e3c240501 chore: publish gui 1.5.2 (#9516) 2025-06-12 17:16:04 +00:00
Jamil
5e146054f5 fix(ci): use fixed bash conditional (#9509)
This is preventing the relevant jobs from running, causing staging
deploys to fail.
2025-06-11 07:56:56 -07:00
Jamil
015d427ad2 fix(ci): don't require required-check to finish from itself (#9507)
When this workflow is called from `cd.yml`, its name is `ci /
required-check`, causing this match to fail and forever wait.
2025-06-11 03:48:48 +00:00
Jamil
82ac72b9c0 chore(ci): show not completed required-checks jobs (#9503)
Seems we are still getting a hang on this workflow. Adding more output
to see which job is hanging.
2025-06-10 17:23:13 -07:00
Jamil
c76d884fde fix(ci): require all jobs on main branch runs (#9502)
- Adds a timeout to the required_checks workflow
- Expects all jobs to run, exiting the script early for main branch runs
- Adds `set -xe` so we catch script errors going forward

This CI run is running for over an hour, not sure which job it's waiting
on:
https://github.com/firezone/firezone/actions/runs/15565464294
2025-06-10 18:56:30 +00:00
Jamil
be446a3d75 fix(ci): fetch depth 20 for merge group CI runs (#9500)
When a CI job is running as part of a merge group, it's possible the
base ref is a few commits away if the merge queue has items in it. So we
update the fetch depth to 20.
2025-06-10 16:30:59 +00:00
Thomas Eizinger
1747f8fdd5 ci: run Tauri builds if rust/gui-client changes (#9481)
We don't need to rebuild the Tauri clients every time we change Rust
code but we almost certainly want to rebuild them if we change any code
in the client itself so we can smoke test them.

---------

Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-09 14:40:07 +00:00
Thomas Eizinger
05c94278ea ci: ensure all jobs are successful (#9486)
When evaluating the status of all required checks, we currently only look at the very first one. This is error prone and may result in `required-check` to be marked as successful too early. Instead of iterating through the list of jobs we have scheduled, we now instead look at all jobs that are running as part of the CI run. The idea here is:

- Any job that got started need to complete (one way or another)
- If _any_ job fails, we fail the required check
- If all jobs complete without a single failure, we pass the check

This plays well with "skipped" jobs which we sometimes have as part of CI.
2025-06-09 13:49:24 +02:00
Thomas Eizinger
0c7f06db03 ci: only run workflows for changed files (#9467)
This PR optimises our CI pipeline to only run workflows when certain
files change. To achieve this, we introduce a top-level `planner` job
that all other jobs primarily depend on. The `planner` job then computes
which other jobs to run and creates an output with a list of those.

Running only certain jobs is only the first half of the problem. The
second half is creating a dedicated job that we can mark as "required"
in GitHub. Without such a "required" check, the merge queue wouldn't
know, when a PR is good to be merged.

Jobs cannot have dynamic dependencies on other jobs. We therefore need
to emulate this by creating a polling loop that hits the GitHub API
every 10s and evaluates, whether all "required" jobs, i.e. the ones we
planned to run, have finished successfully.

---------

Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2025-06-08 11:40:42 +00:00
Thomas Eizinger
ac5fdde10b ci: remove duplicate login actions (#9456)
Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2025-06-07 14:28:24 +00:00
Thomas Eizinger
7bbf9ebcf6 ci: fix winget releaser workflow (#9446)
`if` attributes on the job level cannot contain `matrix` variables.
2025-06-06 11:06:00 +00:00
dependabot[bot]
2af7132db1 build(deps): bump taiki-e/install-action from 2.52.4 to 2.52.6 (#9424)
Bumps
[taiki-e/install-action](https://github.com/taiki-e/install-action) from
2.52.4 to 2.52.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/releases">taiki-e/install-action's
releases</a>.</em></p>
<blockquote>
<h2>2.52.6</h2>
<ul>
<li>
<p>Update <code>cargo-udeps@latest</code> to 0.1.56.</p>
</li>
<li>
<p>Update <code>git-cliff@latest</code> to 2.9.1.</p>
</li>
</ul>
<h2>2.52.5</h2>
<ul>
<li>
<p>Update <code>typos@latest</code> to 1.33.1.</p>
</li>
<li>
<p>Update <code>git-cliff@latest</code> to 2.9.0.</p>
</li>
<li>
<p>Update <code>cargo-shear@latest</code> to 1.3.1.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md">taiki-e/install-action's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<p>This project adheres to <a href="https://semver.org">Semantic
Versioning</a>.</p>
<!-- raw HTML omitted -->
<h2>[Unreleased]</h2>
<h2>[2.52.6] - 2025-06-04</h2>
<ul>
<li>
<p>Update <code>cargo-udeps@latest</code> to 0.1.56.</p>
</li>
<li>
<p>Update <code>git-cliff@latest</code> to 2.9.1.</p>
</li>
</ul>
<h2>[2.52.5] - 2025-06-03</h2>
<ul>
<li>
<p>Update <code>typos@latest</code> to 1.33.1.</p>
</li>
<li>
<p>Update <code>git-cliff@latest</code> to 2.9.0.</p>
</li>
<li>
<p>Update <code>cargo-shear@latest</code> to 1.3.1.</p>
</li>
</ul>
<h2>[2.52.4] - 2025-05-31</h2>
<ul>
<li>
<p>Update <code>cargo-binstall@latest</code> to 1.12.6.</p>
</li>
<li>
<p>Update <code>wash@latest</code> to 0.42.0.</p>
</li>
</ul>
<h2>[2.52.3] - 2025-05-30</h2>
<ul>
<li>
<p>Update <code>cargo-nextest@latest</code> to 0.9.97.</p>
</li>
<li>
<p>Update <code>trivy@latest</code> to 0.63.0.</p>
</li>
<li>
<p>Update <code>protoc@latest</code> to 3.31.1.</p>
</li>
</ul>
<h2>[2.52.2] - 2025-05-27</h2>
<ul>
<li>Update <code>mdbook@latest</code> to 0.4.51.</li>
</ul>
<h2>[2.52.1] - 2025-05-25</h2>
<ul>
<li>
<p>Update <code>taplo@latest</code> to 0.10.0.</p>
</li>
<li>
<p>Update <code>mdbook@latest</code> to 0.4.50.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1cefd1553b"><code>1cefd15</code></a>
Release 2.52.6</li>
<li><a
href="6741c847f5"><code>6741c84</code></a>
Update <code>cargo-udeps@latest</code> to 0.1.56</li>
<li><a
href="821228b8ca"><code>821228b</code></a>
Update <code>git-cliff@latest</code> to 2.9.1</li>
<li><a
href="7bf3bbf310"><code>7bf3bbf</code></a>
Release 2.52.5</li>
<li><a
href="fcb7f36651"><code>fcb7f36</code></a>
Update <code>typos@latest</code> to 1.33.1</li>
<li><a
href="84dd63d16a"><code>84dd63d</code></a>
Update <code>git-cliff@latest</code> to 2.9.0</li>
<li><a
href="4871b28862"><code>4871b28</code></a>
Update <code>cargo-shear@latest</code> to 1.3.1</li>
<li>See full diff in <a
href="735e593394...1cefd1553b">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=taiki-e/install-action&package-manager=github_actions&previous-version=2.52.4&new-version=2.52.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-06 07:32:51 +00:00
Jamil
bbfde63ae9 fix(ci): call infra repo not firezone (#9441)
In #9439 I incorrectly used this repo as the target. Updating to call
the correct repo.
2025-06-06 00:20:40 +00:00
Jamil
ab01a1ef91 chore: bump gui to 1.5.1 (#9440) 2025-06-05 21:30:08 +00:00
Jamil
8d05e8b276 chore: trigger staging deploy on checks passed (#9439)
Now that our infra-as-code is moved into another repo, we need a
mechanism to trigger the staging deploy. We can use
`repository_dispatch` for that, which allows us to trigger the staging
workflow by sending an HTTP API request that matches the configuration
of the `repository_dispatch` workflow trigger on that repo.

Related: https://github.com/firezone/infra/pull/36
2025-06-05 21:09:53 +00:00
Jamil
1e94afdb98 chore: move terraform/ to private repo (#9421)
Since we'll be adding ops playbooks and other things here, it makes
sense to separate infra from product source.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-05 19:24:06 +00:00
Jamil
51e13d453f chore: publish GUI client 1.5.0 (#9413)
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2025-06-05 09:06:28 +00:00
Jamil
b60d77cef4 chore: publish gateway 1.4.10 (#9412) 2025-06-05 08:55:13 +00:00
Jamil
6683178c8b chore: publish headless client 1.5.0 (#9414) 2025-06-05 08:07:18 +00:00
Jamil
7498d992cb chore: publish android 1.5.1 (#9405) 2025-06-05 03:24:32 +00:00