Skip to content

fix(backend): honor launcher S3 override maxRetries #14033

Description

@jeffspahr

Bug description

The launcher S3 provider override path uses the default provider's maxRetries value when an override supplies its own value.

In backend/src/v2/config/s3.go, the matching override branch checks override.MaxRetries != nil but writes *p.Default.MaxRetries into session parameters. This has two incorrect outcomes:

  • an override value is silently ignored in favor of the default value; and
  • if the override sets maxRetries while the default omits it, dereferencing p.Default.MaxRetries can panic.

This was found while auditing frontend reconstruction of kfp-launcher provider selection after MLMD removal. It is a backend launcher bug rather than a frontend migration fix, so it should be corrected and validated in the authoritative Go implementation.

Reproduction

Configure an S3 provider with a matching bucket/key-prefix override:

s3:
  default:
    maxRetries: 3
    credentials:
      fromEnv: true
  Overrides:
    - bucketName: team-bucket
      keyPrefix: team-a
      maxRetries: 9
      credentials:
        fromEnv: true

Resolve session information for s3://team-bucket/team-a/model.

Expected: maxRetries is 9.

Actual: maxRetries is 3.

If default.maxRetries is omitted while the override supplies maxRetries, the same path may dereference a nil default pointer.

Acceptance criteria

  • A matching override writes override.MaxRetries into session parameters.
  • An override can set maxRetries when the default omits it without panicking.
  • When the override omits maxRetries, the documented default/provider inheritance behavior is preserved.
  • Table-driven tests cover default-only, override-only, differing default/override values, and no configured value.
  • Cross-language launcher-provider fixtures used by the frontend reconstruction include this field so future behavior cannot drift silently.

Love this idea? Give it a 👍.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions