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

User column csv import error #14302

Merged
merged 11 commits into from
Aug 2, 2024
Merged

Conversation

adrinr
Copy link
Collaborator

@adrinr adrinr commented Aug 2, 2024

Description

Fix importing user/users columns when exported as CSV. The current logic is handling CSV strings as JSON, but this is not true for our CSV exported objects. Adding some tests to check that the code works as expected.

The current export/import flow does:

  1. Export as CSV or JSON
  2. Import the file
  3. If it's a CSV, call the endpoint /csvtojson
  4. Validate the outputting json via /validateNewTableImport or /validateExistingTableImport
  5. Import the data via table or bulk row import

Because of this flow is highly dependent on the previous steps, we added a test that covers the full flow

Launchcontrol

Fix importing user/users data

Feature branch env

Feature Branch Link

@github-actions github-actions bot added firestorm Data/Infra/Revenue Team size/l labels Aug 2, 2024
@adrinr adrinr changed the title Budi 8396/user column csv import error User column csv import error Aug 2, 2024
@adrinr adrinr added the feature-branch Release this PR code into a feature branch label Aug 2, 2024
@adrinr adrinr marked this pull request as ready for review August 2, 2024 11:45
@adrinr adrinr requested a review from a team as a code owner August 2, 2024 11:45
@adrinr adrinr requested review from samwho and mike12345567 and removed request for a team August 2, 2024 11:45
@adrinr adrinr enabled auto-merge August 2, 2024 11:58
@@ -1849,6 +1851,202 @@ describe.each([
const results = JSON.parse(res)
expect(results.length).toEqual(3)
})

describe("should allow exporting all column types", () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Very nice to have a proper test case for this!

Copy link
Collaborator

@mike12345567 mike12345567 left a comment

Choose a reason for hiding this comment

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

Very nice work - great to have massively improved tests around exporting!

@adrinr adrinr merged commit 88ba546 into master Aug 2, 2024
12 checks passed
@adrinr adrinr deleted the BUDI-8396/user-column-csv-import-error branch August 2, 2024 12:20
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-branch Release this PR code into a feature branch firestorm Data/Infra/Revenue Team size/l
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants