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

Update agent config defaults and format #959

Merged
merged 5 commits into from
Jan 15, 2025
Merged

Conversation

aphralG
Copy link
Contributor

@aphralG aphralG commented Jan 9, 2025

Proposed changes

Fixed defaults and formatting for the client portion of agent config:

  • Renamed Common Settings struct to BackOff and moved into to the Client struct
  • Created HTTP struct for the Client HTTP config settings
  • GRPC config settings are now in the Client Struct
  • Set Defaults for KeepAlive and HTTP settings in Client - Made sure defaults were being used for client settings

Client section of the agent config below works and defaults are set to the values below.

client: 
  http:
    timeout: 10s                      # HTTP client timeouts
  grpc:
    keepalive:
      timeout: 10s                   # Client timeout
      time: 20s                      # Total time for client requests
      permit_without_stream: true    # Allow connections without streams
    max_message_size: 1048576        # Max size for client messages (in bytes)
    max_message_receive_size: 1048576 # Max size for receiving client messages
    max_message_send_size: 1048576   # Max size for sending client messages
  backoff:
    initial_interval: 500ms         # Initial backoff interval
    max_interval: 10s                # Maximum backoff interval
    max_elapsed_time: 30s           # Maximum time spent on retries
    randomization_factor: 0.5       # Factor for randomizing the backoff interval
    multiplier: 1.5                 # Backoff multiplier

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@aphralG aphralG self-assigned this Jan 9, 2025
@aphralG aphralG requested a review from a team as a code owner January 9, 2025 11:55
@github-actions github-actions bot added the chore Pull requests for routine tasks label Jan 9, 2025
commonSettings := &config.BackOff{
InitialInterval: cs.agentConfig.Client.Backoff.InitialInterval,
MaxInterval: cs.agentConfig.Client.Backoff.MaxInterval,
MaxElapsedTime: cs.agentConfig.Client.Backoff.MaxElapsedTime,
Copy link
Collaborator

Choose a reason for hiding this comment

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

For the Subscribe & CreateConnection RPCs, we always want to retry indefinitely. Otherwise if we stop retrying then the agent will just keep running doing nothing and never connect to the management plane.

Hence why the MaxElapsedTime is set to 0 for these RPCs.

@aphralG aphralG requested a review from dhurley January 14, 2025 10:38
@aphralG aphralG merged commit b6e143c into v3 Jan 15, 2025
20 checks passed
@aphralG aphralG deleted the fix-config-structs-and-defaults branch January 15, 2025 11:48
sean-breen pushed a commit that referenced this pull request Jan 15, 2025
* update config defaults and format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants