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

flyctl: 0.2.52 -> 0.2.55 #313157

Merged
merged 3 commits into from
May 21, 2024
Merged

flyctl: 0.2.52 -> 0.2.55 #313157

merged 3 commits into from
May 21, 2024

Conversation

RaghavSood
Copy link
Member

@RaghavSood RaghavSood commented May 20, 2024

Description of changes

Update flyctl to 0.2.55

This also reworks the check phases. Upstream introduced some tests in flyctl#3430 that require network access - we can skip all of them by ignoring TestToTestMachineConfig.

For some reason, we were running tests in postCheck. We can instead override checkPhase (replicating the base construct) to run checks against ./.... Under current buildGoModule structure, it is not possible to use subPackages (which we want in this case since we only want to build the root package, and not the various internal and audit ones), and also run tests against ./....

By reusing the plumbing of checkPhase, we can also avoid duplicating the ldflags as they are already included.

See #284568 for an ongoing, potential fix to test problem.

An updateScript has been added as well - upstream tags any PR merge as its own release tag like v2024.5.20-pr3545.4 - by ignoring tags with -, we can skip those and stick to the normal release tags.

I have also added myself as a maintainer.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@RaghavSood
Copy link
Member Author

Result of nixpkgs-review pr 313157 run on x86_64-linux 1

1 package built:
  • flyctl

@RaghavSood
Copy link
Member Author

Result of nixpkgs-review pr 313157 run on aarch64-darwin 1

1 package built:
  • flyctl

Copy link
Member

@techknowlogick techknowlogick left a comment

Choose a reason for hiding this comment

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

Thanks!!

@RaghavSood RaghavSood merged commit bd2da78 into NixOS:master May 21, 2024
30 of 31 checks passed
@billyb2
Copy link

billyb2 commented May 24, 2024

hi, i'm upstream :). why would TestToTestMachineConfig require network access? We're reading from a toml file and making sure it's producing a specific output.

@RaghavSood
Copy link
Member Author

RaghavSood commented May 24, 2024

Hey upstream - thanks for chiming in.

You're right, the actual failure doesn't appear to be a network issue:

--- FAIL: TestToTestMachineConfig (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0xa8 pc=0x1058e6b9c]

goroutine 66 [running]:
testing.tRunner.func1.2({0x105ca0b40, 0x1065ca000})
        /nix/store/i04a1a6qgxhjw6c0ld2b3x1v815sbxjc-go-1.22.3/share/go/src/testing/testing.go:1631 +0x1c4
testing.tRunner.func1()
        /nix/store/i04a1a6qgxhjw6c0ld2b3x1v815sbxjc-go-1.22.3/share/go/src/testing/testing.go:1634 +0x33c
panic({0x105ca0b40?, 0x1065ca000?})
        /nix/store/i04a1a6qgxhjw6c0ld2b3x1v815sbxjc-go-1.22.3/share/go/src/runtime/panic.go:770 +0x124
github.com/superfly/flyctl/internal/appconfig.(*Config).ToTestMachineConfig(0x140004b5980, 0x1400042d1d0, 0x0)
        /private/tmp/nix-build-flyctl-0.2.55.drv-1/source/internal/appconfig/machines.go:153 +0x59c
github.com/superfly/flyctl/internal/appconfig.TestToTestMachineConfig(0x14000490d00)
        /private/tmp/nix-build-flyctl-0.2.55.drv-1/source/internal/appconfig/machines_test.go:210 +0x51c
testing.tRunner(0x14000490d00, 0x105dd9ac0)
        /nix/store/i04a1a6qgxhjw6c0ld2b3x1v815sbxjc-go-1.22.3/share/go/src/testing/testing.go:1689 +0xec
created by testing.(*T).Run in goroutine 1
        /nix/store/i04a1a6qgxhjw6c0ld2b3x1v815sbxjc-go-1.22.3/share/go/src/testing/testing.go:1742 +0x318

This is failing at mConfig.Env["FLY_TEST_MACHINE_IP"] = lo.Ternary(origMachine == nil, "", origMachine.PrivateIP) on internal/appconfig/machines.go#L153.

Looks like origMachine is passed in as nil

Happy to open an upstream issue if this is not supposed to be failing.

@RaghavSood
Copy link
Member Author

@billyb2 Looks like the issue was resolved in flyctl#3561 - my version bump to 0.2.58 in #314437 drops the test skip flag as it is no longer necessary.

@RaghavSood RaghavSood deleted the flyctl/0.2.55 branch May 25, 2024 00:24
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

3 participants