Skip to content

feat: Support a complete flush and upload without shutting down.#2757

Merged
fuzzybinary merged 1 commit into
developfrom
jward/RUM-14895-flush
Mar 20, 2026
Merged

feat: Support a complete flush and upload without shutting down.#2757
fuzzybinary merged 1 commit into
developfrom
jward/RUM-14895-flush

Conversation

@fuzzybinary

Copy link
Copy Markdown
Member

What and why?

The integration test framework needs to be able to flush all data to quickly test features.

refs: RUM-14895

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes
  • Add Objective-C interface for public APIs - see our guidelines (internal)
  • Run make api-surface when adding new APIs

@fuzzybinary

Copy link
Copy Markdown
Member Author

@codex review

@fuzzybinary
fuzzybinary force-pushed the jward/RUM-14895-flush branch from 97521b3 to 7e09d0b Compare March 13, 2026 20:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 97521b3c7c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +311 to +313
flush()
allStorages.forEach { $0.setIgnoreFilesAgeWhenReading(to: true) }
allUploads.forEach { $0.flush() }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Prevent writes from escaping flushAndUpload()

flushAndUpload() drains currently queued work with flush(), then performs a single per-feature upload pass while the SDK remains active; because event writers keep running concurrently, any event produced after the initial drain (for example from background instrumentation or queued eventWriteContext work) can be persisted after that feature’s uploader has already been flushed and therefore remain pending when this method returns. This breaks the new method’s “all events were stored and got uploaded” guarantee and can make integration tests flaky unless writes are quiesced or a second drain/upload cycle is added.

Useful? React with 👍 / 👎.

@fuzzybinary
fuzzybinary marked this pull request as ready for review March 18, 2026 15:29
@fuzzybinary
fuzzybinary requested review from a team as code owners March 18, 2026 15:29

@ncreated ncreated left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good 👍, nice tests 👌.

@fuzzybinary
fuzzybinary merged commit a5ed392 into develop Mar 20, 2026
17 checks passed
@fuzzybinary
fuzzybinary deleted the jward/RUM-14895-flush branch March 20, 2026 12:22
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.

2 participants