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

Propagate context and ensure git commands run in request context #17868

Merged
merged 65 commits into from
Jan 19, 2022

Commits on Dec 3, 2021

  1. Propagate context and ensure git commands run in request context

    This PR continues the work in go-gitea#17125 by progressively ensuring that git
    commands run within the request context.
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    6c9c38a View commit details
    Browse the repository at this point in the history
  2. Improve checkBranchName

    zeripath committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    f57eba0 View commit details
    Browse the repository at this point in the history
  3. extend propagation to the temprepo

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    1d4cbbd View commit details
    Browse the repository at this point in the history
  4. more propagation

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    a7276d9 View commit details
    Browse the repository at this point in the history
  5. oops

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    fa0902c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    25e1333 View commit details
    Browse the repository at this point in the history
  7. fix tests

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    ef8bee1 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    271a6bf View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    da9edc9 View commit details
    Browse the repository at this point in the history
  10. more api propagation

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    4a711e8 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e4a37c0 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2021

  1. fix tests again

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 4, 2021
    Configuration menu
    Copy the full SHA
    aa419cb View commit details
    Browse the repository at this point in the history
  2. another fixup

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 4, 2021
    Configuration menu
    Copy the full SHA
    ee35164 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    62157c4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6a5dd00 View commit details
    Browse the repository at this point in the history
  5. placate lint

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 4, 2021
    Configuration menu
    Copy the full SHA
    2e82150 View commit details
    Browse the repository at this point in the history
  6. placate lint2

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 4, 2021
    Configuration menu
    Copy the full SHA
    525e495 View commit details
    Browse the repository at this point in the history
  7. need to set the gitrepo here

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 4, 2021
    Configuration menu
    Copy the full SHA
    aa4997d View commit details
    Browse the repository at this point in the history
  8. more use of ctx.Repo.GitRepo instead of reopening it

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 4, 2021
    Configuration menu
    Copy the full SHA
    c3c1eb1 View commit details
    Browse the repository at this point in the history
  9. Stop reopening git repo with repo_service.GetBranch

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 4, 2021
    Configuration menu
    Copy the full SHA
    f203621 View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2021

  1. fix tests

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 5, 2021
    Configuration menu
    Copy the full SHA
    40caafc View commit details
    Browse the repository at this point in the history
  2. make it possible to get the repository from the context instead of ha…

    …ving to pass it in
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 5, 2021
    Configuration menu
    Copy the full SHA
    360eb96 View commit details
    Browse the repository at this point in the history
  3. more contexting

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 5, 2021
    Configuration menu
    Copy the full SHA
    3a3e6bf View commit details
    Browse the repository at this point in the history
  4. Add context to archiver

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 5, 2021
    Configuration menu
    Copy the full SHA
    acc8de2 View commit details
    Browse the repository at this point in the history
  5. More propagation

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 5, 2021
    Configuration menu
    Copy the full SHA
    ae5b6f6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    af4cbdc View commit details
    Browse the repository at this point in the history
  7. more propagation

    zeripath committed Dec 5, 2021
    Configuration menu
    Copy the full SHA
    8a3ff74 View commit details
    Browse the repository at this point in the history
  8. more propagation

    zeripath committed Dec 5, 2021
    Configuration menu
    Copy the full SHA
    b0cc9a1 View commit details
    Browse the repository at this point in the history
  9. No more git.OpenRepository without a context

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 5, 2021
    Configuration menu
    Copy the full SHA
    a004048 View commit details
    Browse the repository at this point in the history
  10. Begin removing calls to NewCommand and replace with NewCommandContext

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 5, 2021
    Configuration menu
    Copy the full SHA
    2191ed8 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2021

  1. Add context to RenderContext

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    a649d3e View commit details
    Browse the repository at this point in the history
  2. prevent panic in tests

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    4bcc196 View commit details
    Browse the repository at this point in the history
  3. more fixes

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    ce0ea53 View commit details
    Browse the repository at this point in the history
  4. more fixes

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    98e2eef View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5d26d8a View commit details
    Browse the repository at this point in the history
  6. All NewCommands are now NewCommandContexts

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    80b4f06 View commit details
    Browse the repository at this point in the history
  7. baserepo not always loaded in TestPatch so do not use as process desc…

    …riptor
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    a7383ca View commit details
    Browse the repository at this point in the history
  8. fix gogit issue

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    cc04890 View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2021

  1. Configuration menu
    Copy the full SHA
    c6b9df6 View commit details
    Browse the repository at this point in the history
  2. Make doctor pass context too

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 7, 2021
    Configuration menu
    Copy the full SHA
    7fcad07 View commit details
    Browse the repository at this point in the history
  3. pass context in to mirror remote address

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 7, 2021
    Configuration menu
    Copy the full SHA
    83c5fd1 View commit details
    Browse the repository at this point in the history
  4. Prevent per request cancellation of hook/proc-receive and hook/post-r…

    …eceive
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 7, 2021
    Configuration menu
    Copy the full SHA
    363d9bd View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2021

  1. Ensure NewPullRequest works correctly even if cancelled

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    7f62081 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dd1b8d2 View commit details
    Browse the repository at this point in the history
  3. fix text

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    8ab620e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    adf256c View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2021

  1. Configuration menu
    Copy the full SHA
    3a63ead View commit details
    Browse the repository at this point in the history
  2. missed one

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 13, 2021
    Configuration menu
    Copy the full SHA
    5b894d2 View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2021

  1. remove review.loadAttributes as it is no longer needed

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 15, 2021
    Configuration menu
    Copy the full SHA
    56764de View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2021

  1. Configuration menu
    Copy the full SHA
    ca5023e View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2021

  1. Configuration menu
    Copy the full SHA
    e157005 View commit details
    Browse the repository at this point in the history

Commits on Dec 21, 2021

  1. Configuration menu
    Copy the full SHA
    21fed46 View commit details
    Browse the repository at this point in the history
  2. replace review.loadCodeComments with LoadCodeComments

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    c82263e View commit details
    Browse the repository at this point in the history
  3. as per review

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    7563316 View commit details
    Browse the repository at this point in the history
  4. remove openrepo as git repo exists check

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    1bbbcae View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2021

  1. Configuration menu
    Copy the full SHA
    40c7609 View commit details
    Browse the repository at this point in the history

Commits on Dec 31, 2021

  1. Configuration menu
    Copy the full SHA
    2038a19 View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2022

  1. Configuration menu
    Copy the full SHA
    ae02bae View commit details
    Browse the repository at this point in the history
  2. rename shasum refid

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Jan 8, 2022
    Configuration menu
    Copy the full SHA
    ccd0b97 View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2022

  1. Configuration menu
    Copy the full SHA
    4fda9a3 View commit details
    Browse the repository at this point in the history
  2. Update routers/private/default_branch.go

    Co-authored-by: 6543 <6543@obermui.de>
    zeripath and 6543 authored Jan 13, 2022
    Configuration menu
    Copy the full SHA
    d387d52 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2c86515 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2022

  1. Configuration menu
    Copy the full SHA
    cfbac1c View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2022

  1. Configuration menu
    Copy the full SHA
    6790d0a View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2022

  1. Configuration menu
    Copy the full SHA
    94f6e7e View commit details
    Browse the repository at this point in the history