Skip to content

chore: sync release v1.54.1 to main branch - #6085

Merged
atzoum merged 4 commits into
masterfrom
sync-release-52b9ce1bf9a785d402db9be5e35dd76f405f81b1
Jul 7, 2025
Merged

atzoum merged 4 commits into
masterfrom
sync-release-52b9ce1bf9a785d402db9be5e35dd76f405f81b1

Conversation

@devops-github-rudderstack

@devops-github-rudderstack devops-github-rudderstack commented Jul 4, 2025 •

Copy link
Copy Markdown
Collaborator

Description

Syncing patch release v1.54.1 to main branch

↓↓ Please review and edit commit overrides before merging ↓↓

BEGIN_COMMIT_OVERRIDE
fix: update validation and conversion of timestamp to bingads offline conversion supported format (#6082)
END_COMMIT_OVERRIDE

devops-github-rudderstack and others added 3 commits July 3, 2025 10:45
… conversion supported format (#6082)

# Description

## PR: Enhance Bing Ads Offline Conversions Timestamp Handling and Test
Coverage

### Summary

This PR improves the handling of the `conversionTime` field for Bing Ads
offline conversions and ensures robust test coverage for the new logic.
The changes address issues with overly strict timestamp validation and
align the system with Bing Ads' accepted formats, while also ensuring
that the new logic is well-tested.

---

### Changes in `bulk_uploader.go`

- **Flexible Timestamp Parsing:**  
  The `conversionTime` field is now parsed using two formats:  
  1. **ISO 8601/RFC3339** (e.g., `2025-07-02T18:50:54Z`)  
2. **Bing Ads UI format** (`mm/dd/yyyy hh:mm:ss AM/PM`, e.g., `7/2/2025
6:50:54 PM`)
- **Consistent Output:**  
Regardless of the input format, the timestamp is always converted and
output in Bing Ads' required format:
  `mm/dd/yyyy hh:mm:ss AM/PM` (Go layout: `"2/1/2006 3:04:05 PM"`).
- **Clear Error Messaging:**  
If the input does not match either accepted format, a clear error
message is returned, specifying the valid formats.
- **Backward Compatibility:**  
Existing integrations that send ISO 8601 timestamps will continue to
work without modification.
- **No Dropped Valid Events:**  
Valid events using either format are now accepted and processed,
preventing unnecessary data loss.

---

### Changes in `bingads_test.go`

- **Test Coverage for Upload Logic:**  
  The test suite covers various upload scenarios, including:
  - Partial successes and failures in bulk uploads.
  - Handling of errors when obtaining upload URLs or uploading files.
  - Ensuring correct job ID tracking for successes and failures.
- **Test Coverage for Polling Logic:**  
Tests verify correct handling of all Bing Ads bulk upload status
responses, including:
  - Success, failure, partial failure, and in-progress states.
  - Correct aggregation of results when multiple request IDs are polled.
- **Test Coverage for Upload Stats:**  
Tests ensure that upload statistics are correctly parsed and reported,
including:
  - Aborted and succeeded job IDs.
  - Handling of error files and edge cases.
- **Test Environment Robustness:**  
The test suite uses temporary directories and files to ensure isolation
and repeatability, and cleans up resources after each test.

---

### Why

- **User Impact:**  
Previously, only strict RFC3339 timestamps were accepted, causing valid
Bing Ads events to be dropped if they used the more common Bing Ads UI
format. This change ensures compatibility with Bing Ads documentation
and user expectations.
- **Reliability:**  
Improved test coverage ensures that the new logic is robust and that
future changes will not break expected behavior.

---

### Success Criteria

- Both ISO 8601 and Bing Ads date-time formats are accepted as input for
`conversionTime`.
- All outgoing events use the Bing Ads format for `conversionTime`.
- Invalid formats are rejected with a clear error message.
- No valid events are dropped due to timestamp formatting.
- All relevant upload and polling scenarios are covered by automated
tests.

---

### Reference

- [Linear Issue INT-3891: Incorrect error message for Bing Ads offline
conversions
format](https://linear.app/rudderstack/issue/INT-3891/incorrect-error-message-for-bing-ads-offline-conversions-format)
- [Bing Ads Bulk Service
Documentation](https://learn.microsoft.com/en-us/advertising/bulk-service/offline-conversion)

## Security

- [ ] The code changed/added as part of this pull request won't create
any security issues with how the software is being used.

---------

Co-authored-by: Sudip Paul <[email protected]>
🤖 I have created a release *beep* *boop*
---


##
[1.54.1](v1.54.0...v1.54.1)
(2025-07-04)


### Bug Fixes

* update validation and conversion of timestamp to bingads offline
conversion supported format
([#6082](#6082))
([07445ed](07445ed))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
@atzoum
atzoum enabled auto-merge (squash) July 4, 2025 11:40
@codecov

codecov Bot commented Jul 4, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.55%. Comparing base (c19d8d9) to head (9f4f80d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6085      +/-   ##
==========================================
- Coverage   76.56%   76.55%   -0.02%     
==========================================
  Files         519      519              
  Lines       69814    69821       +7     
==========================================
- Hits        53454    53448       -6     
- Misses      13459    13470      +11     
- Partials     2901     2903       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@atzoum
atzoum merged commit abdb9fc into master Jul 7, 2025
@atzoum
atzoum deleted the sync-release-52b9ce1bf9a785d402db9be5e35dd76f405f81b1 branch July 7, 2025 11:10
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.

3 participants