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

hack: add k8s-infra-diff-buckets.sh #2291

Merged
merged 1 commit into from
Jul 3, 2021

Conversation

spiffxp
Copy link
Member

@spiffxp spiffxp commented Jul 2, 2021

Diff the contents of two GCS bucket paths via gsutil ls. This is
motivated by trying to monitor the delta between google-owned and
community-owned CI artifacts.

The original plan was to rewrite this to use gsutil rsync --dry-run
and then remove the --dry-run to actually sync the buckets
periodically via a prow job. It turns out the files that motivated this
are not bit-for-bit identical, nor do they have accurate enough
timestamps to be used for comparison, since they are produced by
different jobs running on different clusters at slightly different
times.

So for now, since I've been reporting results from this publicly, get
the script off of my laptop.

Sample usage:

# diff a single-level listing, discard intermediate files
./hack/k8s-infra-diff-buckets.sh \
    gs://kubernetes-release-dev/ci/ \
    gs://k8s-release-dev/ci/

# diff a recursive listing, leave intermediate files behind
DEBUG=true ./hack/k8s-infra-diff-buckets.sh \
    gs://kubernetes-release-dev/ci/** \
    gs://k8s-release-dev/ci/**

Comments where I've referenced output from this:

ref: #846 (comment)

Diff the contents of two GCS bucket paths via `gsutil ls`. This is
motivated by trying to monitor the delta between google-owned and
community-owned CI artifacts.

The original plan was to rewrite this to use `gsutil rsync --dry-run`
and then remove the `--dry-run` to actually sync the buckets
periodically via a prow job. It turns out the files that motivated this
are not bit-for-bit identical, nor do they have accurate enough
timestamps to be used for comparison, since they are produced by
different jobs running on different clusters at slightly different
times.

So for now, since I've been reporting results from this publicly, get
the script off of my laptop.

Sample usage:

    # diff a single-level listing, discard intermediate files
    ./hack/k8s-infra-diff-buckets.sh \
        gs://kubernetes-release-dev/ci/ \
        gs://k8s-release-dev/ci/

    # diff a recursive listing, leave intermediate files behind
    DEBUG=true ./hack/k8s-infra-diff-buckets.sh \
        gs://kubernetes-release-dev/ci/** \
        gs://k8s-release-dev/ci/**
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 2, 2021
@k8s-ci-robot k8s-ci-robot requested review from nikhita and thockin July 2, 2021 22:39
@k8s-ci-robot k8s-ci-robot added wg/k8s-infra approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 2, 2021
@spiffxp
Copy link
Member Author

spiffxp commented Jul 2, 2021

/cc @BenTheElder @justaugustus

Copy link
Member

@justaugustus justaugustus left a comment

Choose a reason for hiding this comment

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

TIL comm!
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 3, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justaugustus, spiffxp

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 8437c68 into kubernetes:main Jul 3, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.22 milestone Jul 3, 2021
@spiffxp spiffxp deleted the diff-buckets branch July 16, 2021 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants