Skip to content

Conversation

@VinozzZ
Copy link
Contributor

@VinozzZ VinozzZ commented Feb 8, 2023

What does this change

Sometimes, a test in our CI build randomly times out when trying to install a plugin. see the log here: https://github.com/getporter/operator/actions/runs/4116258618/jobs/7106066540

I found that it's due to a race condition if two AgentConfig reconcile requests comes in around the same time before a AgentAction is created for installing a plugin.
Currently, this will cause two empty temporary plugin persistent volume claims being created. Then the rename for the plugin pvc will never proceed.

This PR fix the check that determine whether a plugin volume already exists.

What issue does it fix

Notes for the reviewer

Put any questions or notes for the reviewer here.

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you make any API changes? Update the corresponding API documentation.

@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Merging #152 (7065b90) into main (740f5f5) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #152      +/-   ##
==========================================
- Coverage   76.75%   76.73%   -0.02%     
==========================================
  Files          13       13              
  Lines        1540     1539       -1     
==========================================
- Hits         1182     1181       -1     
  Misses        227      227              
  Partials      131      131              
Flag Coverage Δ
unit-tests 76.73% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
controllers/agentconfig_controller.go 72.38% <100.00%> (-0.07%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@carolynvs carolynvs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm so glad you caught this! 👍

@VinozzZ VinozzZ merged commit c1444f6 into getporter:main Feb 8, 2023
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.

2 participants