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 parametric host address #3111

Merged
merged 1 commit into from
May 18, 2023
Merged

Add parametric host address #3111

merged 1 commit into from
May 18, 2023

Conversation

MiniaczQ
Copy link
Contributor

@MiniaczQ MiniaczQ commented Apr 19, 2023

Currently it's only possible to set the port, which is problematic when testing in docker.
This PR replaces the parametric port to URL.

@google-cla
Copy link

google-cla bot commented Apr 19, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@MiniaczQ MiniaczQ changed the title feat: parametric host address Add parametric host address Apr 19, 2023
@MiniaczQ MiniaczQ force-pushed the main branch 2 times, most recently from 4646302 to f5c97f2 Compare April 19, 2023 11:32
@google-oss-prow google-oss-prow bot added size/M and removed size/S labels Apr 19, 2023
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 2502e708-7352-4310-a7c2-a76bacf455d6

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/3111/head:pr_3111 && git checkout pr_3111
  • helm install agones ./install/helm/agones --namespace agones-system --agones.image.release=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.32.0-fbfc4cf-amd64

@zmerlynn
Copy link
Collaborator

Hi! Thanks for your contribution! As indicated in #3111 (comment), we need a signed CLA to accept this - thanks!

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 6150ddcc-d152-401a-9b28-5285ba44f07b

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/3111/head:pr_3111 && git checkout pr_3111
  • helm install agones ./install/helm/agones --namespace agones-system --agones.image.release=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.32.0-d64291c-amd64

@markmandel
Copy link
Member

This keeps coming up with a few SDKs - at this point, we should probably just allow it though.

As a review item - this change should also be documented please.

Self::new_internal(addr, keep_alive).await
}

pub async fn new_with_host(
Copy link
Member

Choose a reason for hiding this comment

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

🤔 should this be wrapped in new ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a new method to not break the existing API, but I'd rather have just one method new

Copy link
Member

Choose a reason for hiding this comment

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

Since it has a default that is backward compatible, I think it's fine to have just the new method? Unless I am missing something in the details?

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 26575ef6-a563-494a-b57b-31a88a674e8f

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

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 1aa104d1-be5e-4ade-bfc3-57d7e837e5f0

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

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 18912702-d482-4b54-aec3-d40340b4594e

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/3111/head:pr_3111 && git checkout pr_3111
  • helm install agones ./install/helm/agones --namespace agones-system --agones.image.release=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.32.0-66c0a58-amd64

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 4f094373-be99-4b2c-b3ea-af11c6a410a6

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

@markmandel
Copy link
Member

OIC - the new method was not backward compatible - sorry, I missed that. So I see the error now in our sdk conformance tests:

   Compiling hyper-timeout v0.4.1
   Compiling tonic v0.5.2
   Compiling rust-simple v0.2.0 (/go/src/agones.dev/agones/test/sdk/rust)
error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> src/main.rs:296:9
    |
296 |         agones::Sdk::new(None /* default port */, None /* keep_alive */),
    |         ^^^^^^^^^^^^^^^^ ----                     ---- supplied 2 arguments
    |         |
    |         expected 3 arguments
    |
note: associated function defined here
   --> /go/src/agones.dev/agones/sdks/rust/src/sdk.rs:51:18
    |
51  |     pub async fn new(
    |                  ^^^

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
  --> src/main.rs:48:9
   |
48 |         agones::Sdk::new(None /* default port */, None /* keep_alive */)
   |         ^^^^^^^^^^^^^^^^ ----                     ---- supplied 2 arguments
   |         |
   |         expected 3 arguments
   |
note: associated function defined here
  --> /go/src/agones.dev/agones/sdks/rust/src/sdk.rs:51:18
   |
51 |     pub async fn new(
   |                  ^^^

For more information about this error, try `rustc --explain E0061`.
error: could not compile `rust-simple` due to 2 previous errors

So yeah - two methods may be the better option - sorry about that. I thought it was just using the env vars, I missed the arguments that got passed in.

@MiniaczQ
Copy link
Contributor Author

Bump.
Are there any other problems with this PR?

@zmerlynn
Copy link
Collaborator

@MiniaczQ @markmandel is OoO right now - I will see if we have anyone else comfortable approving a Rust PR.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: bb7cc211-50d7-4e0a-b1a2-d9e1a0e921ed

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

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 8738104f-d9d8-4ee4-a13d-0d615daf2ced

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/3111/head:pr_3111 && git checkout pr_3111
  • helm install agones ./install/helm/agones --namespace agones-system --agones.image.release=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.32.0-5add18c-amd64

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 491eff51-d173-4b4d-8cf2-5a7af69c109f

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

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: MiniaczQ, zmerlynn
Once this PR has been reviewed and has the lgtm label, please assign ericfortin for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zmerlynn zmerlynn enabled auto-merge (squash) May 17, 2023 23:45
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: d95d4b94-c379-43c3-990f-a98bb82645ce

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/3111/head:pr_3111 && git checkout pr_3111
  • helm install agones ./install/helm/agones --namespace agones-system --agones.image.release=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.32.0-319818b-amd64

@zmerlynn zmerlynn merged commit 4408cfc into googleforgames:main May 18, 2023
@Kalaiselvi84 Kalaiselvi84 added the kind/feature New features for Agones label May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New features for Agones lgtm size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants