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

[Telemetry] KubeRay version and CRD #2024

Merged
merged 3 commits into from
Mar 19, 2024

Conversation

kevin85421
Copy link
Member

@kevin85421 kevin85421 commented Mar 16, 2024

Why are these changes needed?

Screen Shot 2024-03-16 at 12 19 23 AM

Related issue number

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

@kevin85421 kevin85421 marked this pull request as ready for review March 16, 2024 07:20
@kevin85421 kevin85421 requested a review from jjyao March 16, 2024 07:20
@@ -629,6 +629,13 @@ func setContainerEnvVars(pod *corev1.Pod, rayNodeType rayv1.RayNodeType, rayStar
usageEnv := corev1.EnvVar{Name: utils.RAY_USAGE_STATS_KUBERAY_IN_USE, Value: "1"}
container.Env = append(container.Env, usageEnv)
}
if rayNodeType == rayv1.HeadNode {
extraTagsEnv := corev1.EnvVar{
Name: utils.RAY_USAGE_STATS_EXTRA_TAGS,
Copy link
Member Author

Choose a reason for hiding this comment

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

Do we need to inject this env var to worker nodes? @jjyao

Copy link
Contributor

Choose a reason for hiding this comment

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

No, head node is enough.

@@ -37,11 +37,8 @@ import (
)

var (
_version_ = "0.2"
Copy link
Member Author

Choose a reason for hiding this comment

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

The changes in this file are unrelated to the telemetry. I simply deleted some unused code.

@kevin85421 kevin85421 assigned kevin85421 and jjyao and unassigned jjyao Mar 18, 2024
Copy link
Contributor

@jjyao jjyao left a comment

Choose a reason for hiding this comment

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

Let's test it manually

if rayNodeType == rayv1.HeadNode {
extraTagsEnv := corev1.EnvVar{
Name: utils.RAY_USAGE_STATS_EXTRA_TAGS,
Value: fmt.Sprintf("kuberay_version=%s,crd=%s", utils.KUBERAY_VERSION, string(creatorCRDType)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's make the key kuberay_version and kuberay_crd

Signed-off-by: kaihsun <kaihsun@anyscale.com>
@kevin85421 kevin85421 merged commit f3f46cd into ray-project:master Mar 19, 2024
23 checks passed
kevin85421 added a commit to kevin85421/kuberay that referenced this pull request Mar 22, 2024
@@ -167,6 +168,9 @@ const (

// RayNodeHeadGroupLabelValue is the value for the RayNodeGroupLabelKey label on a head node
RayNodeHeadGroupLabelValue = "headgroup"

// Telemetry
KUBERAY_VERSION = "nightly"
Copy link
Contributor

Choose a reason for hiding this comment

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

@kevin85421 since this is defined as a constant, it will always be nightly instead of the actual kuberay version. Is that expected or am I missing something?

Copy link
Member Author

Choose a reason for hiding this comment

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

I opened a PR to the release branch to update it #2036.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, gotcha. I opeend #2042 to also include this constant in the user-agent

It's a minor change, no need to cherry-pick to 1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants