Skip to content

put_s3_object and put_s3_found metrics are swapped #25

Description

@RaphaelFakhri

What happened

The put_s3_object metric counts objects that were already in S3, and put_s3_found counts objects that were newly uploaded.

S3Client.PutCond returns written == true when it uploaded the object. maybePutObject in lib/gobuild/gobuild.go treats written == true as "already present and matching" and increments putS3Found. The two counters are reversed.

What you expected

  • put_s3_object increments when an object is uploaded.
  • put_s3_found increments when the object was already present and no upload happened.

Reproduce

Write a new object through S3Cache.Put against an empty bucket. put_s3_found becomes 1 and put_s3_object stays 0.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions