Skip to content
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

[APP-7700] Fix repetitive wifi scan unavailable errors #75

Merged
merged 3 commits into from
Feb 24, 2025

Conversation

Otterverse
Copy link
Member

@Otterverse Otterverse commented Feb 24, 2025

Previously, it was possible to get a flood of near-identical errors for scanning wifi: Scanning not allowed while unavailable when the wifi device wasn't in a state to allow scans.

This adds additional logic to check the device state first, and skip scanning (with a quieter debug-level message) when it's in an unexpected state.

Test build: http://packages.viam.com/temp/viam-agent-v0.15.0-rc1-aarch64

@@ -4,7 +4,7 @@ go 1.23.1

require (
github.com/Masterminds/semver/v3 v3.3.0
github.com/Otterverse/gonetworkmanager/v2 v2.2.1
github.com/Otterverse/gonetworkmanager/v2 v2.2.2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New methods were added for getting the state/reason in this fork.

@@ -33,7 +33,7 @@ require (
github.com/edaniels/golog v0.0.0-20230215213219-28954395e8d0 // indirect
github.com/edaniels/zeroconf v1.0.10 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/godbus/dbus/v5 v5.1.1-0.20241109141230-b9236d654833 // indirect
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is from a pending branch that adds a feature needed for the return type of the StateReason() interface that was added.

- uses: google-github-actions/auth@v2
- name: Build
run: make debug-workflow all
- uses: google-github-actions/auth@v2 # This BREAKS the git checkout/tags/history, so must run after builds!
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This drove me insane trying to find the issue here. Still don't know HOW it breaks things, but good enough for now.

- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: google-github-actions/auth@v2
- name: Build
run: make debug-workflow all
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no strong opinion about but is debug-workflow intentionally here ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, intentional while working on the eng-plan project for latest/dev release channel stuff.

@Otterverse Otterverse merged commit c7ea8b0 into main Feb 24, 2025
3 checks passed
@Otterverse Otterverse deleted the fix-scan-unavailable branch February 24, 2025 23:46
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.

2 participants