Skip to content

fix: fix bad index in compare metadata workflow #31208

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

Merged
merged 1 commit into from
Apr 14, 2025
Merged

Conversation

pl
Copy link
Contributor

@pl pl commented Apr 14, 2025

Important

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Problem

The session field index offset was off by 1 in the compare metadata task causing exceptions.

Changes

Removes the team id from the fields to check, so that the index is correct again.

Does this work well for both Cloud and self-hosted?

N/A

How did you test this code?

Will test on prod.

@pl pl requested a review from a team April 14, 2025 22:14
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR fixes an index offset issue in the session recording metadata comparison workflow by removing 'team_id' from the FIELD_NAMES list.

  • Fixed indexing in compare_recording_metadata_workflow.py by removing 'team_id' from FIELD_NAMES to correctly align with the SQL query results structure
  • The code uses FIELD_NAMES.index() + 2 to account for session_id and team_id being at positions 0 and 1 in query results
  • This change prevents exceptions when comparing session recording metadata between v1 and v2 storage backends

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@pl pl merged commit 3aa22fb into master Apr 14, 2025
95 checks passed
@pl pl deleted the pl/mrbv2/fix_compare_index branch April 14, 2025 22:51
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.

1 participant