Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab FOSS
GitLab FOSS
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 0
    • Merge Requests 0
  • Requirements
    • Requirements
    • List
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Merge Requests
  • !22276

Merged
Opened Oct 10, 2018 by Stan Hu@stanhuOwner

Fix project deletion when there is a export available

  • Overview 5
  • Commits 1
  • Pipelines 2
  • Changes 3

Project deletions were failing with "Can't modify frozen hash" because:

  1. Project#remove_exports was being called in the after_destroy hook
  2. This would remove the file and update the ImportExportUpload entry
  3. ImportExportUpload#save would attempt to write to a destroyed model

To avoid this, we just check if ImportExportUpload has been destroyed before attempting to save it.

This would have a side effect of not running after_commit hooks to delete the repository on disk, making it impossible to delete the project entirely.

Closes #52362 (closed)

Assignee
Assign to
Reviewer
Request review from
11.5
Milestone
11.5 (Past due)
Assign milestone
Time tracking
Reference: gitlab-org/gitlab-foss!22276
Source branch: sh-fix-project-deletion-with-export