Skip to content

Add travis.yml#1

Merged
olix0r merged 44 commits intomasterfrom
ver/ci
Jul 8, 2018
Merged

Add travis.yml#1
olix0r merged 44 commits intomasterfrom
ver/ci

Conversation

@olix0r
Copy link
Copy Markdown
Member

@olix0r olix0r commented Jul 8, 2018

No description provided.

@olix0r olix0r self-assigned this Jul 8, 2018
@olix0r olix0r merged commit 02a64e9 into master Jul 8, 2018
@olix0r olix0r deleted the ver/ci branch July 8, 2018 21:24
pothos referenced this pull request in kinvolk-archives/linkerd2-proxy Jun 13, 2019
Draft profiling setup for flamegraphs
sprt pushed a commit to sprt/linkerd2-proxy that referenced this pull request Aug 30, 2019
Update versions in code.

Use default docker tag of v0.1.0
cratelyn added a commit that referenced this pull request Mar 18, 2026
this commit provides a follow-up to #4450, fixing
a bug with existing code identified during review by @Unleased.

> I know this is just keeping the existing behavior, but isn't
tokio::time::interval() going to fire immediately so we'll retry right
away?

\- #4450 (comment)

this commit inserts a call to `tokio::time::Interval::reset()` to the
`Recover` implementation that extracts negative TTL's from
`hickory_resolver` errors.

this means that, upon resolution errors with a negative TTL, we will no
longer immediately retry, and instead wait for the prescribed time
before attempting once more.

introducing test coverage for this is difficult because we cannot create
a `ResolveError` ourselves, and introducing e.g. a trait to inject here
would incur an excessive amount of boilerplate and complexity.

to provide assurance that this is correct, see this small playground
example, in which we poll an `Interval` with and without this call to
`reset()`. note that when calling reset, it will no longer immediately
return `Poll::Ready(_)` upon the first call to `tick()`.

```rust
 #[tokio::main]
 async fn main() {
     let duration = std::time::Duration::from_secs(1);
     let mut interval = tokio::time::interval(duration);
     // interval.reset();

     let start = std::time::Instant::now();
     for i in 1..5 {
         interval.tick().await;
         let elapsed = start.elapsed().as_millis();
         println!("#{i} - {elapsed}ms")
     }
 }
```

```
 ; cargo run
 #1 - 1ms
 #2 - 1001ms
 #3 - 2001ms
 #4 - 3001ms
```

with a reset, to avoid first poll being ready:

```rust
 #[tokio::main]
 async fn main() {
     let duration = std::time::Duration::from_secs(1);
     let mut interval = tokio::time::interval(duration);
     interval.reset();

     let start = std::time::Instant::now();
     for i in 1..5 {
         interval.tick().await;
         let elapsed = start.elapsed().as_millis();
         println!("#{i} - {elapsed}ms")
     }
 }
```

```
 ; cargo run
 #1 - 1001ms
 #2 - 2001ms
 #3 - 3001ms
 #4 - 4001ms
```

Signed-off-by: katelyn martin <kate@buoyant.io>
cratelyn added a commit that referenced this pull request Mar 20, 2026
* fix(app/core): fix negative ttl immediate return

this commit provides a follow-up to #4450, fixing
a bug with existing code identified during review by @Unleased.

> I know this is just keeping the existing behavior, but isn't
tokio::time::interval() going to fire immediately so we'll retry right
away?

\- #4450 (comment)

this commit inserts a call to `tokio::time::Interval::reset()` to the
`Recover` implementation that extracts negative TTL's from
`hickory_resolver` errors.

this means that, upon resolution errors with a negative TTL, we will no
longer immediately retry, and instead wait for the prescribed time
before attempting once more.

introducing test coverage for this is difficult because we cannot create
a `ResolveError` ourselves, and introducing e.g. a trait to inject here
would incur an excessive amount of boilerplate and complexity.

to provide assurance that this is correct, see this small playground
example, in which we poll an `Interval` with and without this call to
`reset()`. note that when calling reset, it will no longer immediately
return `Poll::Ready(_)` upon the first call to `tick()`.

```rust
 #[tokio::main]
 async fn main() {
     let duration = std::time::Duration::from_secs(1);
     let mut interval = tokio::time::interval(duration);
     // interval.reset();

     let start = std::time::Instant::now();
     for i in 1..5 {
         interval.tick().await;
         let elapsed = start.elapsed().as_millis();
         println!("#{i} - {elapsed}ms")
     }
 }
```

```
 ; cargo run
 #1 - 1ms
 #2 - 1001ms
 #3 - 2001ms
 #4 - 3001ms
```

with a reset, to avoid first poll being ready:

```rust
 #[tokio::main]
 async fn main() {
     let duration = std::time::Duration::from_secs(1);
     let mut interval = tokio::time::interval(duration);
     interval.reset();

     let start = std::time::Instant::now();
     for i in 1..5 {
         interval.tick().await;
         let elapsed = start.elapsed().as_millis();
         println!("#{i} - {elapsed}ms")
     }
 }
```

```
 ; cargo run
 #1 - 1001ms
 #2 - 2001ms
 #3 - 3001ms
 #4 - 4001ms
```

Signed-off-by: katelyn martin <kate@buoyant.io>

* nit(app/core): fix comment typo

#4455 (comment)

Co-authored-by: Alejandro Martinez Ruiz <alex@flawedcode.org>

---------

Signed-off-by: katelyn martin <kate@buoyant.io>
Co-authored-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
cratelyn added a commit that referenced this pull request Mar 20, 2026
`linkerd_app_core::control` provides utilities used by the data plane to
communicate with the linkerd control plane. this includes, among other
features such as load-balancing and configurability for settings like
connection timeout durations, an error recovery that respects DNS
record's negative TTL.

as of today, we do this within an inline, anonymous closure.

this commit pulls this business logic out of an inline closure, and into
an explicit pair of structures.

ResolveRecover is the Recover implementation that handles identifying
the proper backoff strategy, when presented with a given boxed error.
ResolveBackoff is the structure that acts as the sum type that
encompasses either a TTL-driven interval, or an exponential backoff.

see also, #4449. that introduces some additional
guardrails to prevent panicking if a negative ttl of zero is
encountered.

as part of this code motion, this commit inserts a call to
`tokio::time::Interval::reset()` to the `Recover` implementation that
extracts negative TTL's from `hickory_resolver` errors.

this means that, upon resolution errors with a negative TTL, we will no
longer immediately retry, and instead wait for the prescribed time
before attempting once more.

introducing test coverage for this is difficult because we cannot create
a `ResolveError` ourselves, and introducing e.g. a trait to inject here
would incur an excessive amount of boilerplate and complexity.

to provide assurance that this is correct, see this small playground
example, in which we poll an `Interval` with and without this call to
`reset()`. note that when calling reset, it will no longer immediately
return `Poll::Ready(_)` upon the first call to `tick()`.

```rust
 #[tokio::main]
 async fn main() {
     let duration = std::time::Duration::from_secs(1);
     let mut interval = tokio::time::interval(duration);
     // interval.reset();

     let start = std::time::Instant::now();
     for i in 1..5 {
         interval.tick().await;
         let elapsed = start.elapsed().as_millis();
         println!("#{i} - {elapsed}ms")
     }
 }
```

```
 ; cargo run
 #1 - 1ms
 #2 - 1001ms
 #3 - 2001ms
 #4 - 3001ms
```

with a reset, to avoid first poll being ready:

```rust
 #[tokio::main]
 async fn main() {
     let duration = std::time::Duration::from_secs(1);
     let mut interval = tokio::time::interval(duration);
     interval.reset();

     let start = std::time::Instant::now();
     for i in 1..5 {
         interval.tick().await;
         let elapsed = start.elapsed().as_millis();
         println!("#{i} - {elapsed}ms")
     }
 }
```

```
 ; cargo run
 #1 - 1001ms
 #2 - 2001ms
 #3 - 3001ms
 #4 - 4001ms
```

Signed-off-by: katelyn martin <kate@buoyant.io>
Co-authored-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
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.

1 participant