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

--line-ending does not seem to do anything #3113

Closed
OscarTheGrinch opened this issue Nov 15, 2024 · 4 comments
Closed

--line-ending does not seem to do anything #3113

OscarTheGrinch opened this issue Nov 15, 2024 · 4 comments
Labels
more information required Issue requires more information or a response from the customer

Comments

@OscarTheGrinch
Copy link

Version information

PS C:\Projects\DigitalCore> sf version --verbose --json
{
  "architecture": "win32-x64",
  "cliVersion": "@salesforce/cli/2.65.8",
  "nodeVersion": "node-v20.8.1",
  "osVersion": "Windows_NT 10.0.19045",
  "rootPath": "C:\\Users\\JanvadH\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\cli",
  "shell": "powershell",
  "pluginVersions": [
    "@dxatscale/sfpowerscripts 25.5.3 (user) published 356 days ago (Fri Nov 24 2023)",
    "@jayree/sfdx-plugin-org 1.2.56 (user) published 145 days ago (Sun Jun 23 2024) (latest is 1.2.81)",
    "@oclif/plugin-autocomplete 3.2.7 (core)",
    "@oclif/plugin-commands 3.3.4 (user) published 188 days ago (Sat May 11 2024) (latest is 4.1.8)",
    "@oclif/plugin-help 5.2.17 (user) published 461 days ago (Sat Aug 12 2023) (latest is 6.2.16)",
    "@oclif/plugin-not-found 3.2.24 (core)",
    "@oclif/plugin-plugins 5.4.15 (core)",
    "@oclif/plugin-search 1.2.13 (core)",
    "@oclif/plugin-update 4.6.8 (core)",
    "@oclif/plugin-version 2.2.15 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.20 (core)",
    "@oclif/plugin-which 3.2.16 (core)",
    "@salesforce/cli 2.65.8 (core)",
    "apex 3.5.5 (core)",
    "api 1.3.1 (core)",
    "auth 3.6.70 (core)",
    "data 3.9.0 (core)",
    "deploy-retrieve 3.15.4 (core)",
    "info 3.4.15 (core)",
    "limits 3.3.37 (core)",
    "marketplace 1.3.2 (core)",
    "org 5.0.2 (core)",
    "packaging 2.4.6 (user) published 161 days ago (Thu Jun 06 2024) (latest is 2.9.0)",
    "schema 3.3.39 (core)",
    "settings 2.4.2 (core)",
    "signups 2.3.12 (user) published 153 days ago (Sat Jun 15 2024) (latest is 2.6.3)",
    "sobject 1.4.44 (core)",
    "telemetry 3.6.18 (core)",
    "templates 56.3.26 (core)",
    "trust 3.7.38 (core)",
    "user 3.6.0 (core)",
    "sfdmu 4.33.17 (user) published 197 days ago (Thu May 02 2024) (latest is 4.36.7)",
    "sfdx-git-delta 5.40.2 (user) published 155 days ago (Thu Jun 13 2024) (latest is 5.49.4)"
  ]
}

Goal

I want to insert records using sf data import bulk from a CSV file.

Issue

We are running Windows. The CSV file uses LF line endings. The CLI does not recognize this, and attempts to upload the file using CRLF endings, which causes a mismatch issue. Rerunning the import command using the --line-ending LF flag does not affect the behavior of the CLI, and we receive the same error telling us that it's trying to use CRLF endings during upload, which causes an error.

Error message:

PS C:\Projects\DigitalCore> sf data import bulk -o orgName -f fileWithLfLineEndings.csv --line-ending LF
───────────────── Importing data ─────────────────
 
✔ Creating ingest job 3.06s
✘ Processing the job 5.58s
   ▸ Processed records: ✘
   ▸ Successful records: ✘
   ▸ Failed records: ✘
/lightning/setup/AsyncApiJobStatus/page?address=%2F750QI00000BCEbxYAH)
Elapsed Time: 9.04s
 
Error (JobFailedError): Job failed to be processed due to:
 
ClientInputError : LineEnding is invalid on user data. Current LineEnding setting is CRLF
 
To review the details of this job, run this command:
 
sf org open --target-org [email protected] --path "/lightning/setup/AsyncApiJobStatus/page?address=%2F750QI00000BCEbxY

Workaround

We are able to work around this issue by changing the line endings in the CSV file to CRLF using a text editor or shell utility.

Expected behaviour

The --line-ending LF flag causes the CLI to perform an upload using LF line endings, instead of ignoring it and using CRLF all the time.

Additional info

The help info for the command contains a typo:

--line-ending=<option>  Line ending used in the CSV file. Default value on Windows is `CRLF`; on macOS and Linux it's `LR`.
                              <options: CRLF|LF>

Presumably 'LR' should be 'LF'.

@OscarTheGrinch OscarTheGrinch added the investigating We're actively investigating this issue label Nov 15, 2024
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

Copy link

Hello @OscarTheGrinch 👋 None of the versions of sf you shared match the latest release.

Shared: 2.65.8
Latest: 2.66.7

Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue.
You can also try the rc and nightly releases! (docs)

After updating, share the full output of sf version --verbose --json

@github-actions github-actions bot added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Nov 15, 2024
@WillieRuemmele
Copy link
Member

Hey @OscarTheGrinch - we're aware, and already working on the fix!

@OscarTheGrinch
Copy link
Author

Hi @WillieRuemmele , thanks for the lightning fast response! (Pun somewhat intended) In that case I'll close this ticket, and watch the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more information required Issue requires more information or a response from the customer
Projects
None yet
Development

No branches or pull requests

2 participants