tailscale / gitops-acl-action

GitOps for your Tailscale ACLs
85 stars 25 forks source link

Json marshal errors that go away when applying the configuration being tested to the tailscale console #26

Closed seanturner026 closed 1 year ago

seanturner026 commented 1 year ago

I'm running into a weird error.

I am using the following command to test my policy.hujson in PRs:

$ gitops-pusher -policy-file policy.hujson -github-syntax=false test

Seemingly out of the blue, we started running into json marshal errors:

2023/07/18 21:08:27 no previous etag found, assuming local file is correct and recording that
2023/07/18 21:08:27 control: foo
2023/07/18 21:08:27 local:   bar
2023/07/18 21:08:27 cache:   bar
The policy file was modified externally in the admin console.
json: cannot unmarshal string into Go struct field ACLTestError.data of type main.ACLTestErrorDetail

Exited with code exit status 1

However, the error goes away when I apply the contents of policy.hujson (that I am testing with the gitops-pusher binary) to the Tailscale ACL Console and re-run CI.

Any thoughts? I am using hujsonfmt to lint the file so I don't really think it's a syntax error?

phirework commented 1 year ago

This is a regression that we're tracking in https://github.com/tailscale/tailscale/issues/8645, please follow that issue for updates.