Skip to content

Conversation

@dcroote
Copy link
Contributor

@dcroote dcroote commented Dec 27, 2025

Closes #2032.

Steps:

  • Bumped zod and OIS
  • Ran yarn update-ois-version to update the OIS version used in all of the config files
  • Fixed failing zod tests
  • Fought with E2E tests again (clearly not fully fixed by E2e intermittent failures #2041), but now it's passing after implementing retries for the getBalance() call that was consistently failing

@dcroote dcroote requested a review from Siegrift December 27, 2025 21:53
Copy link
Contributor

@Siegrift Siegrift left a comment

Choose a reason for hiding this comment

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

👍 LGTM

expect(checkWithdrawalStatus()).toBe('Withdrawal request is not fulfilled yet');

const balanceBefore = await sponsorBalance();
// Use retry for balance fetches to handle transient ECONNRESET errors in CI
Copy link
Contributor

Choose a reason for hiding this comment

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

This must have caused headaches :/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh definitely a massive headache, but I hope now the issue is behind us

code: 'invalid_format',
format: 'regex',
pattern:
'/^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))$/',
Copy link
Contributor

Choose a reason for hiding this comment

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

Mhh, this looks quite wild.

Copy link
Contributor

Choose a reason for hiding this comment

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

But still acceptable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is correct because it is how the regex is defined:

https://github.com/api3dao/airnode/blob/d74857c705a8d655f476e5f81649020b1a5a43ff/packages/airnode-validator/src/receipt/receipt.ts#L7C1-L9C2

However, given how opaque this is, I added a custom error message to the schema regex: Invalid timestamp format: must be ISO and updated the test accordingly in the latest commit.

@dcroote dcroote merged commit 3aa2eb4 into master Jan 2, 2026
25 checks passed
@dcroote dcroote deleted the zod-v4 branch January 2, 2026 20:11
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.

Upgrade to zod v4, OIS v3

3 participants