Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow for setting HttpAgent ingress expiry using ingressExpiryInMinutes option #905

Merged
merged 6 commits into from
Oct 23, 2024

Conversation

krpeacock
Copy link
Contributor

@krpeacock krpeacock commented Jul 18, 2024

Description

Simply adds a configurable ingress expiry option. Includes checks against <= 0 and > 5 minutes, new errors, and e2e tests about behavior.

Important question to resolve: when the expiry is less than or equal to one minute, the tests often fail in practice due to the current "round down to the nearest minute". How should the agent handle this?

Resolution - now matches the agent-rs strategy and rounds down to the nearest second when the delta is < 90 seconds

My suggestion would be either

  • disable expiry rounding if ingressExpiryInMinutes is passed
  • disable expiry rounding if ingressExpiryInMinutes is passed and the value is less than 2 minutes

How Has This Been Tested?

new e2e tests and unit tests

Checklist:

  • My changes follow the guidelines in CONTRIBUTING.md.
  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@krpeacock krpeacock requested a review from a team as a code owner July 18, 2024 18:04
@krpeacock krpeacock marked this pull request as draft July 18, 2024 18:04
Copy link
Contributor

github-actions bot commented Jul 18, 2024

size-limit report 📦

Path Size
@dfinity/agent 86.93 KB (+0.17% 🔺)
@dfinity/candid 13.58 KB (0%)
@dfinity/principal 4.97 KB (0%)
@dfinity/auth-client 61.05 KB (+0.02% 🔺)
@dfinity/assets 81.7 KB (+0.05% 🔺)
@dfinity/identity 58.18 KB (+0.03% 🔺)
@dfinity/identity-secp256k1 131.56 KB (+0.13% 🔺)

@krpeacock krpeacock marked this pull request as ready for review July 18, 2024 19:50
@krpeacock
Copy link
Contributor Author

cc @robin-kunzler for prodsec review

@dfx-json dfx-json merged commit 7c147b8 into main Oct 23, 2024
16 checks passed
@dfx-json dfx-json deleted the kai/SDK-1719-max-age branch October 23, 2024 01:09
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