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

Fix SharkIQ token expiration #89357

Conversation

funkybunch
Copy link
Contributor

Proposed change

This update fixes a bug in the SharkIQ integration where tokens are not refreshed after expiring, or are not refreshed ahead of expiring.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented Mar 8, 2023

Hey there @JeffResc, @AritroSaha10, mind taking a look at this pull request as it has been labeled with an integration (sharkiq) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of sharkiq can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign sharkiq Removes the current integration label and assignees on the pull request, add the integration domain after the command.

@funkybunch funkybunch changed the title SharkIQ token expiration bug fix SharkIQ Token Expiration Bug Fix Mar 8, 2023
@MartinHjelmare MartinHjelmare changed the title SharkIQ Token Expiration Bug Fix Fix SharkIQ token expiration Mar 8, 2023
@XBadPlayerX
Copy link

Glad you are doing okay!

Thanks for your work.

@funkybunch
Copy link
Contributor Author

Dependency requirements have been merged to dev - marking as ready for review.

@funkybunch funkybunch marked this pull request as ready for review March 8, 2023 21:00
@frenck frenck force-pushed the funkybunch/SharkIQ-Token-Expiration-Bug-Fix branch from 1426b3b to c245e90 Compare March 8, 2023 21:07
@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Mar 8, 2023
@frenck frenck removed the smash Indicator this PR is close to finish for merging or closing label Mar 13, 2023
@frenck frenck marked this pull request as draft March 13, 2023 14:35
@frenck
Copy link
Member

frenck commented Mar 13, 2023

I've marked this PR, as changes are requested that need to be processed above.
Please un-draft it once it is ready for review again by clicking the "Ready for review" button.

Thanks! 👍

../Frenck

Learn more about our pull request process.

@funkybunch
Copy link
Contributor Author

funkybunch commented Apr 4, 2023

@Swamp-Ig I took an alternative approach that should negate the need to attempt re-auth in the exception blocks. Hopefully that alleviates your concerns.

@funkybunch funkybunch marked this pull request as ready for review April 4, 2023 03:19
@funkybunch
Copy link
Contributor Author

funkybunch commented Apr 4, 2023

I've marked this PR, as changes are requested that need to be processed above. Please un-draft it once it is ready for review again by clicking the "Ready for review" button.

@frenck I took an alternative approach that should alleviate the concerns from @Swamp-Ig. I know you all are getting ready for the 2023.4 release tomorrow, but if this looks good to you, I know the community would love to see this bug fix soon. Could it potentially be a candidate for a minor release (2023.4.X)?

@Swamp-Ig
Copy link
Contributor

Swamp-Ig commented Apr 5, 2023

That's better :)

@frenck frenck added this to the 2023.4.5 milestone Apr 15, 2023
Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Thanks, @funkybunch 👍

../Frenck

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Oh a merge conflict appeared, could you take a look @funkybunch?

Thanks!

../Frenck

@home-assistant home-assistant bot marked this pull request as draft April 15, 2023 13:53
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@funkybunch
Copy link
Contributor Author

funkybunch commented Apr 15, 2023

Oh a merge conflict appeared, could you take a look @funkybunch?

Yup, my guess is it is related to some changes to the tests file that was merged in the other day. I'll have it cleaned up soon.

@funkybunch funkybunch marked this pull request as ready for review April 15, 2023 22:15
@home-assistant home-assistant bot requested a review from frenck April 15, 2023 22:15
@funkybunch
Copy link
Contributor Author

@frenck All set!

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Thanks for the quick turnaround @funkybunch 👍

../Frenck

@frenck frenck merged commit 0cf29f0 into home-assistant:dev Apr 16, 2023
26 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SharkIQ Integration loses connection frequently; integration must be reloaded daily.
4 participants