diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a96bcccae..c97483941 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,8 +68,8 @@ jobs: - name: Install nextest run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin - name: Build - run: cargo build -p qt -p quilkin -p xds --tests - - run: cargo nextest run -p qt -p quilkin -p xds quilkin + run: cargo build -p qt -p quilkin -p quilkin-xds --tests + - run: cargo nextest run -p qt -p quilkin -p quilkin-xds quilkin build: name: Build diff --git a/Cargo.lock b/Cargo.lock index cf32535ce..6e06ac4e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2367,6 +2367,7 @@ dependencies = [ "prost-types", "quilkin-macros", "quilkin-proto", + "quilkin-xds", "rand", "regex", "schemars", @@ -2397,7 +2398,6 @@ dependencies = [ "tryhard", "url", "uuid", - "xds", "xxhash-rust", ] @@ -2412,11 +2412,43 @@ dependencies = [ [[package]] name = "quilkin-proto" -version = "0.1.0" +version = "0.9.0" +dependencies = [ + "prost", + "prost-types", + "tonic", +] + +[[package]] +name = "quilkin-xds" +version = "0.9.0" dependencies = [ + "arc-swap", + "async-stream", + "cached", + "enum-map", + "eyre", + "fixedstr", + "futures", + "once_cell", + "parking_lot", + "prometheus", "prost", "prost-types", + "quilkin-proto", + "rand", + "schemars", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-stream", "tonic", + "tracing", + "tracing-futures", + "tryhard", + "url", + "uuid", ] [[package]] @@ -3843,38 +3875,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "xds" -version = "0.1.0" -dependencies = [ - "arc-swap", - "async-stream", - "cached", - "enum-map", - "eyre", - "fixedstr", - "futures", - "once_cell", - "parking_lot", - "prometheus", - "prost", - "prost-types", - "quilkin-proto", - "rand", - "schemars", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-stream", - "tonic", - "tracing", - "tracing-futures", - "tryhard", - "url", - "uuid", -] - [[package]] name = "xxhash-rust" version = "0.8.12" diff --git a/Cargo.toml b/Cargo.toml index a787e63f4..b493299b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -75,7 +75,7 @@ test = false [dependencies] # Local quilkin-macros = { version = "0.9.0", path = "./crates/macros" } -xds = { path = "crates/xds" } +quilkin-xds = {version = "0.9.0",path = "crates/xds" } quilkin-proto.workspace = true # Crates.io @@ -206,7 +206,7 @@ prometheus = { version = "0.13.3", default-features = false } prost = "0.12" prost-types = "0.12" quilkin = { path = "." } -quilkin-proto = { path = "crates/quilkin-proto" } +quilkin-proto = {version = "0.9.0", path = "crates/quilkin-proto" } rand = "0.8.5" regex = "1.9.6" serde = { version = "1.0.188", features = ["derive", "rc"] } diff --git a/build/templates/release-issue.md b/build/templates/release-issue.md index fbdc1c918..44b5fea0d 100644 --- a/build/templates/release-issue.md +++ b/build/templates/release-issue.md @@ -15,7 +15,11 @@ - [ ] Update Cargo version for release - [ ] Edit the `version` field in `./Cargo.toml` and remove the `-dev` suffix. - [ ] Edit the `quilkin-macros` dependency in `./Cargo.toml` and remove the `-dev` suffix. + - [ ] Edit the `quilkin-proto` dependency in `./Cargo.toml` and remove the `-dev` suffix. + - [ ] Edit the `quilkin-xds` dependency in `./Cargo.toml` and remove the `-dev` suffix. - [ ] Edit the `version` field in `./crates/macros/Cargo.toml` and remove the `-dev` suffix. + - [ ] Edit the `version` field in `./crates/quilkin-proto/Cargo.toml` and remove the `-dev` suffix. + - [ ] Edit the `version` field in `./crates/xds/Cargo.toml` and remove the `-dev` suffix. - [ ] cd to `./build/release` and run `make` to submit the cloud build - [ ] Download all the artifacts from the cloud build. - [ ] Review `license.html` to ensure that there aren't any new MPL, or CDDL dependencies from the last @@ -24,6 +28,9 @@ so that the source is archived in the container image. - [ ] Reset checklist back to "run `make` to submit the cloud build", and start from there again. - [ ] Run `cd crates/macros && cargo publish --dry-run --allow-dirty` and ensure there are no issues. +- [ ] Run `cd crates/quilkin-protos && cargo publish --dry-run --allow-dirty` and ensure there are no issues. +- [ ] Run `cd crates/xds && cargo publish --dry-run --allow-dirty` and ensure there are no issues. +- [ ] Run `cargo publish --dry-run --allow-dirty` and ensure there are no issues. - [ ] Run `cargo clippy` in the root directory, and ensure there are no issues. - [ ] Add a release item to README.md "Documentation" > "Releases" list with related links in reverse chronological order. @@ -53,8 +60,16 @@ `version`. - [ ] Edit the `quilkin-macros` dependency in `./Cargo.toml` and increment the [minor version](https://semver.org/) and apply the `-dev` suffix to the `version`. - - [ ] Edit the `version` field in `./macros/Cargo.toml`and increment the [minor version](https://semver.org/) + - [ ] Edit the `quilkin-protos` dependency in `./Cargo.toml` and increment the [minor version](https://semver.org/) and apply the `-dev` suffix to the `version`. + - [ ] Edit the `quilkin-xds` dependency in `./Cargo.toml` and increment the [minor version](https://semver.org/) + and apply the `-dev` suffix to the `version`. + - [ ] Edit the `version` field in `./crates/macros/Cargo.toml`and increment the [minor version](https://semver.org/) + and apply the `-dev` suffix to the `version`. + - [ ] Edit the `version` field in `./crates/quilkin-protos/Cargo.toml`and increment the [minor version](https://semver.org/) + and apply the `-dev` suffix to the `version`. + - [ ] Edit the `version` field in `./crates/xds/Cargo.toml`and increment the [minor version](https://semver.org/) + and apply the `-dev` suffix to the `version`. - [ ] Submit this change as a PR, and merge with approval. Congratulation! 🎉 You have successfully released Quilkin! diff --git a/crates/quilkin-proto/Cargo.toml b/crates/quilkin-proto/Cargo.toml index 13e5757ab..7d35d0be9 100644 --- a/crates/quilkin-proto/Cargo.toml +++ b/crates/quilkin-proto/Cargo.toml @@ -16,7 +16,10 @@ [package] name = "quilkin-proto" -version = "0.1.0" +version = "0.9.0" +description = "Quilkin is a non-transparent UDP proxy specifically designed for use with large scale multiplayer dedicated game server deployments, to ensure security, access control, telemetry data, metrics and more." +homepage = "https://github.com/googleforgames/quilkin" +repository = "https://github.com/googleforgames/quilkin" edition.workspace = true license.workspace = true diff --git a/crates/xds/Cargo.toml b/crates/xds/Cargo.toml index a6b2705d9..4e08d8062 100644 --- a/crates/xds/Cargo.toml +++ b/crates/xds/Cargo.toml @@ -1,6 +1,9 @@ [package] -name = "xds" -version = "0.1.0" +name = "quilkin-xds" +version = "0.9.0" +description = "Quilkin is a non-transparent UDP proxy specifically designed for use with large scale multiplayer dedicated game server deployments, to ensure security, access control, telemetry data, metrics and more." +homepage = "https://github.com/googleforgames/quilkin" +repository = "https://github.com/googleforgames/quilkin" edition.workspace = true license.workspace = true diff --git a/src/config.rs b/src/config.rs index dbc2c940a..c28fdd7d8 100644 --- a/src/config.rs +++ b/src/config.rs @@ -84,7 +84,7 @@ pub struct Config { pub datacenter: DatacenterConfig, } -impl xds::config::Configuration for Config { +impl quilkin_xds::config::Configuration for Config { fn identifier(&self) -> String { (*self.id.load()).clone() } @@ -99,14 +99,14 @@ impl xds::config::Configuration for Config { resources: Vec, removed_resources: &[String], remote_addr: Option, - ) -> xds::Result<()> { + ) -> quilkin_xds::Result<()> { self.apply_delta(type_url, resources, removed_resources, remote_addr) } fn delta_discovery_request( &self, - client_state: &xds::config::ClientState, - ) -> xds::Result { + client_state: &quilkin_xds::config::ClientState, + ) -> quilkin_xds::Result { self.delta_discovery_request(client_state) } @@ -120,7 +120,7 @@ impl xds::config::Configuration for Config { fn on_changed( &self, - control_plane: xds::server::ControlPlane, + control_plane: quilkin_xds::server::ControlPlane, ) -> impl std::future::Future + Send + 'static { let mut cluster_watcher = self.clusters.watch(); @@ -217,7 +217,7 @@ impl Config { /// from those of the client pub fn delta_discovery_request( &self, - client_state: &xds::config::ClientState, + client_state: &quilkin_xds::config::ClientState, ) -> crate::Result { let mut resources = Vec::new(); let mut removed = std::collections::HashSet::new(); @@ -331,7 +331,7 @@ impl Config { } let resource = crate::xds::Resource::Cluster( - xds::generated::quilkin::config::v1alpha1::Cluster { + quilkin_xds::generated::quilkin::config::v1alpha1::Cluster { locality: key.clone().map(|l| l.into()), endpoints: value.endpoints.iter().map(|ep| ep.into()).collect(), }, diff --git a/src/filters/token_router.rs b/src/filters/token_router.rs index 3ccf51415..9304a2f74 100644 --- a/src/filters/token_router.rs +++ b/src/filters/token_router.rs @@ -21,7 +21,7 @@ use crate::{ net::endpoint::metadata, }; -use xds::generated::quilkin::filters::token_router::v1alpha1 as proto; +use quilkin_xds::generated::quilkin::filters::token_router::v1alpha1 as proto; /// Filter that only allows packets to be passed to Endpoints that have a matching /// connection_id to the token stored in the Filter's dynamic metadata. diff --git a/src/net.rs b/src/net.rs index 2ef7d09e3..9562390c1 100644 --- a/src/net.rs +++ b/src/net.rs @@ -65,7 +65,7 @@ pub mod endpoint; pub(crate) mod maxmind_db; pub mod phoenix; -pub use xds; +pub use quilkin_xds as xds; pub use xds::net::TcpListener; use std::{ diff --git a/src/net/endpoint.rs b/src/net/endpoint.rs index 00c356eca..8557f69d7 100644 --- a/src/net/endpoint.rs +++ b/src/net/endpoint.rs @@ -28,7 +28,7 @@ pub use self::{ metadata::DynamicMetadata, }; -pub use xds::locality::Locality; +pub use quilkin_xds::locality::Locality; pub type EndpointMetadata = metadata::MetadataView; pub use base64_set::Set; diff --git a/src/xds.rs b/src/xds.rs index 10fed983d..1289c0113 100644 --- a/src/xds.rs +++ b/src/xds.rs @@ -14,7 +14,7 @@ * limitations under the License. */ -use ::xds::generated::quilkin::config::v1alpha1 as proto; +use ::quilkin_xds::generated::quilkin::config::v1alpha1 as proto; use prost::Message; use prost_types::Any;