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

Remove FleetAllocation. #856

Merged
merged 2 commits into from
Jul 2, 2019

Conversation

markmandel
Copy link
Member

This removes Fleet Allocation implementations.

Removal of FleetAllocation docs will come in a separate PR, as this one was large enough already.

@markmandel markmandel added kind/cleanup Refactoring code, fixing up documentation, etc area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc labels Jun 26, 2019
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: be7ed565-a2e4-4e2f-94e3-0f1c2ae9f2fa

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

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 106ea47c-b8c6-4567-896b-30eb032e94d4

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

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: a548563c-6e8f-49f5-aa68-4a380a827246

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/GoogleCloudPlatform/agones.git pull/856/head:pr_856 && git checkout pr_856
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-42e60dc

Copy link
Contributor

@pooneh-m pooneh-m left a comment

Choose a reason for hiding this comment

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

Thanks for getting rid of the FleetAllocation.
Should we remove vendor_fixes as well?


// utility functions

func getAllocation(f *stablev1alpha1.Fleet) *allocationv1alpha1.GameServerAllocation {
Copy link
Contributor

Choose a reason for hiding this comment

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

should it be part of framework.go?

Copy link
Member Author

Choose a reason for hiding this comment

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

That is a much better spot for it! Moving.

gsa := getAllocation(flt)
gsa, err = framework.AgonesClient.AllocationV1alpha1().GameServerAllocations(flt.ObjectMeta.Namespace).Create(gsa)
if !assert.Nil(t, err) {
assert.FailNow(t, "gameserverallocation could not be created")
Copy link
Contributor

@pooneh-m pooneh-m Jul 1, 2019

Choose a reason for hiding this comment

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

include err?

Copy link
Member Author

Choose a reason for hiding this comment

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

Switch to assert.NoError which will output the error message if it fails. NoError is a better choice (which i didn't realise until recently).

if !assert.Nil(t, err) {
assert.FailNow(t, "gameserverallocation could not be created")
}
assert.Equal(t, string(allocationv1alpha1.GameServerAllocationAllocated), string(gsa.Status.State))
Copy link
Contributor

@pooneh-m pooneh-m Jul 1, 2019

Choose a reason for hiding this comment

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

These 6 lines are repeated in multiple places, can you factor them out to a func call

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice. Implementing!

@@ -1,10 +1,10 @@
# Simple Allocator Service

This service provides an example of using the [Agones API](https://godoc.org/agones.dev/agones/pkg/client/clientset/versioned/typed/stable/v1alpha1) to allocate a GameServer from a Fleet, and is used in the [Create an Allocator Service (Go)](../../docs/create_allocator_service.md) tutorial.
This service provides an example of using the [Agones API](https://godoc.org/agones.dev/agones/pkg/client/clientset/versioned/typed/stable/v1alpha1) to allocate a GameServer from a Fleet, and is used in the [Create an Allocator Service (Go)](https://agones.dev/site/docs/tutorials/allocator-service-go/) tutorial.

## Allocator Service
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we get rid of this sample now that we have the proper game server allocator in place?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds like a plan for when the allocator is fully operational? It might be a bit premature now, WDYT?

(Insert Death Star references here 😄)

This removes Fleet Allocation implementations.

Removal of FleetAllocation docs will come in a separate PR, as this
one was large enough already.
@markmandel
Copy link
Member Author

Implemented fixes! Nice stuff.

Re: vendor_fixes - @ilkercelikyilmaz you will need to tell us if we can remove the cache.WaitForSync that is in the GameServer Ready cache code. WDYT Ilker?

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 39ebd0be-4fdf-4c4a-82b2-5bc8dd87ce45

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

@markmandel markmandel added this to the 0.12.0 milestone Jul 2, 2019
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 81974d3d-6f14-46ac-b261-5460a2df45e0

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/GoogleCloudPlatform/agones.git pull/856/head:pr_856 && git checkout pr_856
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-d171a90

@markmandel markmandel merged commit f85af70 into googleforgames:master Jul 2, 2019
@markmandel markmandel deleted the remove/fleetallocation branch July 2, 2019 18:35
@markmandel markmandel added the kind/breaking Breaking change label Aug 1, 2019
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 kind/breaking Breaking change kind/cleanup Refactoring code, fixing up documentation, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants