Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: Get allowlist answers from both breadcrumb data and answers #2838
fix: Get allowlist answers from both breadcrumb data and answers #2838
Changes from all commits
f1b8ce4
c612d44
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having a brief look at the
analytics_logs
I think as the data structure there'll now be a mismatch between current and old data i.e. array of values vs array of objects:Although seeing as we haven't been tracking
allow_list_list
I wonder if we can just crack on?Otherwise I think it would be possible to update historical data using the
node_fn
value as the key 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep - good point. First thought would be to ignore this as it's a new column, however having data in different formats in the column would prove tricky to query so we might as well do this properly!
There's more logs populated than expected already on production, so I think clearing older logs is not really a solution here.
I've tested the following SQL locally which will convert the column. Could you please review and manually test the SQL below @Mike-Heneghan before we run on production (once this change has gone to prod).
To select rows with the "old" data format -
And then this to update "old" → "new" -
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Daf, I think there's something not quite right based on my local testing.
The
SELECT
works as expected:Although fetching the same records again post
UPDATE
:It appears it doesn't group the values against the key and also looks like every record has become an amalgamation of the rest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha! That doesn't match my results - I maybe just had a simple use case 😅 Let me take another look!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries! This sort of stuff is really fiddly, please let me know when you want me to retest 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this maybe has the same issue based on my testing 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I get it sorry - I'm just testing on a single record 🤦
Probably just needs and id=id clause. Taking a look and thanks for testing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey sorry for the slow turnaround here @Mike-Heneghan
Clause added and highlighted with comment -
Getting expected results here, but as always would love another pair of eyes 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working as expected for me ✅
I regret not adding an order by to my query used to check results 😅
Although, comparing the updates are made as expected for me and it doesn't affect the data already in the new structure 🥳
Before:
After:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah perfect - honestly thanks again for being so on-point with testing here, really helped! 🙌