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

Prevent deletion of worker when deleting its current job #2021

Merged
merged 1 commit into from
Mar 7, 2019

Conversation

Martchus
Copy link
Contributor

@Martchus Martchus commented Mar 7, 2019

See https://progress.opensuse.org/issues/37312


The deletion was caused by a cascade delete in a relationship with the jobs table. This adds a test and fixes the problem by using SET NULL instead of cascade delete.

@codecov
Copy link

codecov bot commented Mar 7, 2019

Codecov Report

Merging #2021 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2021   +/-   ##
=======================================
  Coverage   88.93%   88.93%           
=======================================
  Files         153      153           
  Lines       10362    10362           
=======================================
  Hits         9215     9215           
  Misses       1147     1147
Impacted Files Coverage Δ
lib/OpenQA/Schema.pm 100% <ø> (ø) ⬆️
lib/OpenQA/Schema/Result/Workers.pm 96.73% <ø> (ø) ⬆️
lib/OpenQA/Schema/Result/Jobs.pm 91.34% <ø> (ø) ⬆️
lib/OpenQA/WebSockets/Server.pm 89.95% <0%> (-0.46%) ⬇️
lib/OpenQA/Utils.pm 94.68% <0%> (+0.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1fea66d...1f42882. Read the comment docs.

2 similar comments
@codecov
Copy link

codecov bot commented Mar 7, 2019

Codecov Report

Merging #2021 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2021   +/-   ##
=======================================
  Coverage   88.93%   88.93%           
=======================================
  Files         153      153           
  Lines       10362    10362           
=======================================
  Hits         9215     9215           
  Misses       1147     1147
Impacted Files Coverage Δ
lib/OpenQA/Schema.pm 100% <ø> (ø) ⬆️
lib/OpenQA/Schema/Result/Workers.pm 96.73% <ø> (ø) ⬆️
lib/OpenQA/Schema/Result/Jobs.pm 91.34% <ø> (ø) ⬆️
lib/OpenQA/WebSockets/Server.pm 89.95% <0%> (-0.46%) ⬇️
lib/OpenQA/Utils.pm 94.68% <0%> (+0.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1fea66d...1f42882. Read the comment docs.

@codecov
Copy link

codecov bot commented Mar 7, 2019

Codecov Report

Merging #2021 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2021   +/-   ##
=======================================
  Coverage   88.93%   88.93%           
=======================================
  Files         153      153           
  Lines       10362    10362           
=======================================
  Hits         9215     9215           
  Misses       1147     1147
Impacted Files Coverage Δ
lib/OpenQA/Schema.pm 100% <ø> (ø) ⬆️
lib/OpenQA/Schema/Result/Workers.pm 96.73% <ø> (ø) ⬆️
lib/OpenQA/Schema/Result/Jobs.pm 91.34% <ø> (ø) ⬆️
lib/OpenQA/WebSockets/Server.pm 89.95% <0%> (-0.46%) ⬇️
lib/OpenQA/Utils.pm 94.68% <0%> (+0.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1fea66d...1f42882. Read the comment docs.

@Martchus Martchus merged commit 0a6b30b into os-autoinst:master Mar 7, 2019
@Martchus Martchus deleted the fix_worker_deletion branch March 7, 2019 13:04
coolo pushed a commit that referenced this pull request Mar 7, 2019
commit 0a6b30b
Merge: 1fea66d 1f42882
Author:     Martchus <martchus@gmx.net>
AuthorDate: Thu Mar 7 14:04:22 2019 +0100
Commit:     GitHub <noreply@github.com>
CommitDate: Thu Mar 7 14:04:22 2019 +0100

    Merge pull request #2021 from Martchus/fix_worker_deletion

    Prevent deletion of worker when deleting its current job
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants