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

[e2e] Document the best path for making changes to simple-game-server for e2e tests #3836

Open
markmandel opened this issue May 22, 2024 · 3 comments
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. area/tests Unit tests, e2e tests, anything to make sure things don't break awaiting-maintainer Block issues from being stale/obsolete/closed good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/documentation Documentation for Agones kind/feature New features for Agones

Comments

@markmandel
Copy link
Member

Is your feature request related to a problem? Please describe.

There is lots of confusion on the best path for how to make changes to simple game server in a safe way.

Describe the solution you'd like

Make the ImagePullPolicy a variable, so it can easily be set to Always:

Variables:

viper.SetDefault(kubeconfigFlag, filepath.Join(usr.HomeDir, ".kube", "config"))
viper.SetDefault(gsimageFlag, "us-docker.pkg.dev/agones-images/examples/simple-game-server:0.32")
viper.SetDefault(pullSecretFlag, "")
viper.SetDefault(stressTestLevelFlag, 0)
viper.SetDefault(perfOutputDirFlag, "")
viper.SetDefault(versionFlag, "")
viper.SetDefault(runtime.FeatureGateFlag, "")
viper.SetDefault(namespaceFlag, "")
viper.SetDefault(cloudProductFlag, "generic")
pflag.String(kubeconfigFlag, viper.GetString(kubeconfigFlag), "kube config path, e.g. $HOME/.kube/config")
pflag.String(gsimageFlag, viper.GetString(gsimageFlag), "gameserver image to use for those tests")
pflag.String(pullSecretFlag, viper.GetString(pullSecretFlag), "optional secret to be used for pulling the gameserver and/or Agones SDK sidecar images")
pflag.Int(stressTestLevelFlag, viper.GetInt(stressTestLevelFlag), "enable stress test at given level 0-100")
pflag.String(perfOutputDirFlag, viper.GetString(perfOutputDirFlag), "write performance statistics to the specified directory")
pflag.String(versionFlag, viper.GetString(versionFlag), "agones controller version to be tested, consists of release version plus a short hash of the latest commit")
pflag.String(namespaceFlag, viper.GetString(namespaceFlag), "namespace is used to isolate test runs to their own namespaces")
pflag.String(cloudProductFlag, viper.GetString(cloudProductFlag), "cloud product of cluster references by kubeconfig; defaults to 'generic'; options are 'generic', 'gke-autopilot'")

Line:

ImagePullPolicy: corev1.PullIfNotPresent,

Write a new section in https://github.com/googleforgames/agones/blob/main/build/README.md#testing-and-building called "Making changes to Simple Game Server with e2e Tests", with the following documentation:

  1. How to create your own local image for Simple Game Server, and point to https://github.com/googleforgames/agones/blob/main/build/README.md#running-individual-end-to-end-tests for beginning of making changes.
  2. For moving to CI - set the image tag to a 0.xx-dev tag (so -dev with the version number), and imagePullPolicy to Always, and create a draft PR.
  3. With this approach the developer (or maintainer who is helping) can publish the -dev version multiple times without polluting the production version space, can can fix issues with CI's help without any risk.
  4. Once CI is passing and review has occured, the PR can be edited to remove the -dev tag, move imagePullPolicy back to IfNotPresent, and the production version 0.xx can be published -- and the PR merged.
  5. The -dev can also be manually cleaned up if required as well.

Describe alternatives you've considered

Rather than a -dev suffix, we could guide people to use the us-docker.pkg.dev/agones-images/ci repository, that will have a 40 day cleanup rule (eventually - I need to check the audit logs for some previous cleanup work), so no manual cleanup step is required.

So, for example - us-docker.pkg.dev/agones-images/examples/simple-game-server:0.32 would become us-docker.pkg.dev/agones-images/ci/simple-game-server:0.32

I think I like this better - but would like consensus.

Additional context

N/A

@markmandel markmandel added kind/feature New features for Agones help wanted We would love help on these issues. Please come help us! good first issue These are great first issues. If you are looking for a place to start, start here! kind/documentation Documentation for Agones area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. area/tests Unit tests, e2e tests, anything to make sure things don't break labels May 22, 2024
@markmandel
Copy link
Member Author

@ashutosji - since you are working on this, would love your feedback.

Copy link

'This issue is marked as Stale due to inactivity for more than 30 days. To avoid being marked as 'stale' please add 'awaiting-maintainer' label or add a comment. Thank you for your contributions '

@github-actions github-actions bot added the stale Pending closure unless there is a strong objection. label Oct 15, 2024
@markmandel markmandel added awaiting-maintainer Block issues from being stale/obsolete/closed and removed stale Pending closure unless there is a strong objection. labels Oct 15, 2024
@markmandel
Copy link
Member Author

Moving to awaiting-maintainer since we should really do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. area/tests Unit tests, e2e tests, anything to make sure things don't break awaiting-maintainer Block issues from being stale/obsolete/closed good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/documentation Documentation for Agones kind/feature New features for Agones
Projects
None yet
Development

No branches or pull requests

1 participant