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

Add Deck-Auto-Update plugin #633

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AkazaRenn
Copy link

@AkazaRenn AkazaRenn commented May 28, 2024

AutoUpdate/Crontab Auto-Restart

Summary

It accepts a crontab expression and will try to update the system based on that schedule. It will automatically restart either the Steam client or the OS based on the need of the update. It will only restart the client/system if the current battery level is equal to or higher than the user-set value, and the user is not in game.

This plugin is still in early stage but functions well per my tests, but if the system is sleeping, it doesn't wake up the system to do the update...

I use it to keep my Steam Link host up-to-date.

Checklist:

Developer Checklist

  • I am the original author or an authorized maintainer of this plugin.
  • I have abided by the licenses of the libraries I am utilizing, including attaching license notices where appropriate.

Plugin Checklist

  • I have verified that my plugin works properly on the Stable and Beta update channels of SteamOS.
  • I have verified my plugin is unique or alternatively provides more/alternative functionality to a similar plugin already on the store.

Plugin Backend Checklist

  • No: I am using a custom backend other than Python.
  • No: I am using a tool or software from a 3rd party FOSS project that does not have it's dependencies statically linked.
  • No: I am using a custom binary that has all of it's dependencies statically linked.

Testing

  • Tested on SteamOS Stable/Beta Update Channel.

Copy link
Contributor

@RodoMa92 RodoMa92 left a comment

Choose a reason for hiding this comment

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

Looks fine to me at a first glance.

EDIT: Lockfile is too new, for now. Please downgrade it back to something closer to 8.5.1, I forgot to update the builder in the CI, PR for that is pending.

@TrainDoctor
Copy link
Member

I'm wondering if auto-update is too simple a name. No blocking concern but something I think might be important for clarity.

@AkazaRenn
Copy link
Author

@TrainDoctor what about deck-auto-update?

@AkazaRenn
Copy link
Author

@RodoMa92 Lock should be using 6.0 now
@TrainDoctor I renamed it to Deck-Auto-Update
Thanks for your help!

@AkazaRenn AkazaRenn changed the title Add auto-update plugin Add Deck-Auto-Update plugin Jun 22, 2024
@RodoMa92
Copy link
Contributor

RodoMa92 commented Jul 6, 2024

Seems to have a missing import in index from the CI output:

[!] Error: Could not resolve '../protobuf/build/steammessages_client_objects_pb' from src/index.tsx
  Error: Could not resolve '../protobuf/build/steammessages_client_objects_pb' from src/index.tsx
      at error (/plugin/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:198:30)
      at ModuleLoader.handleResolveId (/plugin/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:22463:24)
      at /plugin/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:22426:26
  Line:  ELIFECYCLE  Command failed with exit code 1.
  Line: error code: 0
  Line: pnpm build failed, please report this issue to the CI maintainer and the plugin developer.
  Error: Failed to build frontend. There might be more information in the output above.
  Caused by:
      child status was: exit status: 1

@AkazaRenn
Copy link
Author

AkazaRenn commented Jul 6, 2024

@RodoMa92 Ah protobuf/generate.py needs to be run before building. I modified the VS Code tasks but the PreCI doesn't use that I assume? How do we usually solve dependencies like that? It should be fixed now

@AkazaRenn
Copy link
Author

I tried moving the dependency generation part into backend, hope it will work this time. Please try re-triggering the pipeline if you get the chance. Thank you!

@RodoMa92
Copy link
Contributor

Still failing, sadly:

Line: Running command: 

Line: 	/tmp/protoc/bin/protoc --plugin=protoc-gen-ts=//plugin/node_modules/.bin/protoc-gen-ts --ts_out=service=grpc-node://plugin/protobuf/build --proto_path=//plugin/protobuf/source/steam //plugin/protobuf/source/steam/*.proto 

File "//./plugin/protobuf/generate.py", line 68, in <module> 

main() 

File "//./plugin/protobuf/generate.py", line 48, in main 

run(protoc_command, shell=True, check=True, env=env, stderr=DEVNULL) 

File "/usr/local/lib/python3.12/subprocess.py", line 571, in run 

raise CalledProcessError(retcode, process.args, 

subprocess.CalledProcessError: Command '/tmp/protoc/bin/protoc --plugin=protoc-gen-ts=//plugin/node_modules/.bin/protoc-gen-ts --ts_out=service=grpc-node://plugin/protobuf/build --proto_path=//plugin/protobuf/source/steam //plugin/protobuf/source/steam/*.proto' returned non-zero exit status 1.

@AkazaRenn AkazaRenn reopened this Jul 11, 2024
@AkazaRenn
Copy link
Author

@RodoMa92 sorry for being silly 🥲 I've tested this change on my fork and it should really pass this time

Copy link
Member

@TrainDoctor TrainDoctor left a comment

Choose a reason for hiding this comment

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

Resolved git-modules conflict and reviewed code. Looks to go. I would request that testers provided feedback of all scenarios such as attempting an update during gameplay and low battery etc to verify that this plugin will not force an update that will cause unexpected issues for a non-savvy user.
Off to testing.

@TrainDoctor TrainDoctor requested review from a team July 31, 2024 01:28
@TrainDoctor
Copy link
Member

@AkazaRenn just as a heads up, plugins without testing reports submitted have until the end of this month to collect testing reports so the plugin can be approved to go to the production store or it will be removed from testing and the PR closed.
A new PR or re-opening the PR can be submitted at any time at your convenience and the plugin is not blacklisted if you can ensure you have a tester to evaluate the plugin within 2 weeks of re-opening the PR. Thanks for your patience and understanding.

@AkazaRenn
Copy link
Author

@TrainDoctor got it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Ready for review
Development

Successfully merging this pull request may close these issues.

4 participants