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

TDL-15317: Fix Primary Key for Feature Events #48

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

savan-chovatiya
Copy link
Contributor

Description of change

TDL-15149: Use correct PK for feature_events stream

Manual QA steps

Risks

Rollback steps

  • revert this branch

@savan-chovatiya savan-chovatiya changed the base branch from crest-develop to master September 27, 2021 13:00

def __init__(self, config):
super().__init__(config=config)
self.key_properties.append("day" if self.period == 'dayRange' else "hour")
Copy link
Contributor

Choose a reason for hiding this comment

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

@savan-chovatiya can you please write a unit test case for the same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added unit tests for the key_properties.

@karanpanchal-crest karanpanchal-crest self-requested a review October 7, 2021 19:19
@savan-chovatiya
Copy link
Contributor Author

CircleCI build is failing currently as we have added a standard discover test to verify updated primary key but replication keys are not with expected inclusion currently. The replication key with valid inclusion is fixed as part of #45 .

self.assertEqual(feature_event_stream1.key_properties, expected_primary_keys)

# Reset key properties for other test as it's class variable
FeatureEvents.key_properties = ['feature_id', 'visitor_id', 'account_id', 'server', 'remote_ip', 'user_agent']
Copy link
Contributor

Choose a reason for hiding this comment

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

@savan-chovatiya Test cases should not be dependent on each other.
Please include this statement at the starting of the next test case which requires this class variable in the reset mode

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 removed that comment and initialize key_properties with the default value at the start of the test.

self.assertEqual(feature_event_stream2.key_properties, expected_primary_keys)

# Reset key properties for other test as it's class variable
FeatureEvents.key_properties = ['feature_id', 'visitor_id', 'account_id', 'server', 'remote_ip', 'user_agent']
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above

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 removed that comment and initialize key_properties with the default value at the start of the test.

@karanpanchal-crest
Copy link
Contributor

CircleCI build is failing currently as we have added a standard discover test to verify updated primary key but replication keys are not with expected inclusion currently. The replication key with valid inclusion is fixed as part of #45 .

This PR is dependent on PR [#45](This PR is dependent on PR #45)

@hpatel41 hpatel41 marked this pull request as draft November 22, 2021 08:28
@dbshah1212 dbshah1212 marked this pull request as ready for review November 22, 2021 13:52
@hpatel41 hpatel41 marked this pull request as draft December 1, 2021 07:37
@hpatel41 hpatel41 marked this pull request as ready for review December 1, 2021 09:25
@KrisPersonal
Copy link
Contributor

  1. Code Walk through required
  2. Manual testing demo required

Copy link
Contributor

@KrisPersonal KrisPersonal left a comment

Choose a reason for hiding this comment

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

  1. Code Walk through required
  2. Manual testing demo required

Copy link
Contributor

@kspeer825 kspeer825 left a comment

Choose a reason for hiding this comment

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

Given the change in replication key, I think the tap-tester bookmarks test should be updated to cover this hour key in addition to the default of day.

@hpatel41
Copy link
Contributor

hpatel41 commented Dec 7, 2021

@kspeer825 Updated the bookmark test to cover dayRange and hourRange

@hpatel41 hpatel41 requested a review from kspeer825 December 7, 2021 11:11
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.

6 participants