Skip to content

Commit

Permalink
Hotfix for schedulingConfig decoding issue (#3624)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/0/1208895860990675/f
Tech Design URL:
CC:

**Description**:

This fixes an error with JSON decoding preventing PIR to save profile.

**Optional E2E tests**:
- [x] Run PIR E2E tests
Check this to run the Personal Information Removal end to end tests. If
updating CCF, or any PIR related code, tick this.

**Steps to test this PR**:
1. Test PIR on a fresh install
2. Test PIR on macOS 1.115.0 upgrading to this version

<!--
Tagging instructions
If this PR isn't ready to be merged for whatever reason it should be
marked with the `DO NOT MERGE` label (particularly if it's a draft)
If it's pending Product Review/PFR, please add the `Pending Product
Review` label.

If at any point it isn't actively being worked on/ready for
review/otherwise moving forward (besides the above PR/PFR exception)
strongly consider closing it (or not opening it in the first place). If
you decide not to close it, make sure it's labelled to make it clear the
PRs state and comment with more information.
-->

**Definition of Done**:

* [ ] Does this PR satisfy our [Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)?

---
###### Internal references:
[Pull Request Review
Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f)
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
[Pull Request
Documentation](https://app.asana.com/0/1202500774821704/1204012835277482/f)
  • Loading branch information
quanganhdo authored Dec 3, 2024
1 parent 7047b3a commit 81ba2ef
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,12 @@ public struct DataBroker: Codable, Sendable {

version = try container.decode(String.self, forKey: .version)
steps = try container.decode([Step].self, forKey: .steps)
schedulingConfig = try container.decode(DataBrokerScheduleConfig.self, forKey: .schedulingConfig)
// Hotfix for https://app.asana.com/0/1203581873609357/1208895331283089/f
do {
schedulingConfig = try container.decode(DataBrokerScheduleConfig.self, forKey: .schedulingConfig)
} catch {
schedulingConfig = .init(retryError: 48, confirmOptOutScan: 72, maintenanceScan: 120, maxAttempts: -1)
}
parent = try? container.decode(String.self, forKey: .parent)

do {
Expand Down

0 comments on commit 81ba2ef

Please sign in to comment.