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

Fix intent telemetry #6779

Merged
merged 3 commits into from
Jan 24, 2025
Merged

Fix intent telemetry #6779

merged 3 commits into from
Jan 24, 2025

Conversation

janhartman
Copy link
Contributor

@janhartman janhartman commented Jan 23, 2025

This fixes a regression in the intent telemetry (described here, originally fixed in #6637).
Two fixes:

  • we weren't using the right fields in commonProps, meaning that the values weren't assigned to the message and thus weren't accessible in the chat controller where we emit metadata.
  • we were accidentally overriding the userSpecifiedIntent field with auto because of operator precedence.

We now get the correct data emitted in the chat/executed telemetry events.

Backport

I want to backport this to vscode-1.64 and jb-7.12.
Why? Telemetry data will help us improve intent detection significantly and it's important we have the pipeline functioning well at launch. Furthermore, the changes are quite low-risk.

Test plan

Tested manually.

@jtibshirani
Copy link
Member

Thanks for fixing this again! Is this possible to unit test? Or do we have any telemetry integration tests we could extend? (Testing is likely on everyone's mind since you had to fix this not once, but twice :))

@janhartman
Copy link
Contributor Author

Thanks for fixing this again! Is this possible to unit test? Or do we have any telemetry integration tests we could extend? (Testing is likely on everyone's mind since you had to fix this not once, but twice :))

I'll take a look at what we can do. I agree that a test would be really nice.

@janhartman janhartman merged commit 1049a20 into main Jan 24, 2025
22 of 23 checks passed
@janhartman janhartman deleted the jan/fix-intent-telemetry-again branch January 24, 2025 10:12
@sourcegraph-release-bot
Copy link
Collaborator

sourcegraph-release-bot commented Jan 24, 2025

The backport to vscode-v1.64.x failed at https://github.com/sourcegraph/cody/actions/runs/12947571223:

The process '/usr/bin/git' failed with exit code 1

To backport this PR manually, you can either:

Via the sg tool

Use the sg backport command to backport your commit to the release branch.

sg backport -r vscode-v1.64.x -p 6779
Via your terminal

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-vscode-v1.64.x vscode-v1.64.x
# Navigate to the new working tree
cd .worktrees/backport-vscode-v1.64.x
# Create a new branch
git switch --create backport-6779-to-vscode-v1.64.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 1049a20b2acb3b07d5db90d911b9622920ca67b8
# Push it to GitHub
git push --set-upstream origin backport-6779-to-vscode-v1.64.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-vscode-v1.64.x

If you encouter conflict, first resolve the conflict and stage all files, then run the commands below:

git cherry-pick --continue
# Push it to GitHub
git push --set-upstream origin backport-6779-to-vscode-v1.64.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-vscode-v1.64.x
  • Follow above instructions to backport the commit.
  • Create a pull request where the base branch is vscode-v1.64.x and the compare/head branch is backport-6779-to-vscode-v1.64.x., click here to create the pull request.

Once the pull request has been created, please ensure the following:

  • Make sure to tag @sourcegraph/release in the pull request description.

  • kindly remove the release-blocker from this pull request.

@sourcegraph-release-bot
Copy link
Collaborator

The backport to jb-v7.12.x failed at https://github.com/sourcegraph/cody/actions/runs/12947571223:

The process '/usr/bin/git' failed with exit code 1

To backport this PR manually, you can either:

Via the sg tool

Use the sg backport command to backport your commit to the release branch.

sg backport -r jb-v7.12.x -p 6779
Via your terminal

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-jb-v7.12.x jb-v7.12.x
# Navigate to the new working tree
cd .worktrees/backport-jb-v7.12.x
# Create a new branch
git switch --create backport-6779-to-jb-v7.12.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 1049a20b2acb3b07d5db90d911b9622920ca67b8
# Push it to GitHub
git push --set-upstream origin backport-6779-to-jb-v7.12.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-jb-v7.12.x

If you encouter conflict, first resolve the conflict and stage all files, then run the commands below:

git cherry-pick --continue
# Push it to GitHub
git push --set-upstream origin backport-6779-to-jb-v7.12.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-jb-v7.12.x
  • Follow above instructions to backport the commit.
  • Create a pull request where the base branch is jb-v7.12.x and the compare/head branch is backport-6779-to-jb-v7.12.x., click here to create the pull request.

Once the pull request has been created, please ensure the following:

  • Make sure to tag @sourcegraph/release in the pull request description.

  • kindly remove the release-blocker from this pull request.

janhartman added a commit that referenced this pull request Jan 24, 2025
This fixes a regression in the intent telemetry (described
[here](https://linear.app/sourcegraph/issue/SPLF-330), originally fixed
in #6637).
Two fixes:
- we weren't using the right fields in `commonProps`, meaning that the
values weren't assigned to the message and thus weren't accessible in
the chat controller where we emit metadata.
- we were accidentally overriding the `userSpecifiedIntent` field with
`auto` because of operator precedence.

We now get the correct data emitted in the `chat/executed` telemetry
events.

I want to backport this to vscode-1.64 and jb-7.12.
Why? Telemetry data will help us improve intent detection significantly
and it's important we have the pipeline functioning well at launch.
Furthermore, the changes are quite low-risk.

Tested manually.

(cherry picked from commit 1049a20)
janhartman added a commit that referenced this pull request Jan 24, 2025
This fixes a regression in the intent telemetry (described
[here](https://linear.app/sourcegraph/issue/SPLF-330), originally fixed
in #6637).
Two fixes:
- we weren't using the right fields in `commonProps`, meaning that the
values weren't assigned to the message and thus weren't accessible in
the chat controller where we emit metadata.
- we were accidentally overriding the `userSpecifiedIntent` field with
`auto` because of operator precedence.

We now get the correct data emitted in the `chat/executed` telemetry
events.

I want to backport this to vscode-1.64 and jb-7.12.
Why? Telemetry data will help us improve intent detection significantly
and it's important we have the pipeline functioning well at launch.
Furthermore, the changes are quite low-risk.

Tested manually.

(cherry picked from commit 1049a20)
janhartman added a commit that referenced this pull request Jan 24, 2025
This fixes a regression in the intent telemetry (described
[here](https://linear.app/sourcegraph/issue/SPLF-330), originally fixed
in #6637). Two fixes:
- we weren't using the right fields in `commonProps`, meaning that the
values weren't assigned to the message and thus weren't accessible in
the chat controller where we emit metadata.
- we were accidentally overriding the `userSpecifiedIntent` field with
`auto` because of operator precedence.

We now get the correct data emitted in the `chat/executed` telemetry
events.

I want to backport this to vscode-1.64 and jb-7.12. Why? Telemetry data
will help us improve intent detection significantly and it's important
we have the pipeline functioning well at launch. Furthermore, the
changes are quite low-risk.


## Test plan
Tested manually.

(cherry picked from commit 1049a20)
janhartman added a commit that referenced this pull request Jan 24, 2025
This fixes a regression in the intent telemetry (described
[here](https://linear.app/sourcegraph/issue/SPLF-330), originally fixed
in #6637). Two fixes:
- we weren't using the right fields in `commonProps`, meaning that the
values weren't assigned to the message and thus weren't accessible in
the chat controller where we emit metadata.
- we were accidentally overriding the `userSpecifiedIntent` field with
`auto` because of operator precedence.

We now get the correct data emitted in the `chat/executed` telemetry
events.

I want to backport this to vscode-1.64 and jb-7.12. Why? Telemetry data
will help us improve intent detection significantly and it's important
we have the pipeline functioning well at launch. Furthermore, the
changes are quite low-risk.



## Test plan
Tested manually.

(cherry picked from commit 1049a20)
taiyab pushed a commit that referenced this pull request Jan 27, 2025
This fixes a regression in the intent telemetry (described
[here](https://linear.app/sourcegraph/issue/SPLF-330), originally fixed
in #6637).
Two fixes:
- we weren't using the right fields in `commonProps`, meaning that the
values weren't assigned to the message and thus weren't accessible in
the chat controller where we emit metadata.
- we were accidentally overriding the `userSpecifiedIntent` field with
`auto` because of operator precedence.

We now get the correct data emitted in the `chat/executed` telemetry
events.

## Backport
I want to backport this to vscode-1.64 and jb-7.12.
Why? Telemetry data will help us improve intent detection significantly
and it's important we have the pipeline functioning well at launch.
Furthermore, the changes are quite low-risk.

## Test plan
Tested manually.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants