Skip to content

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

@markmandel

Description

@markmandel

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

Metadata

Metadata

Labels

area/build-toolsDevelopment tooling. I.e. pretty much everything in the `build` directory.area/testsUnit tests, e2e tests, anything to make sure things don't breakawaiting-maintainerBlock issues from being stale/obsolete/closedgood first issueThese are great first issues. If you are looking for a place to start, start here!help wantedWe would love help on these issues. Please come help us!kind/documentationDocumentation for Agoneskind/featureNew features for Agones

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions