-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ensure online status and route changes are propagated #1564
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2e5ba99
add vscode to gitignore
kradalby b1d642c
remove unused image builder
kradalby 81889da
Rework state and online system
kradalby 1b895c0
flake hash update
kradalby 83560e4
update changelog
kradalby 495ff53
update nodes if services are changed
kradalby 979569c
fix save node when routes/services
kradalby 817fd3d
more debugging
kradalby 70c1017
only check online status if offline
kradalby af3c097
fix test
kradalby 3ca953a
fix logout notification, fix potential tailscaled panic when removing
kradalby 8b3721b
Fix and make todo for expired nodes
kradalby 9dbac20
fix derp issue
kradalby 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
67 changes: 67 additions & 0 deletions
67
.github/workflows/test-integration-v2-TestHASubnetRouterFailover.yaml
This file contains 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,67 @@ | ||
# DO NOT EDIT, generated with cmd/gh-action-integration-generator/main.go | ||
# To regenerate, run "go generate" in cmd/gh-action-integration-generator/ | ||
|
||
name: Integration Test v2 - TestHASubnetRouterFailover | ||
|
||
on: [pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
TestHASubnetRouterFailover: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
- uses: satackey/action-docker-layer-caching@main | ||
continue-on-error: true | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v34 | ||
with: | ||
files: | | ||
*.nix | ||
go.* | ||
**/*.go | ||
integration_test/ | ||
config-example.yaml | ||
- name: Run TestHASubnetRouterFailover | ||
uses: Wandalen/wretry.action@master | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
attempt_limit: 5 | ||
command: | | ||
nix develop --command -- docker run \ | ||
--tty --rm \ | ||
--volume ~/.cache/hs-integration-go:/go \ | ||
--name headscale-test-suite \ | ||
--volume $PWD:$PWD -w $PWD/integration \ | ||
--volume /var/run/docker.sock:/var/run/docker.sock \ | ||
--volume $PWD/control_logs:/tmp/control \ | ||
golang:1 \ | ||
go run gotest.tools/gotestsum@latest -- ./... \ | ||
-failfast \ | ||
-timeout 120m \ | ||
-parallel 1 \ | ||
-run "^TestHASubnetRouterFailover$" | ||
- uses: actions/upload-artifact@v3 | ||
if: always() && steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
name: logs | ||
path: "control_logs/*.log" | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() && steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
name: pprof | ||
path: "control_logs/*.pprof.tar" |
67 changes: 67 additions & 0 deletions
67
.github/workflows/test-integration-v2-TestNodeOnlineLastSeenStatus.yaml
This file contains 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,67 @@ | ||
# DO NOT EDIT, generated with cmd/gh-action-integration-generator/main.go | ||
# To regenerate, run "go generate" in cmd/gh-action-integration-generator/ | ||
|
||
name: Integration Test v2 - TestNodeOnlineLastSeenStatus | ||
|
||
on: [pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
TestNodeOnlineLastSeenStatus: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
- uses: satackey/action-docker-layer-caching@main | ||
continue-on-error: true | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v34 | ||
with: | ||
files: | | ||
*.nix | ||
go.* | ||
**/*.go | ||
integration_test/ | ||
config-example.yaml | ||
- name: Run TestNodeOnlineLastSeenStatus | ||
uses: Wandalen/wretry.action@master | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
attempt_limit: 5 | ||
command: | | ||
nix develop --command -- docker run \ | ||
--tty --rm \ | ||
--volume ~/.cache/hs-integration-go:/go \ | ||
--name headscale-test-suite \ | ||
--volume $PWD:$PWD -w $PWD/integration \ | ||
--volume /var/run/docker.sock:/var/run/docker.sock \ | ||
--volume $PWD/control_logs:/tmp/control \ | ||
golang:1 \ | ||
go run gotest.tools/gotestsum@latest -- ./... \ | ||
-failfast \ | ||
-timeout 120m \ | ||
-parallel 1 \ | ||
-run "^TestNodeOnlineLastSeenStatus$" | ||
- uses: actions/upload-artifact@v3 | ||
if: always() && steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
name: logs | ||
path: "control_logs/*.log" | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() && steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
name: pprof | ||
path: "control_logs/*.pprof.tar" |
This file contains 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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
ignored/ | ||
tailscale/ | ||
.vscode/ | ||
|
||
# Binaries for programs and plugins | ||
*.exe | ||
|
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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 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 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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You now use vscode??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes