Skip to content

backport: ci: add delay after link creation for test add remove static arp (#2968) #3556

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

Open
wants to merge 1 commit into
base: release/v1.5
Choose a base branch
from

Conversation

QxBytes
Copy link
Contributor

@QxBytes QxBytes commented Apr 3, 2025

fix by adding delay after link creation

Reason for Change:

Backports #2968

Issue Fixed:

See above

Requirements:

Notes:

@QxBytes QxBytes added ci Infra or tooling. release/1.5 Change affects v1.5 release train labels Apr 3, 2025
@QxBytes QxBytes self-assigned this Apr 3, 2025
@Copilot Copilot AI review requested due to automatic review settings April 3, 2025 18:28
@QxBytes QxBytes requested a review from a team as a code owner April 3, 2025 18:28
@QxBytes QxBytes requested a review from MikeZappa87 April 3, 2025 18:28
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

A backport PR to add delays in the static ARP test to ensure that the network interface is fully up before ARP entries are modified.

  • Added the time package and inserted delays before and after setting the ARP entries.
  • Updated comments to clarify the timing rationale in the test.
Comments suppressed due to low confidence (2)

netlink/netlink_test.go:291

  • [nitpick] Consider replacing the hardcoded delay value with a clearly named constant (e.g., interfaceUpDelay) to improve readability and ease future adjustments.
time.Sleep(time.Millisecond * 100)

netlink/netlink_test.go:311

  • [nitpick] Similarly, consider using a named constant (e.g., arpPersistenceDelay) for this delay to clarify its purpose and allow for easier configuration changes.
time.Sleep(time.Millisecond * 100)

@QxBytes
Copy link
Contributor Author

QxBytes commented Apr 3, 2025

/azp run Azure Container Networking PR

@QxBytes QxBytes enabled auto-merge April 3, 2025 18:29
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@QxBytes QxBytes added this pull request to the merge queue Apr 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 3, 2025
@QxBytes QxBytes added this pull request to the merge queue Apr 3, 2025
@@ -285,6 +286,10 @@ func TestAddRemoveStaticArp(t *testing.T) {
mac, _ := net.ParseMAC("aa:b3:4d:5e:e2:4a")
nl := NewNetlink()

// wait for interface to fully come up
// if it isn't fully up it might wipe the arp entry we're about to add
time.Sleep(time.Millisecond * 100)
Copy link
Contributor

@MikeZappa87 MikeZappa87 Apr 3, 2025

Choose a reason for hiding this comment

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

Are we waiting for a specific state here? We should avoid this type of behavior and explicitly wait for a state of the netdev and timeout if the expected state is never seen.

The problem with this is it can result in flakes depending on several factors. Let’s be deterministic with this instead.

Copy link
Contributor

@MikeZappa87 MikeZappa87 left a comment

Choose a reason for hiding this comment

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

Putting time.sleep is a flake waiting to happen. I pulled this from the merge queue.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 4, 2025
Copy link

This pull request is stale because it has been open for 2 weeks with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale due to inactivity. label Apr 19, 2025
@QxBytes QxBytes removed the stale Stale due to inactivity. label Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Infra or tooling. release/1.5 Change affects v1.5 release train
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants