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

factorio: add update script #105296

Merged
merged 2 commits into from Nov 30, 2020
Merged

Conversation

lukegb
Copy link
Contributor

@lukegb lukegb commented Nov 28, 2020

Motivation for this change

The updateScript knows how to automatically fetch and update the version
data from the Factorio versions API (and update the hashes
appropriately), which makes it easier to update whenever experimental
does.

To use it "automatically" (from e.g. nix-shell maintainers/scripts/update.nix),
you'll need to have done the nixpkgs overlay method of providing a
username/token (and these values will not be kept private
in the same way as when evaluating the drv).

The update.py script can also be run manually with a --username/--token
passed.

I also added myself to the list of maintainers :^)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@lukegb
Copy link
Contributor Author

lukegb commented Nov 28, 2020

I'm planning to add Darwin support, which is why it's a bit over-engineered at the moment. I'll do that in a follow-up PR though.

pkgs/games/factorio/versions.json Outdated Show resolved Hide resolved
pkgs/games/factorio/versions.json Show resolved Hide resolved
pkgs/games/factorio/default.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

LGTM :)

@jonringer
Copy link
Contributor

Also, I'm still running a server: https://discourse.nixos.org/t/factorio-community-server-usa/8622

It's been up this entire time. If you guys would like me to host something, let me know.

@mweinelt
Copy link
Member

mweinelt commented Nov 29, 2020

I can't find it on the server list anymore though. Did you update to 1.1.2 already? I'm only seeing 1.1.2 servers.

@jonringer
Copy link
Contributor

I can't find it on the server list anymore though. Did you update to 1.1.2 already? I'm only seeing 1.1.2 servers.

I haven't touched since august...

looks like it's borked:

Nov 17 02:28:51 nixos factorio[8500]: 2618793.079 Error HttpSharedState.cpp:136: CURL failed: code:28, 1c; Operation too slow. Less than 1 bytes/sec transferred the last 20 seconds
Nov 17 02:28:51 nixos factorio[8500]: 2618793.079 Info MatchingServer.cpp:171: Failed to sendHeartbeat to the multiplayer matching server: Download failed (status code 520): failed to parse JSON response: Unexpected character (O) at ?:1
Nov 17 02:28:51 nixos factorio[8500]: JSON: Operation too slow. Less than 1 bytes/sec transferred the last 20 seconds
Nov 17 02:29:22 nixos factorio[8500]: 2618823.632 Error HttpSharedState.cpp:136: CURL failed: code:28, 1c; Resolving timed out after 30553 milliseconds
Nov 17 02:29:52 nixos factorio[8500]: 2618854.188 Error HttpSharedState.cpp:136: CURL failed: code:28, 1c; Resolving timed out after 30552 milliseconds
Nov 17 02:30:07 nixos factorio[8500]: 2618869.104 Info ServerMultiplayerManager.cpp:701: Matching server connection resumed

@jonringer
Copy link
Contributor

helps if i open the firewall.... the server is back up

@mweinelt
Copy link
Member

I don't see it yet.

@jonringer
Copy link
Contributor

I don't see it yet.

It's still running the stable 1.0, if you're running 1.1.2, you wont see it.

@jonringer
Copy link
Contributor

If you want me to do a server restart, I would be happy to do so

@mweinelt
Copy link
Member

I haven't been playing in a while, and I don't think I will in a while.

The updateScript knows how to automatically fetch and update the version
data from the Factorio versions API (and update the hashes
appropriately), which makes it easier to update whenever experimental
does.
@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Nov 30, 2020

Also, I'm still running a server: discourse.nixos.org/t/factorio-community-server-usa/8622

It's been up this entire time. If you guys would like me to host something, let me know.

The ping to you makes the game unplayable. Also I wanted to continue my almost 800 hours AB map and bring it to 0.17/1.0.

@SuperSandro2000 SuperSandro2000 merged commit c54f752 into NixOS:master Nov 30, 2020
@lukegb lukegb deleted the factorio-update-script branch December 5, 2022 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants