Skip to content

Conversation

@github-actions
Copy link

@github-actions github-actions bot commented Feb 4, 2024

Automated changes by the update-flake-lock GitHub Action.

Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/b1d9ab7' (2024-03-11)
  → 'github:numtide/flake-utils/11707dc' (2024-11-13)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/5629520' (2024-08-31)
  → 'github:NixOS/nixpkgs/3146c6a' (2026-01-10)

Running GitHub Actions on this PR

GitHub Actions will not run workflows on pull requests which are opened by a GitHub Action.

To run GitHub Actions workflows on this PR, close and re-open this pull request.

@github-actions github-actions bot requested a review from kradalby as a code owner February 4, 2024 01:14
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 2c0ce4c to e28732e Compare February 11, 2024 01:14
@github-actions github-actions bot force-pushed the update_flake_lock_action branch 2 times, most recently from 0dfd0e1 to cb167b5 Compare February 25, 2024 01:13
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from cb167b5 to d35b547 Compare March 3, 2024 01:12
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from d35b547 to 4307e8e Compare March 10, 2024 01:13
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 4307e8e to be01719 Compare March 17, 2024 01:13
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from be01719 to 1948481 Compare March 24, 2024 01:16
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 1948481 to 2386524 Compare March 31, 2024 01:16
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 2386524 to 0c5117f Compare April 7, 2024 01:16
@github-actions github-actions bot force-pushed the update_flake_lock_action branch 2 times, most recently from 1be3a33 to 16dd697 Compare April 21, 2024 01:17
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 16dd697 to 395ade4 Compare April 28, 2024 01:17
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 395ade4 to 1256178 Compare May 5, 2024 01:17
@github-actions github-actions bot force-pushed the update_flake_lock_action branch 2 times, most recently from a22a3f4 to d76e958 Compare May 19, 2024 01:20
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from d76e958 to b0b7c02 Compare May 26, 2024 01:21
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from b0b7c02 to b109d72 Compare June 2, 2024 01:21
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from b109d72 to 189a973 Compare June 9, 2024 01:24
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 189a973 to 95c387a Compare June 16, 2024 01:24
@kradalby kradalby force-pushed the main branch 2 times, most recently from 5e49981 to 58e3320 Compare June 21, 2024 12:08
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 95c387a to 4c4df88 Compare June 23, 2024 01:23
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 4c4df88 to 860e024 Compare June 30, 2024 01:25
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 860e024 to d9e13e3 Compare July 7, 2024 01:25
@github-actions github-actions bot force-pushed the update_flake_lock_action branch 2 times, most recently from 19312ce to 63d144b Compare July 21, 2024 01:26
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 63d144b to 6342f5e Compare July 28, 2024 01:27
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 6342f5e to ec66e0f Compare August 4, 2024 01:33
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 0fd6b22 to 1d17ee6 Compare July 20, 2025 02:21
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 1d17ee6 to 0f3f7e7 Compare July 27, 2025 02:22
@github-actions github-actions bot force-pushed the update_flake_lock_action branch 2 times, most recently from 1e45dd5 to 7fbbd42 Compare August 10, 2025 02:20
@github-actions github-actions bot force-pushed the update_flake_lock_action branch 2 times, most recently from 9ba7194 to af5cb79 Compare August 24, 2025 02:02
@github-actions github-actions bot force-pushed the update_flake_lock_action branch 2 times, most recently from 7f7b87a to 3c61d0b Compare September 7, 2025 01:51
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 3c61d0b to 303906d Compare September 14, 2025 01:51
kradalby added a commit that referenced this pull request Sep 17, 2025
# This is the 1st commit message:

integration/auth: increase NetInfo validation timeout to 3 minutes

Increase requireAllClientsNetInfoAndDERP timeout from 1 minute to 3 minutes
to handle slower NetInfo propagation in CI environments. Add explicit
WaitForTailscaleSync before NetInfo validation after reconnection to ensure
proper state propagation. Increase polling interval to 5 seconds to reduce
system load during validation.

# This is the commit message #2:

integration/auth: add missing validation to OIDC relogin test

Add requireAllClientsOnline and requireAllClientsNetInfoAndDERP validation
calls to TestOIDCReloginSameNodeNewUser to match the pattern used in
TestAuthKeyLogoutAndReloginSameUser. Validate connection state after initial
login, after user2 login, and after logging back into user1.

# This is the commit message #3:

integration/auth: add missing validation to web flow relogin test

Add requireAllClientsOnline and requireAllClientsNetInfoAndDERP validation
calls to TestAuthWebFlowLogoutAndRelogin to ensure proper state validation
during logout/relogin cycles. Validate initial connection, logout state,
and relogin state.

# This is the commit message #4:

integration/auth: add missing validation to auth key relogin tests

Add requireAllClientsOnline and requireAllClientsNetInfoAndDERP validation
calls to TestAuthKeyLogoutAndReloginNewUser and
TestAuthKeyLogoutAndReloginSameUserExpiredKey to ensure proper state
validation during logout/relogin cycles.

# This is the commit message #5:

integration/helpers: extract expectedNodes collection helper

Create collectExpectedNodeIDs helper function to reduce code duplication
across relogin tests when collecting node IDs from client status.
Replace inline node ID collection in auth key and web flow tests.

# This is the commit message #6:

integration/auth: fix EventuallyWithT patterns in relogin tests

Wrap all external calls (headscale.ListNodes, ts.Status) in EventuallyWithT
with appropriate timeouts to handle eventual consistency. Increase timeouts
for node count validation to handle cleanup timing and add descriptive
messages for debugging. Use longer timeouts for node cleanup scenarios.

# This is the commit message #7:

integration/auth: standardize timeouts across relogin tests

Use consistent timeout values: 120s for initial connection and relogin
validation, 120s for logout validation, 180s (3min) for NetInfo/DERP
validation to handle CI environment timing variations.

# This is the commit message #8:

integration/helpers: consolidate collectExpectedNodeIDs helper

Move collectExpectedNodeIDs helper function to general_test.go to avoid
redeclaration errors and make it available to all integration tests.
Remove duplicate implementations from individual test files.

# This is the commit message #9:

integration/auth: improve node cleanup and add helper functions

Fix node cleanup timing in OIDC relogin test by adding explicit node count
validation before user switches to prevent "3 nodes instead of 2" failures.
Add validateInitialConnection, validateLogoutComplete, and validateReloginComplete
helper functions to reduce code duplication and improve maintainability.

# This is the commit message #10:

integration/auth: add comprehensive documentation to relogin tests

Add detailed test documentation explaining the relogin scenarios and use
helper functions consistently across OIDC test to improve code clarity
and maintainability.

# This is the commit message #11:

integration: consolidate all helper functions into helpers.go

Create comprehensive helpers.go file containing all non-test helper functions:
- Move all functions from utils.go
- Consolidate helper functions from auth_key_test.go, auth_oidc_test.go, general_test.go
- Remove duplicated functions and maintain single source of truth
- Organize into logical sections: assertions, node collection, validation,
  network testing, client state validation, command execution, and policy helpers

This creates a single location for all integration test helper functions,
improving maintainability and reducing code duplication.

# This is the commit message #12:

integration: consolidate all helper functions into helpers.go

Create comprehensive helpers.go file containing all non-test helper functions:
- Move all functions from utils.go
- Consolidate helper functions from auth_key_test.go, auth_oidc_test.go, general_test.go
- Remove duplicated functions and maintain single source of truth
- Organize into logical sections: assertions, node collection, validation,
  network testing, client state validation, command execution, and policy helpers

This creates a single location for all integration test helper functions,
improving maintainability and reducing code duplication.

# This is the commit message #13:

integration: consolidate all helper functions into helpers.go

Create comprehensive helpers.go file containing all non-test helper functions:
- Move all functions from utils.go
- Consolidate helper functions from auth_key_test.go, auth_oidc_test.go, general_test.go
- Remove duplicated functions and maintain single source of truth
- Organize into logical sections: assertions, node collection, validation,
  network testing, client state validation, command execution, and policy helpers

This creates a single location for all integration test helper functions,
improving maintainability and reducing code duplication.

# This is the commit message #14:

integration/helpers: remove unnecessary basic require helpers

Remove basic wrapper functions like requireNoErr, requireNoErrHeadscaleEnv, etc.
since they just wrap standard require.NoError calls. Tests should use
require.NoError, require.NoErrorf, require.Contains, etc. directly instead
of these unnecessary helper wrappers.

The remaining helper functions in helpers.go are now focused on actual
integration test logic rather than simple assertion wrappers.

# This is the commit message #15:

integration/helpers: restore basic require helpers to fix compilation

Revert the removal of basic require helpers since they are still used
throughout the integration tests. The proper approach is to:
1. Keep the helpers for now to maintain compilation
2. Gradually replace usage with direct require.NoError calls
3. Remove helpers only after all usage is updated

This maintains a working codebase while allowing incremental improvement.

# This is the commit message #16:

integration: remove unnecessary require wrapper functions

Remove requireNoErr, requireNoErrf, and requireContains wrapper functions
and replace their usage with direct require.NoError, require.NoErrorf,
and require.Contains calls. These wrappers provided no value over the
standard testify require functions.

- Updated 154 requireNoErr calls to require.NoError
- Updated 5 requireNoErrf calls to require.NoErrorf with correct argument order
- Updated 1 requireContains call to require.Contains
- Added require import to test files that needed it

The remaining helpers in helpers.go now focus on actual integration test
logic rather than unnecessary assertion wrappers.

# This is the commit message juanfont#17:

integration/helpers: remove section comment headers

Remove all // ===== section comment headers as they add visual noise
without providing value. The functions are logically grouped and have
proper documentation comments that explain their purpose.

# This is the commit message juanfont#18:

integration: add comprehensive godoc to all helper functions

- Add godoc comments to all previously undocumented functions in helpers.go
- Document validation purpose and failure context for assertion helpers
- Explain network testing helpers and their specific use cases
- Document policy v2 configuration builders and OIDC test utilities
- Improve code maintainability and developer onboarding experience

Fixes missing documentation identified in integration test helper analysis.

# This is the commit message juanfont#19:

integration/auth: fix node cleanup timing in OIDC relogin test

- Add explicit node count validation with proper timing for cleanup
- Wait for node creation before checking for exact count (avoid 3 nodes issue)
- Extend timeout to 90s for node cleanup stabilization in CI environments
- Add node stability validation to ensure no phantom nodes remain
- Add proper logout validation before relogin to ensure clean state
- Improve error handling during login process to handle temporary instability

Addresses Phase 3.1 of relogin test flakiness plan - fixes the
'3 nodes instead of 2' failure by properly handling cleanup timing.

# This is the commit message juanfont#20:

integration/auth: improve error messages and logging for debugging

- Add comprehensive timestamp logging throughout all relogin tests
- Enhance EventuallyWithT error messages with detailed failure context
- Add node count expectations and actual values in assertion messages
- Improve validation failure reporting with state transition details
- Add visual indicators (✅❌) and timeout remaining information
- Include machine key and user information in debug logs for node tracking
- Standardize error message format across all auth tests

Addresses Phase 4.2 of relogin test flakiness plan - provides much better
debugging information for timing issues and state validation failures.

# This is the commit message juanfont#21:

integration/helpers: remove emojis from logging output

Replace visual indicators with clean text output for better compatibility
across different terminal environments and cleaner log files.

# This is the commit message juanfont#22:

remove plan

Signed-off-by: Kristoffer Dalby <[email protected]>

# This is the commit message juanfont#23:

integration: fix single-node validation logic in requireAllClientsOnline

- Add special handling for single-node scenarios in map response validation
- For single node tests, check that map responses exist rather than peer visibility
- Revert OIDC test changes to maintain original security-correct logic
- Original test expects both user nodes to be online in OIDC multi-user scenario

# This is the commit message juanfont#24:

integration/auth: implement security-focused OIDC node validation

- Only validate active user's node as online (security requirement)
- Maintain strict node count validation (exactly 2 nodes, no proliferation)
- Preserve all existing security validations (machine key sharing, node key isolation)
- Remove validateReloginComplete calls that expected both nodes online
- Add explicit validation that only current user's node is online

Addresses security concerns about node takeover and ensures proper
active/inactive node state management in OIDC multi-user scenarios.

# This is the commit message juanfont#25:

db

Signed-off-by: Kristoffer Dalby <[email protected]>

# This is the commit message juanfont#26:

Add detailed Docker build error output for integration tests

When Docker builds fail in integration tests, we now get detailed error
output instead of just 'returned a non-zero code: 1'. This helps with
debugging build failures by showing the actual Go compilation errors
or other build issues.

The solution runs a manual 'docker build' command when the main
dockertest build fails, capturing the full output to include in the
error message.

# This is the commit message juanfont#27:

Improve integration test validation with staged offline checking

- Split requireAllClientsOnline into separate online/offline validation paths
- Add requireAllClientsOfflineStaged for component-specific timeout handling
- Implement 3-stage offline validation:
  1. Batcher disconnection (immediate, 15s timeout)
  2. NodeStore offline status (20s timeout for disconnect detection delay)
  3. Map response propagation (60s timeout for peer update delays)
- Add detailed timing logs for validation stages
- Improve error reporting with better context and timing information

This addresses flaky integration tests by properly handling the different
timing characteristics of each system component during node disconnection.

# This is the commit message juanfont#28:

Add comprehensive relogin test improvement plan

Document the systematic approach to fixing flaky relogin integration tests:
- Analysis of 5 relogin test cases and their specific issues
- Staged validation approach with component-specific timeouts
- EventuallyWithT pattern standardization for external calls
- Infrastructure vs code issue detection strategies
- Sequential execution plan for addressing each test individually

This plan tracks the completed Phase 1 (validation functions) and Phase 2
(EventuallyWithT patterns) improvements, with detailed analysis of remaining
test-specific issues and their root causes.
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 303906d to 1ac0444 Compare September 21, 2025 01:54
@github-actions github-actions bot force-pushed the update_flake_lock_action branch 2 times, most recently from 06601cd to 605695d Compare October 5, 2025 01:54
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 605695d to c5099e1 Compare October 12, 2025 01:50
@github-actions github-actions bot force-pushed the update_flake_lock_action branch 2 times, most recently from 1df2f5b to 352227f Compare October 26, 2025 01:55
@github-actions github-actions bot force-pushed the update_flake_lock_action branch 2 times, most recently from b54c327 to bdbb509 Compare November 9, 2025 01:57
kradalby added a commit that referenced this pull request Nov 12, 2025
Improve error messages when Docker container builds fail to surface the
actual underlying errors instead of generic "returned a non-zero code: 1"
messages. This makes CI failures much easier to diagnose, especially for
disk space issues.

Changes:

1. Modify RunDockerBuildForDiagnostics to:
   - Return both output and error (previously only returned output on error)
   - Use CommandContext with 10-minute timeout to prevent hanging
   - Add --progress=plain and --no-cache flags for detailed output
   - Always return build output regardless of success/failure

2. Update error handling in hsic.go and tsic.go to:
   - Display last 100 lines of build output (avoid log overflow)
   - Differentiate between "build failed" and "build succeeded on retry"
   - Show more helpful error message when diagnostic build unavailable

Example improved error message:
```
could not start headscale container: exit status 1

Docker build failed. Last 100 lines of output:
#12 [7/7] RUN CGO_ENABLED=0 GOOS=linux go build ...
#12 ERROR: failed to solve: process "/bin/sh -c ..."
did not complete successfully: exit code: 1
------
 > [7/7] RUN CGO_ENABLED=0 GOOS=linux go build:
#12 0.123 # github.com/juanfont/headscale/cmd/headscale
#12 0.456 /go/pkg/mod/...: no space left on device
------
```

This makes it immediately clear that the issue is disk space rather than
a code compilation error.
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from bdbb509 to 58f40b0 Compare November 16, 2025 02:00
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 58f40b0 to c5e5f65 Compare November 23, 2025 02:07
kradalby added a commit that referenced this pull request Nov 28, 2025
Improve error messages when Docker container builds fail to surface the
actual underlying errors instead of generic "returned a non-zero code: 1"
messages. This makes CI failures much easier to diagnose, especially for
disk space issues.

Changes:

1. Modify RunDockerBuildForDiagnostics to:
   - Return both output and error (previously only returned output on error)
   - Use CommandContext with 10-minute timeout to prevent hanging
   - Add --progress=plain and --no-cache flags for detailed output
   - Always return build output regardless of success/failure

2. Update error handling in hsic.go and tsic.go to:
   - Display last 100 lines of build output (avoid log overflow)
   - Differentiate between "build failed" and "build succeeded on retry"
   - Show more helpful error message when diagnostic build unavailable

Example improved error message:
```
could not start headscale container: exit status 1

Docker build failed. Last 100 lines of output:
#12 [7/7] RUN CGO_ENABLED=0 GOOS=linux go build ...
#12 ERROR: failed to solve: process "/bin/sh -c ..."
did not complete successfully: exit code: 1
------
 > [7/7] RUN CGO_ENABLED=0 GOOS=linux go build:
#12 0.123 # github.com/juanfont/headscale/cmd/headscale
#12 0.456 /go/pkg/mod/...: no space left on device
------
```

This makes it immediately clear that the issue is disk space rather than
a code compilation error.
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from c5e5f65 to a662797 Compare November 30, 2025 02:06
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from a662797 to fd34c47 Compare December 7, 2025 02:07
@github-actions github-actions bot force-pushed the update_flake_lock_action branch 2 times, most recently from 5b3f5c6 to dc63ceb Compare December 21, 2025 02:07
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from dc63ceb to 998d503 Compare December 28, 2025 02:19
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from 998d503 to a362f9a Compare January 4, 2026 02:21
Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/b1d9ab7' (2024-03-11)
  → 'github:numtide/flake-utils/11707dc' (2024-11-13)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/5629520' (2024-08-31)
  → 'github:NixOS/nixpkgs/3146c6a' (2026-01-10)
@github-actions github-actions bot force-pushed the update_flake_lock_action branch from a362f9a to a603ef0 Compare January 11, 2026 02:21
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.

1 participant