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 helpful note to edit-first-gameserver-go #3846

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

peterzhongyi
Copy link
Collaborator

Add a note in case people modified the game server main.go file again and want to see their new changes reflected in new game servers.

Also added some explanation on why the imagePullPolicy needs to be changed to Always.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: cf3ec87c-7b8e-4557-8737-aac31dcae81e

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: e2fd38c7-4887-47a7-b774-053f196cdffe

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3846/head:pr_3846 && git checkout pr_3846
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.41.0-dev-41d7452-amd64

```

Alternatively, you can also manually increment the `version` field in the `Makefile` file and change the `TAG` variable accordingly.
However this is more cumbersome, and is not encouraged.
Copy link
Member

Choose a reason for hiding this comment

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

Why not encouraged?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh I guess it's just less preferred during development period because it is more cumbersome. Added some more explanations and changed the wording a bit.

{{< alert title="Note" color="info">}}
If you made changed `main.go` again and want to apply the changes to the new game servers, then you also need
to modify the `gamerserver.yaml` file's `imagePullPolicy` to be `Always`, or else the new game servers might
only pull a cached version of the image, which doesn't have the new changes.
Copy link
Member

Choose a reason for hiding this comment

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

I think a link to https://kubernetes.io/docs/concepts/containers/images/#updating-images would be good.

Something like "See the documentation for ImagePullPolicy" for more details.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: cbc456b9-a5e7-4506-af28-2f72cdb3ed98

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 8128cd89-ab01-4bfd-868a-7490fd823117

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@zmerlynn
Copy link
Collaborator

zmerlynn commented Jun 4, 2024

What the heck?
image

Retried the build.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: edc0bf03-cdff-4361-9b75-ee4c14f5979b

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3846/head:pr_3846 && git checkout pr_3846
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.41.0-dev-0f61c3c-amd64

@@ -87,6 +87,26 @@ kubectl create -f gameserver.yaml
kubectl apply -f gameserver.yaml
```

{{< alert title="Note" color="info">}}
If you changed `main.go` again and want to apply the changes to the new game servers, then you also need
to modify the `gamerserver.yaml` file's `imagePullPolicy` to be `Always`, or else the new game servers might
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not the game servers pulling a new image, it's kubelet, or just say the node.

Something like: "or the node may use a cached copy of the image, which doesn't have the new changes."

If you changed `main.go` again and want to apply the changes to the new game servers, then you also need
to modify the `gamerserver.yaml` file's `imagePullPolicy` to be `Always`, or else the new game servers might
only pull a cached version of the image, which doesn't have the new changes. See the documentation for
[ImagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) for more details.
Copy link
Collaborator

Choose a reason for hiding this comment

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

To shorten this a bit, I would just link imagePullPolicy above and anyone curious will know to go look at the hyperlink, which would let you drop this sentence.


Alternatively, you can also manually increment the `version` field in the `Makefile` file and change the `TAG`
variable accordingly. However this is more cumbersome because you need to increment the `version` field each
time you want to see a new change reflected in `main.go`, so it is usually less preferred during code development.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know you're trying to be helpful but I think line 104-107, after accordingly. can be dropped, I.e. you can present both and let people decide which toil they like better.

This is a common Kubernetes dev flow thing, so I think concision here is a little better - the note is a good reminder but a lot of people coming to the page will already be familiar with this gotcha.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense - yeah most people would know this already.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 18709d3a-1b07-4cc3-8b5f-9fc70ff9631c

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 3a1728b6-d883-4a73-9090-171d71fb43ee

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3846/head:pr_3846 && git checkout pr_3846
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.41.0-dev-88bb6fc-amd64

@zmerlynn zmerlynn enabled auto-merge (squash) June 5, 2024 17:32
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 21c6591f-d5f7-43d4-99da-520288a62183

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3846/head:pr_3846 && git checkout pr_3846
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.42.0-dev-25fa6d7-amd64

@zmerlynn zmerlynn merged commit bc42fd5 into googleforgames:main Jun 5, 2024
4 checks passed
@kamaljeeti kamaljeeti added area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc and removed kind/other labels Jul 15, 2024
spiceratops referenced this pull request in spiceratops/k8s-gitops Jul 23, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [agones](https://agones.dev)
([source](https://github.com/googleforgames/agones)) | minor |
`1.41.0` -> `1.42.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>googleforgames/agones (agones)</summary>

###
[`v1.42.0`](https://github.com/googleforgames/agones/blob/HEAD/CHANGELOG.md#v1420-2024-07-16)

[Compare
Source](https://github.com/googleforgames/agones/compare/v1.41.0...v1.42.0)

[Full
Changelog](https://github.com/googleforgames/agones/compare/v1.41.0...v1.42.0)

**Breaking changes:**

- Update csharp.md to indicate ConnectAsync is deprecated by
[@&#8203;aallbrig](https://github.com/aallbrig) in
[https://github.com/googleforgames/agones/pull/3866](https://github.com/googleforgames/agones/pull/3866)

**Implemented enhancements:**

- Add security context to Agones containers by
[@&#8203;peterzhongyi](https://github.com/peterzhongyi) in
[https://github.com/googleforgames/agones/pull/3856](https://github.com/googleforgames/agones/pull/3856)
- Add Security Context to game server sidecar by
[@&#8203;peterzhongyi](https://github.com/peterzhongyi) in
[https://github.com/googleforgames/agones/pull/3869](https://github.com/googleforgames/agones/pull/3869)
- Drop CountsAndLists Data from the Fleet and Game Server Set When the
Flag is False by [@&#8203;igooch](https://github.com/igooch) in
[https://github.com/googleforgames/agones/pull/3881](https://github.com/googleforgames/agones/pull/3881)
- Adds tests to confirm that Fleet, Fleet Autoscaler, and Fleet
Allocation apply defaults code is idempotent by
[@&#8203;igooch](https://github.com/igooch) in
[https://github.com/googleforgames/agones/pull/3888](https://github.com/googleforgames/agones/pull/3888)
- feat: Add CRD Changes and Feature Flag for chain policy by
[@&#8203;indexjoseph](https://github.com/indexjoseph) in
[https://github.com/googleforgames/agones/pull/3880](https://github.com/googleforgames/agones/pull/3880)

**Fixed bugs:**

- sdk-server expects SDK_LOG_LEVEL by
[@&#8203;KAllan357](https://github.com/KAllan357) in
[https://github.com/googleforgames/agones/pull/3858](https://github.com/googleforgames/agones/pull/3858)
- this will resolve From/layer extraction issue on ltsc2019 in examples
by [@&#8203;ashutosji](https://github.com/ashutosji) in
[https://github.com/googleforgames/agones/pull/3873](https://github.com/googleforgames/agones/pull/3873)
- featuregate: adds validation if PortPolicyNone is not enabled by
[@&#8203;daniellee](https://github.com/daniellee) in
[https://github.com/googleforgames/agones/pull/3871](https://github.com/googleforgames/agones/pull/3871)
- added local as default for registry when registry is not specified by
[@&#8203;kamaljeeti](https://github.com/kamaljeeti) in
[https://github.com/googleforgames/agones/pull/3876](https://github.com/googleforgames/agones/pull/3876)
- Buffer Unity SDK ReceiveData when watching for configuration changes
by [@&#8203;ZeroParticle](https://github.com/ZeroParticle) in
[https://github.com/googleforgames/agones/pull/3872](https://github.com/googleforgames/agones/pull/3872)
- agones-{extensions,allocator}: Make servers context aware by
[@&#8203;zmerlynn](https://github.com/zmerlynn) in
[https://github.com/googleforgames/agones/pull/3845](https://github.com/googleforgames/agones/pull/3845)
- added condition for distributed logic by
[@&#8203;ashutosji](https://github.com/ashutosji) in
[https://github.com/googleforgames/agones/pull/3877](https://github.com/googleforgames/agones/pull/3877)

**Security fixes:**

- Bump [@&#8203;grpc/grpc-js](https://github.com/grpc/grpc-js) from
1.10.7 to 1.10.9 in /sdks/nodejs by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/googleforgames/agones/pull/3863](https://github.com/googleforgames/agones/pull/3863)

**Other:**

- Preparation for Release v1.42.0 by
[@&#8203;ashutosji](https://github.com/ashutosji) in
[https://github.com/googleforgames/agones/pull/3854](https://github.com/googleforgames/agones/pull/3854)
- Add helpful note to edit-first-gameserver-go by
[@&#8203;peterzhongyi](https://github.com/peterzhongyi) in
[https://github.com/googleforgames/agones/pull/3846](https://github.com/googleforgames/agones/pull/3846)
- Moved Passthrough feature description to the correct section in
Feature Stages by [@&#8203;vicentefb](https://github.com/vicentefb) in
[https://github.com/googleforgames/agones/pull/3861](https://github.com/googleforgames/agones/pull/3861)
- Updated Node.js Page to Reflect that Counters and Lists is Implemented
by [@&#8203;ashutosji](https://github.com/ashutosji) in
[https://github.com/googleforgames/agones/pull/3865](https://github.com/googleforgames/agones/pull/3865)
- Change Slack channel description from #developers to #development by
[@&#8203;branhoff](https://github.com/branhoff) in
[https://github.com/googleforgames/agones/pull/3868](https://github.com/googleforgames/agones/pull/3868)
- updated UpdateList documentation for local sdk server and sdk server
by [@&#8203;ashutosji](https://github.com/ashutosji) in
[https://github.com/googleforgames/agones/pull/3878](https://github.com/googleforgames/agones/pull/3878)
- Add zio-agones to the list of third party client SDKs by
[@&#8203;ghostdogpr](https://github.com/ghostdogpr) in
[https://github.com/googleforgames/agones/pull/3875](https://github.com/googleforgames/agones/pull/3875)
- refactor simple game server by
[@&#8203;ashutosji](https://github.com/ashutosji) in
[https://github.com/googleforgames/agones/pull/3817](https://github.com/googleforgames/agones/pull/3817)
- Update Slack invite link by
[@&#8203;markmandel](https://github.com/markmandel) in
[https://github.com/googleforgames/agones/pull/3896](https://github.com/googleforgames/agones/pull/3896)
- Added cleanup for app-engine services in cloudbuild script by
[@&#8203;kamaljeeti](https://github.com/kamaljeeti) in
[https://github.com/googleforgames/agones/pull/3890](https://github.com/googleforgames/agones/pull/3890)
- Adds a command to generate the zz_generated.deepcopy.go files for the
apis by [@&#8203;igooch](https://github.com/igooch) in
[https://github.com/googleforgames/agones/pull/3900](https://github.com/googleforgames/agones/pull/3900)
- update go version to 1.21.12 by
[@&#8203;ashutosji](https://github.com/ashutosji) in
[https://github.com/googleforgames/agones/pull/3894](https://github.com/googleforgames/agones/pull/3894)

**New Contributors:**

- [@&#8203;KAllan357](https://github.com/KAllan357) made their first
contribution in
[https://github.com/googleforgames/agones/pull/3858](https://github.com/googleforgames/agones/pull/3858)
- [@&#8203;branhoff](https://github.com/branhoff) made their first
contribution in
[https://github.com/googleforgames/agones/pull/3868](https://github.com/googleforgames/agones/pull/3868)
- [@&#8203;aallbrig](https://github.com/aallbrig) made their first
contribution in
[https://github.com/googleforgames/agones/pull/3866](https://github.com/googleforgames/agones/pull/3866)
- [@&#8203;ZeroParticle](https://github.com/ZeroParticle) made their
first contribution in
[https://github.com/googleforgames/agones/pull/3872](https://github.com/googleforgames/agones/pull/3872)
- [@&#8203;ghostdogpr](https://github.com/ghostdogpr) made their first
contribution in
[https://github.com/googleforgames/agones/pull/3875](https://github.com/googleforgames/agones/pull/3875)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzIuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9oZWxtIiwidHlwZS9taW5vciJdfQ==-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants