Skip to content

Fixes #36457, #36458, #36459: keep CSV import rows and versions; drop the year-0001 life cycle placeholder - #36562

Merged
yan-3005 merged 8 commits into
mainfrom
fix/csv-import-history-lifecycle-placeholder
Nov 2, 2026
Merged

yan-3005 merged 8 commits into
mainfrom
fix/csv-import-history-lifecycle-placeholder

Conversation

@yan-3005

@yan-3005 yan-3005 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #36457
Fixes #36458
Fixes #36459

Three fixes found while testing the 2.1 creation audit, one commit each.

#36457: CSV import rows with mixed line endings. Papaparse infers one line separator per file, so an exported file (CRLF) with rows added in another editor (LF) fused the added rows into their neighbours in the bulk import grid. BulkEntityImportPage now normalises the line breaks that end rows to LF before parsing (normalizeCsvLineBreaks). Line breaks inside quoted cells are left as they are. The classic EntityImport screen sends the file to the server unparsed, and Commons CSV already handles mixed endings, so it is unchanged.

#36458: CSV import update keeps the version it replaces. updateManyEntitiesForImport now stores each replaced entity as a history row, in the same transaction and before the row update (the order storeUpdate uses). The row holds the relationships a PUT or PATCH records, hydrated with setFieldsInBulk(putFields, …) on deep copies. The imported entity gets a change description that starts from the stored version and keeps the per-field change summary, so the importer's own edit within the session consolidates against that version. The history write is shared with writeBulkVersionHistory (storeVersionHistory), and history goes through serializeForVersionHistory, so per-type secret stripping applies unchanged.

#36459: year-0001 lifeCycle placeholder. prepareInternal drops any created, updated or accessed aspect timestamped before 1970, and drops the life cycle when nothing remains. A timestamp of 0 is kept and nothing is rejected, so older clients keep working. A PATCH whose life cycle carries only placeholders keeps the stored life cycle (preparePatched), because older clients replace the whole field through patch_life_cycle. The table header hides a pre-epoch creation time stored before this rule. Recorded in ADR:2026-10-29-lifecycle-timestamps-before-the-epoch-are-dropped-on-write.

Type of change:

  • Bug fix

High-level design:

N/A: three bug fixes, each one commit; the design notes are in the description above and in the ADR.

Tests:

Use cases covered

  • Upload a schema CSV whose exported rows end in CRLF and whose added rows end in LF: every row appears in the grid, passes validation and is imported.
  • A quoted description containing CRLF survives normalisation unchanged.
  • Admin creates a table (0.1), its owner edits (0.2), the ingestion bot edits (0.3), admin updates it by CSV import: history is 0.4, 0.3, 0.2, 0.1, and 0.3 keeps its description, author, owner and tag.
  • The importer edits again within the session: history stays 0.4, 0.3, 0.2, 0.1. Another user edits: 0.5, 0.4, 0.3, 0.2, 0.1, with owner and tag intact.
  • A PATCH with lifeCycle.created = -62135596800000: no created time stored, version unchanged. Mixed with a real accessed: the placeholder is dropped and accessed kept. A placeholder-only PATCH on an entity with stored accessed: accessed kept.
  • Table header: shows a real creation time, hides a missing one, hides the placeholder.

Unit tests

  • LifeCyclesTest (new): 8 passed, 0 failed.
  • Jest: CSVPureUtils.test.ts, DataAssetsHeader.utils.test.tsx, BulkEntityImportPage.test.tsx, components/common/EntityImport/**: 10 suites, 120 passed, 0 failed.
    • The new BulkEntityImportPage case fails with the normalizeCsvLineBreaks call removed (checked).

Backend integration tests

  • I added integration tests in openmetadata-integration-tests/.
  • DatabaseSchemaResourceIT.test_importCsv_updateKeepsVersionHistory (new). It fails on main with table instance for … and version 0.3 not found, and passes with this change.
  • BaseEntityIT.patch_entityLifeCyclePlaceholderTimestampIsDropped (new, runs for every entity IT; it exercises the 14 entity types that support lifeCycle).

Run locally, each with -Dit.test=…:

Lane Selection Result
mysql-elasticsearch *IT#patch_entityLifeCyclePlaceholderTimestampIsDropped+test_importCsv_updateKeepsVersionHistory 63 classes, 64 run, 0 failures
postgres-elasticsearch same 63 classes, 64 run, 0 failures
mysql-elasticsearch DatabaseSchemaResourceIT, ChangeSummaryResourceIT, EntityUpdateLockOrderIT, GlossaryCsvRelationTypesIT, CsvAsyncJobResourceIT, MetricResourceIT 536 run, 1 failure, 37 skipped (see below)

The one failure is CsvAsyncJobResourceIT.test_exportResultIsInTheJobRowAndNotOnLocalDisk. The same class fails 6 of 16 on clean main (f99f67a953) on the same machine, with the same 404 and "job row must hold the compressed payload" errors, so it is not caused by this change.

Not run locally: the rest of the impact-mapped IT list. EntityRepository.java maps to the whole suite; the merge queue runs it.

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • I added Playwright E2E tests: TableCreationTime.spec.ts, "drops the year-0001 placeholder and keeps the other life cycle times".

Run locally against this branch (API :8590, Vite :3090), PLAYWRIGHT_IS_OSS=true, 2 workers:

Spec(s) Code Result
BulkImport, BulkImportWithDotInName, BulkEditEntity, GlossaryImportExport, ClassificationImportExport, MetricBulkImportExportEdit, CsvJobsTray before the self-review fixes 85 passed, 0 failed
TestCaseImportExportBasic before the self-review fixes 27 passed, 0 failed
TableCreationTime (with the new case) before the self-review fixes 6 passed, 0 failed
All of the above final commit 25f32642e3 34 passed, 0 failed when the run was interrupted by a local session restart; the rerun of BulkImport and TableCreationTime is recorded in a comment below

The self-review fixes changed normalizeCsvLineBreaks (quote-aware), reverted EntityImport.component.tsx to main, and kept the stored life cycle on a placeholder-only PATCH. Jest and the ITs above cover those directly.

TestCaseImportExportBasic needs the sample_data.ecommerce_db.shopify.dim_address table that CI ingests. Locally it was created from ingestion/examples/sample_data before the run.

Not run: the other specs make playwright_affected lists (domain isolation, search, lineage, navbar, policies, …). They appear because EntityRepository.java and DataAssetsHeader.utils.tsx are unmapped, and they do not exercise the changed code.

Manual testing performed

  1. Built this branch and started OpenMetadataApplication on its own MySQL database and ES alias, with the UI from Vite.
  2. Seeded a retail_analytics.retail_dw.sales schema. Meera (owner) and Arjun (DataSteward) edited carrier_invoices.
  3. Exported the schema CSV, changed the table's description, appended a table row and a column row with LF endings, and uploaded it through Import. The grid and validation showed 5 of 5 rows; returns_ledger and its column were created.
  4. Versions panel: v0.1 → v0.4 with Arjun's v0.3 intact. An admin edit kept 0.4; Meera's edit made 0.5.
  5. As the ingestion bot, PATCHed a table with the year-0001 created and a real accessed. The API stored only accessed, and the header shows no created time; a table with a real creation time still shows it.

Screenshots

Taken on this branch's build before the self-review fixes; those fixes change only quoted cells and the placeholder-only PATCH, so the behaviour shown is unchanged.

#36457: 4 CRLF rows plus 2 LF rows; the import grid shows all 5 data rows, including the LF-added returns_ledger and its column

#36457: 4 CRLF rows plus 2 LF rows; the import grid shows all 5 data rows, including the LF-added returns_ledger and its column

#36457: validation passes every row

#36457: validation passes every row

#36458: after the CSV import the history is 0.4, 0.3, 0.2, 0.1, and 0.3 keeps its description, owner and tag

#36458: after the CSV import the history is 0.4, 0.3, 0.2, 0.1, and 0.3 keeps its description, owner and tag

#36458: version 0.3 (Arjun) still opens in the versions view after the import

#36458: version 0.3 (Arjun) still opens in the versions view after the import

#36458: an admin edit straight after the import merged into 0.4, then Meera's edit made 0.5; every version is listed

#36458: an admin edit straight after the import merged into 0.4, then Meera's edit made 0.5; every version is listed

#36459: a PATCH with the year-0001 created time and a real accessed time stores only accessed

#36459: a PATCH with the year-0001 created time and a real accessed time stores only accessed

#36459: the table header shows no year-0001 created time

#36459: the table header shows no year-0001 created time

#36459: a table with a real creation time still shows it

#36459: a table with a real creation time still shows it

UI screen recording:

Not applicable: bug fixes, not a UI feature. The UI changes are the import parser and hiding an invalid date.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: not applicable, no schema change.
  • For a UI feature or feature task: not applicable, bug fixes.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: I reviewed the final diff against REVIEW.md (the pr-checklist skill runs it) and fixed every 🔴 finding, or answered it on the line below.
    • Reviewed 25f32642e3. Fixed one 🔴: a placeholder-only PATCH removed a stored life cycle, so preparePatched now keeps it, with a test. Also fixed: the UI wiring test, the quote-aware normaliser, the EntityImport revert, a papaparse-only test, and a Javadoc. No 🔴 is open.
  • Decision check: docs/decisions/2026-10-29-lifecycle-timestamps-before-the-epoch-are-dropped-on-write.md.
  • I have added a test that covers the exact scenario we are fixing.

🤖 Generated with Claude Code

Both import screens rewrite CRLF and lone CR to LF before handing the file to
papaparse, which infers one line separator per file, so a file that mixes
line endings parses into one row per line.
… entity

updateManyEntitiesForImport stores each replaced entity, with the
relationships a PUT or PATCH records, as a history row in the same
transaction and before the row update. The imported entity's change
description starts from the stored version, so the importer's own edit
within the session consolidates against it, and it keeps the per-field
change summary.
prepareInternal, which runs for create, PUT, PATCH and bulk create, drops any
created, updated or accessed aspect timestamped before 1970, the year-0001
placeholder older ingestion clients send for a source that reported no time,
and drops the life cycle when no aspect remains. A PATCH whose life cycle
carries nothing but placeholders keeps the stored life cycle, since those
clients replace the whole field. The write still succeeds. The table header
hides a pre-epoch creation time stored before this rule.
Decision: ADR:2026-10-29-lifecycle-timestamps-before-the-epoch-are-dropped-on-write
Copilot AI balanced review requested due to automatic review settings October 29, 2026 14:00
@yan-3005
yan-3005 requested review from a team as code owners October 29, 2026 14:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Oct 29, 2026
@yan-3005 yan-3005 added the To release Will cherry-pick this PR into the release branch label Oct 29, 2026
normalizeCsvLineBreaks treats a quote as opening a quoted cell only at the
start of the text, after a comma or after a line break, as papaparse does,
so a quote inside an unquoted cell such as 12" pipe stays text. The cell
boundary is matched with a capture group because the build targets Safari 16.0.
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 6 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 6 warning(s) across 2 changed file(s).

Count Rule
3 react-hooks/exhaustive-deps
2 openmetadata-imports/no-impure-pure-utils
1 openmetadata-imports/no-cross-page-imports
All findings
Location Rule Message
🟡 src/pages/EntityImport/BulkEntityImportPage/BulkEntityImportPage.tsx:142:1 openmetadata-imports/no-cross-page-imports Page features must not import another page feature. Move shared code to components, hooks, interfaces, or pure utilities.
🟡 src/pages/EntityImport/BulkEntityImportPage/BulkEntityImportPage.tsx:874:5 react-hooks/exhaustive-deps React Hook useCallback has an unnecessary dependency: 'entityType'. Either exclude it or remove the dependency array.
🟡 src/pages/EntityImport/BulkEntityImportPage/BulkEntityImportPage.tsx:1374:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'handleImportWebsocketResponse' and 'handleResetImportJob'. Either include them or remove the dependency array.
🟡 src/pages/EntityImport/BulkEntityImportPage/BulkEntityImportPage.tsx:1465:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'filterColumns'. Either include it or remove the dependency array.
🟡 src/utils/CSV/CSVPureUtils.ts:16:1 openmetadata-imports/no-impure-pure-utils Pure utilities must not depend on React, UI, state, hooks, pages, or REST clients. Move orchestration/rendering out or move shared types to a lower layer.
🟡 src/utils/CSV/CSVPureUtils.ts:17:1 openmetadata-imports/no-impure-pure-utils Pure utilities must not depend on React, UI, state, hooks, pages, or REST clients. Move orchestration/rendering out or move shared types to a lower layer.

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

Copilot AI balanced review requested due to automatic review settings October 29, 2026 14:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

Copilot AI balanced review requested due to automatic review settings October 29, 2026 14:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 81%
80.93% (136903/169150) 67.82% (49117/72415) 70.88% (27664/39024)

}

/** Copies of the stored entities with the relationships a PUT or PATCH records in history. */
private List<T> withStoredRelationships(List<T> storedEntities) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think the deep copy is needed here. originals comes from findByNameOrNull → findByName, and the name cache stores JSON, so every lookup returns a new object that nothing else references. After this point the method uses originals only for carryCreationAudit and removeExtensions (by id), and loading relationships onto them doesn't change either one.

Could we hydrate in place and drop the helper?

setFieldsInBulk(putFields, originals);

and then storeVersionHistory(originals) inside the transaction.

That saves a full copy of each entity per import batch, which adds up for wide tables. The hydration still needs to happen after authorizeImportedDomains, as it does now, so the domain check keeps comparing the same values.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 88c595c. The deep copy and its helper are gone, and originals are hydrated in place with setFieldsInBulk(putFields, originals), still after authorizeImportedDomains. I checked the one place that reads them afterwards: removeExtensions filters on getExtension() != null, not only on id. The stored JSON already carries extension, and the hydration keeps it, so that filter selects the same entities as before.

// round trip runs while the handle is held.
flushInOneTransaction(
() -> {
storeVersionHistory(previousVersions);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since import history is new in this PR: storeVersionHistory serializes each hydrated entity (serializeForVersionHistory) inside flushInOneTransaction, so the JSON work for the whole batch runs while the transaction and connection are held. For wide tables in a large batch, that holds row locks longer.

Could the ids, version extensions and JSON be built before flushInOneTransaction, so only the insertMany runs inside it? The bulk-update caller can keep its current behaviour; this is only about the import path.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 88c595c. The ids, version extensions and JSON are now built into a VersionHistoryRows record before flushInOneTransaction, so only the insertMany runs inside it. writeBulkVersionHistory builds its rows through the same helper and keeps its behaviour. Ran the import, CSV and bulk-history ITs: 314 run, 0 failures.

Copilot AI balanced review requested due to automatic review settings October 30, 2026 07:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@yan-3005

Copy link
Copy Markdown
Contributor Author

Test results on 88c595c716. That commit includes the self-review fixes and both of Sonika's suggestions.

Integration tests (mysql-elasticsearch): 314 run, 0 failures, 0 errors, 29 skipped

Class Run Failures Skipped
RestoreHierarchyIT (bulk version-history path) 136 0 17
GlossaryCsvRelationTypesIT 64 0 4
MetricResourceIT 55 0 0
ChangeSummaryResourceIT 33 0 2
EntityUpdateLockOrderIT 22 0 6
DatabaseSchemaResourceIT (test_importCsv*, testImportExport*) 3 0 0
BulkChangeEventIT 1 0 0

Playwright (PLAYWRIGHT_IS_OSS=true, against this branch's build): BulkImport.spec.ts and TableCreationTime.spec.ts ran 12 tests: 12 passed, 0 failed.

Gates: mvn spotless:check is clean, and ui-checkstyle:changed plus ui-checkstyle:playwright:changed are clean. The 6 ESLint warnings the checkstyle bot lists also exist on main, so this PR adds none.

@yan-3005
yan-3005 added this pull request to the merge queue Oct 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-10-31T06:01:25Z)

Blocked the queue: integration-tests-postgres-opensearch

@karanh37
karanh37 added this pull request to the merge queue Oct 31, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 1, 2026
@github-actions github-actions Bot added the merge conflict Conflicts with the latest main; removed from the merge queue label Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — merge_conflict (2026-11-01T02:04:59Z)

The entry left the queue before it was built, so no checks ran against it.

Conflicts with the latest main — rebase, then re-queue.

…y-lifecycle-placeholder

# Conflicts:
#	openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java
Copilot AI balanced review requested due to automatic review settings November 2, 2026 04:56
@github-actions github-actions Bot removed the merge conflict Conflicts with the latest main; removed from the merge queue label Nov 2, 2026
@gitar-bot

gitar-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 closed / 1 findings

🔴 High risk · Changing entity persistence to drop pre-epoch lifecycle values and write CSV-import snapshots could lose timestamp data or distort version history.

Fixes three CSV import and lifecycle bugs: normalizes mixed CRLF/LF line endings before parsing bulk imports, stores replaced entity versions as history rows during CSV import updates, and drops year-0001 life cycle placeholder timestamps on write. The quote-handling issue in the line-break normaliser was resolved, and no open findings remain.

✅ 1 closed
✅ Edge Case: Line-break normaliser treats mid-field quotes as quoted cells

📄 openmetadata-ui/src/main/resources/ui/src/utils/CSV/CSVPureUtils.ts:521-524
normalizeCsvLineBreaks counts any " as the start of a quoted cell. Papaparse (and RFC 4180) only treats a quote as opening a cell when it is the cell's first character. Take a CRLF file where two unquoted cells contain a quote, for example 12" pipe on one row and 3" valve a few rows later. The regex matches from the first quote to the second and skips every CRLF in between, while the CRLFs outside that span become LF. Papaparse sees first and uses it as the line separator, so each row inside the span keeps a trailing \r on its last cell. That \r then appears in the grid and goes back to the server. Before this change, a file with only CRLF endings parsed cleanly. Fix: match a quoted span only at the start of a cell, i.e. after the start of the text, a comma, or a line break.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@yan-3005
yan-3005 enabled auto-merge November 2, 2026 04:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Legacy negative created.timestamp placeholders can be restored and persisted during PATCH or PUT life-cycle merging, requiring sanitization of preserved values and regression coverage.

1 open issue

Review effort: Balanced


public final void prepareInternal(T entity, boolean update) {
validateTags(entity);
entity.setLifeCycle(LifeCycles.withoutPlaceholderTimestamps(entity.getLifeCycle()));
@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

@yan-3005
yan-3005 added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 8791c16 Nov 2, 2026
74 checks passed
@yan-3005
yan-3005 deleted the fix/csv-import-history-lifecycle-placeholder branch November 2, 2026 09:35
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.0 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.1 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@gh-bot-collate

gh-bot-collate Bot commented Nov 2, 2026

Copy link
Copy Markdown

🤖 Backport to 2.0 failed. The conflict could not be resolved, so this change is not on that branch. Resolver run.

@gh-bot-collate

gh-bot-collate Bot commented Nov 2, 2026

Copy link
Copy Markdown

🤖 Backport to 2.1 opened as #36830. Claude resolved a cherry-pick conflict to build it. It merges itself once the checks pass, so read the diff now if this change is a sensitive one.

mohityadav766 pushed a commit that referenced this pull request Nov 3, 2026
… the year-0001 life cycle placeholder (#36562) (#36830)

* Fixes #36457: normalize CSV line endings before parsing an import

Both import screens rewrite CRLF and lone CR to LF before handing the file to
papaparse, which infers one line separator per file, so a file that mixes
line endings parses into one row per line.

* Fixes #36458: store the previous version when a CSV import updates an entity

updateManyEntitiesForImport stores each replaced entity, with the
relationships a PUT or PATCH records, as a history row in the same
transaction and before the row update. The imported entity's change
description starts from the stored version, so the importer's own edit
within the session consolidates against it, and it keeps the per-field
change summary.

* Fixes #36459: drop life cycle timestamps before the Unix epoch on write

prepareInternal, which runs for create, PUT, PATCH and bulk create, drops any
created, updated or accessed aspect timestamped before 1970, the year-0001
placeholder older ingestion clients send for a source that reported no time,
and drops the life cycle when no aspect remains. A PATCH whose life cycle
carries nothing but placeholders keeps the stored life cycle, since those
clients replace the whole field. The write still succeeds. The table header
hides a pre-epoch creation time stored before this rule.
Decision: ADR:2026-10-29-lifecycle-timestamps-before-the-epoch-are-dropped-on-write

* Open a quoted CSV cell only at the start of a cell

normalizeCsvLineBreaks treats a quote as opening a quoted cell only at the
start of the text, after a comma or after a line break, as papaparse does,
so a quote inside an unquoted cell such as 12" pipe stays text. The cell
boundary is matched with a capture group because the build targets Safari 16.0.

* Apply ui-checkstyle to the CSV import tests

* Hydrate import originals in place and serialize history before the transaction

(cherry picked from commit 8791c16)

Co-authored-by: Ram Narayan Balaji <[email protected]>
yan-3005 added a commit that referenced this pull request Nov 19, 2026
Hand port of #36562 to 2.0; the automatic backport failed on a conflict.

A CSV import update now stores the version it replaces, in the same
transaction as the update, and gives the imported entity a change
description that points at that version. Before, the import bumped the
version without storing the previous one, and the next PATCH rewound the
version and overwrote the import's.

The import page normalizes CRLF and lone CR line breaks outside quoted
cells before papaparse reads the file, so a CSV that mixes line endings
keeps every row.

2.0 has no storeVersions helper, so the version rows are written inline
the way writeBulkVersionHistory does. #36459 is left out: its server
side is already on 2.0 through #37002 and its UI part is 2.1-only.
@yan-3005 yan-3005 self-assigned this Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch

Projects

None yet

4 participants