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

Consolidate / batch process multiple updates in a single PR #52

Open
1 task
codificat opened this issue Nov 19, 2021 · 22 comments
Open
1 task

Consolidate / batch process multiple updates in a single PR #52

codificat opened this issue Nov 19, 2021 · 22 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/stack-guidance Categorizes an issue or PR as relevant to SIG Stack Guidance.

Comments

@codificat
Copy link
Member

Is your feature request related to a problem? Please describe.

Some prescription refresh runs generate a considerable amount of updates, each of which comes in the form of a new Pull Request to the prescriptions repo.

This causes a lot of noise.

Also, our triage party application takes a long time to refresh data, because it has to get info about all these PRs.

High-level Goals

The proposal is to consolidate multiple updates from a job run into a single PR.

Describe the solution you'd like

1 PR per job run.

Describe alternatives you've considered

Keep things as they are and bear with the volume of PRs and associated notifications.

Additional context

At the time of this writing, there are over 18000 closed PRs in that repo.

Acceptance Criteria

  • multiple changes are consolidated in a single PR
@codificat codificat added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 19, 2021
@goern goern added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Feb 16, 2022
@sesheta
Copy link
Member

sesheta commented May 17, 2022

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@sesheta sesheta added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 17, 2022
@sesheta
Copy link
Member

sesheta commented Jun 16, 2022

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

@sesheta sesheta added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 16, 2022
@sesheta
Copy link
Member

sesheta commented Jul 16, 2022

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

@sesheta
Copy link
Member

sesheta commented Jul 16, 2022

@sesheta: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sesheta sesheta closed this as completed Jul 16, 2022
@codificat
Copy link
Member Author

/reopen
/sig stack-guidance

I believe this is still relevant

@sesheta sesheta reopened this Aug 9, 2022
@sesheta
Copy link
Member

sesheta commented Aug 9, 2022

@codificat: Reopened this issue.

In response to this:

/reopen
/sig stack-guidance

I believe this is still relevant

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sesheta sesheta added the sig/stack-guidance Categorizes an issue or PR as relevant to SIG Stack Guidance. label Aug 9, 2022
@VannTen
Copy link
Member

VannTen commented Aug 9, 2022

Could the PR be labelled and the query/notifications use the label to exclude those PRs ?

@codificat
Copy link
Member Author

Could the PR be labelled and the query/notifications use the label to exclude those PRs ?

I am not sure I understand you here, sorry. Can you elaborate?

The goal of this request is to try to reduce (consolidate) the number of PRs created on the repo. Regardless of labels, e.g. the pre-commit checks should be run - and these do take some time each (lots of yaml files to check).

/remove-lifecycle rotten

@VannTen
Copy link
Member

VannTen commented Aug 17, 2022 via email

@codificat codificat removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Aug 18, 2022
@VannTen
Copy link
Member

VannTen commented Aug 18, 2022

Relevant: google/triage-party#10
Triage-party seem to be able to handle bigger repos than that, maybe our configuration is not optimal ?
Apparently it does pre-match filtering (I guess incorporating match parameters in the query to gh api ?) and there is the possibility to have a cache, optionnaly persistent.

@VannTen
Copy link
Member

VannTen commented Aug 19, 2022 via email

@VannTen
Copy link
Member

VannTen commented Aug 19, 2022

Something seems weird : while checking aicoe-ci/tasks/pre-commit-check.yaml

    - name: run-pre-commit
      image: quay.io/thoth-station/thoth-precommit:v0.12.2
      workingDir: /workspace/repo
      script: |
        if [[ -f .pre-commit-config.yaml ]]; then
          set +e
          out=$(pre-commit run --all-files 2>&1)
          exit_code=$?
          set -e
          if [[ $exit_code -ne 0 ]]; then
            state="failure"
            desc="The pre-commit test failed!"
            cat <<EOF > /workspace/repo/pr-comment
        <details>
        <summary>Pre-Commit Test failed! Click here</summary>

        \`\`\`
        $out
        \`\`\`
        </details>
        EOF
          else
            state="success"
            desc="The pre-commit test succeeded!"
          fi
          cat <<EOF > /workspace/repo/pr-status.json
          {
            "state": "$state",
            "desc": "$desc"
          }
        EOF
        fi

Isn't part of that defined in .prow.yaml ?
So which is deciding what images & cmd to run ? Am I looking at the correct file ?

@codificat
Copy link
Member Author

Isn't part of that defined in .prow.yaml ?
So which is deciding what images & cmd to run ? Am I looking at the correct file ?

I believe that this check was there before prow was deployed and implemented - it is probably deprecated by now, although there might be some repos that still use it. I remember removing some references in the past (basically, remove the pre-commit check from .aicoe-ci.yaml and add it to .prow.yaml instead)

@harshad16 might be able to confirm this.

Maybe worth creating an issue to hunt down any remaining references and deprecate that check?

@codificat
Copy link
Member Author

Potentially related (as an improvement to the prescriptions CI): thoth-station/prescriptions#8

@harshad16
Copy link
Member

the pre-commit check and pytest in aicoe-ci are no longer used.
we can remove them now.
as prow takes care of it.

@VannTen
Copy link
Member

VannTen commented Aug 22, 2022 via email

@VannTen
Copy link
Member

VannTen commented Sep 1, 2022 via email

@codificat
Copy link
Member Author

@codificat Regarding specifically the triage-party issue, should we create an issue for that ? There was no lagginess this week when I used it, but probably because there isn't any active open PR on the prescription repos.

As far as I can tell, the issue only affects triage-party upon startup, while it initially creates the cache. We don't restart triage-party that often in prod, so it's probably fine as it is.

More serious, I believe, is the time it takes to run pre-commit run --all-files on each of the small PRs. thoth-station/prescriptions#27401 was a nice idea, but it was reverted and not fixed. Giving it another try in thoth-station/prescriptions#30488

@VannTen
Copy link
Member

VannTen commented Oct 17, 2022

So, did thoth-station/prescriptions#30488 helped ?

@codificat
Copy link
Member Author

So, did thoth-station/prescriptions#30488 helped ?

For the PRs coming from the refresh job, I'm not so sure. I see that @mayaCostantini merged more than 600 PRs from the last refresh batch, but AFACIT no precommit checks were performed on them - at least by prow.

The main topic of this issue, though, is the high volume of PRs to begin with. It is still a wishlist item for me to reduce that number 😇

I believe the incremental pre-commit helps significantly with PRs that are sent by humans. On one I saw the pre-commit check run go down from ~45 min to ~2 min (I can't find the reference now... I blame the sheer volume of PRs 😛 - although by now a job would have been cleaned up anyway).

@VannTen
Copy link
Member

VannTen commented Oct 18, 2022 via email

@codificat
Copy link
Member Author

What's the choking point exactly, still notifications/triage party then ?

For me, yes: notification handling is broken for me. That might be just affecting me and safely ignored, though. Triage party does get its hit, but as far as I know it only happens during startup, which does not happen often. We might also be hit by API rate limits when this happens, but again this is rare.

All in all, you are right: this is not a big issue. And if you prefer to close it instead, so be it 😃. Especially if there is value in keeping (hundreds of) separate PRs. I don't see why, but I might be missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/stack-guidance Categorizes an issue or PR as relevant to SIG Stack Guidance.
Projects
Status: 🆕 New
Development

No branches or pull requests

5 participants