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

fix version check to work with release candidates #336

Merged
merged 1 commit into from
Jul 20, 2021

Conversation

celenechang
Copy link
Contributor

What does this PR do?

Defaulting was not behaving properly for prelease/release candidate images because of image tag comparison using semver. If -0 is added to the minVersion image being compared then prelease image tags are compared.

Ref: https://github.com/Masterminds/semver#working-with-prerelease-versions

Motivation

Unexpected behavior when testing an agent release candidate

Additional Notes

Anything else we should know when reviewing?

Describe your test plan

Test a datadog agent release candidate image with DatadogAgent in a non-Docker environment. Make sure that the DOCKER_HOST env var is not automatically set in the agent containers and the docker check does not run.

@celenechang celenechang added this to the v0.7 milestone Jul 20, 2021
@celenechang celenechang requested a review from a team as a code owner July 20, 2021 16:30
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: bug, enhancement, documentation

@celenechang celenechang added the bug Something isn't working label Jul 20, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jul 20, 2021

Codecov Report

Merging #336 (7ea885f) into main (9dd611c) will increase coverage by 3.20%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #336      +/-   ##
==========================================
+ Coverage   63.18%   66.39%   +3.20%     
==========================================
  Files          60       60              
  Lines        6609     7204     +595     
==========================================
+ Hits         4176     4783     +607     
+ Misses       2129     2117      -12     
  Partials      304      304              
Flag Coverage Δ
unittests 66.39% <50.00%> (+3.20%) ⬆️

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

Impacted Files Coverage Δ
controllers/datadogagent/finalizer.go 30.76% <0.00%> (ø)
api/v1alpha1/datadogagent_default.go 82.62% <100.00%> (+3.57%) ⬆️
controllers/datadogagent/utils.go 87.94% <0.00%> (+5.21%) ⬆️
controllers/datadogagent_controller.go 70.45% <0.00%> (+9.84%) ⬆️

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 9dd611c...7ea885f. Read the comment docs.

@celenechang celenechang merged commit 17299c9 into main Jul 20, 2021
@celenechang celenechang deleted the celene/semver_fix branch July 20, 2021 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants