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

Avoid saving disabled status when deleting a project #8528

Merged
merged 1 commit into from Sep 29, 2023

Conversation

jglick
Copy link
Member

@jglick jglick commented Sep 26, 2023

performDelete was calling makeDisabled to ensure that no new builds were scheduled for a project while it was being deleted. Unfortunately this API-level method was intended for general purposes, such as flipping the disabled flag on a valid project, and includes

save();
ItemListener.fireOnUpdated(this);
which save config.xml to disk and fire a change, neither of which is necessary or desirable on a project which is about to be deleted.

Testing done

None directly, but seems to solve a race condition seen in a CloudBees CI proprietary test.

Proposed changelog entries

  • Optimized project deletion.

Proposed upgrade guidelines

N/A

Before the changes are marked as ready-for-merge:

Maintainer checklist

Edit tasklist title
Beta Give feedback Tasklist Maintainer checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. There are at least two (2) approvals for the pull request and no outstanding requests for change.
    Options
  2. Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
    Options
  3. Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
    Options
  4. Proper changelog labels are set so that the changelog can be generated automatically.
    Options
  5. If the change needs additional upgrade steps from users, the upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).
    Options
  6. If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).
    Options

@NotMyFault NotMyFault added the rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Sep 27, 2023
@NotMyFault NotMyFault requested a review from a team September 27, 2023 09:17
@NotMyFault
Copy link
Member

/label ready-for-merge


This PR is now ready for merge. We will merge it after ~24 hours if there is no negative feedback.
Please see the merge process documentation for more information about the merge process.
Thanks!

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Sep 28, 2023
@MarkEWaite MarkEWaite merged commit 823ab34 into jenkinsci:master Sep 29, 2023
16 checks passed
@jglick jglick deleted the performDelete branch September 29, 2023 16:42
flabrie pushed a commit to flabrie/jenkins that referenced this pull request Sep 29, 2023
* master:
  Automate Java version recommendation administrative monitor (jenkinsci#8526)
  Avoid saving disabled status when deleting a project (jenkinsci#8528)
  Bump org.jenkins-ci.main:jenkins-test-harness from 2064.vcd3b_b_8f3f2b_a_ to 2085.va_c531db_287b_d (jenkinsci#8535)
  [JENKINS-72067] High memory usage from `XStream2.AssociatedConverterImpl` (jenkinsci#8529)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted
Projects
None yet
5 participants