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

Set correct age for instance which was already exists before #155

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

asmorodskyi
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #155 (956af9a) into master (7544bdc) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #155      +/-   ##
==========================================
- Coverage   80.67%   80.63%   -0.05%     
==========================================
  Files          26       26              
  Lines        1972     1973       +1     
==========================================
  Hits         1591     1591              
- Misses        381      382       +1     
Impacted Files Coverage Δ
ocw/lib/db.py 37.97% <0.00%> (-0.25%) ⬇️

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 7544bdc...956af9a. Read the comment docs.

namespace, provider, i.instance_id, i.all_time_fields())
logger.info("[%s] %s:%s instance which still exists has DELETED state in DB. Reactivating %s",
namespace, provider, i.instance_id, i.all_time_fields())
o.first_seen = i.first_seen
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, yes, this solution is better. We are maintaining the DB consistent. Good idea.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice catch!

Maybe we should do something like:
Delete and recreate or init all fields, so we do not get this situation just with a other field in the future!

@asmorodskyi asmorodskyi merged commit 42ac2a8 into SUSE:master Jul 22, 2022
Copy link
Collaborator

@pdostal pdostal left a comment

Choose a reason for hiding this comment

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

Congratulations Anton

@asmorodskyi asmorodskyi deleted the update_first_seen branch September 29, 2022 14:45
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.

4 participants