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

backend: implement basic functionality (PROJQUAY-7076) #2895

Merged
merged 7 commits into from
Jun 26, 2024

Conversation

Sunandadadi
Copy link
Contributor

No description provided.

@Sunandadadi
Copy link
Contributor Author

Sunandadadi commented May 20, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Sunandadadi and the rest of your teammates on Graphite Graphite

@Sunandadadi Sunandadadi changed the title backend basic funcs backend: implement basic functionality May 20, 2024
@Sunandadadi Sunandadadi marked this pull request as ready for review May 20, 2024 15:31
@Sunandadadi Sunandadadi changed the title backend: implement basic functionality backend: implement basic functionality (PROJQUAY-7076 May 20, 2024
@Sunandadadi Sunandadadi changed the title backend: implement basic functionality (PROJQUAY-7076 backend: implement basic functionality (PROJQUAY-7076) May 20, 2024
Copy link

codecov bot commented May 20, 2024

Codecov Report

Attention: Patch coverage is 86.20690% with 12 lines in your changes missing coverage. Please review.

Project coverage is 70.39%. Comparing base (80dc8c9) to head (d1f7a35).

Files Patch % Lines
util/notification.py 84.78% 4 Missing and 3 partials ⚠️
data/model/oci/tag.py 83.33% 2 Missing ⚠️
workers/gc/gcworker.py 66.66% 2 Missing ⚠️
initdb.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##           05-20-db-updates    #2895      +/-   ##
====================================================
+ Coverage             70.35%   70.39%   +0.04%     
====================================================
  Files                   439      440       +1     
  Lines                 41274    41359      +85     
  Branches               5410     5417       +7     
====================================================
+ Hits                  29037    29116      +79     
- Misses                10531    10536       +5     
- Partials               1706     1707       +1     
Flag Coverage Δ
unit 70.39% <86.20%> (+0.04%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

RepositoryNotification.last_ran_ms
< get_epoch_timestamp_ms() - task_run_interval_ms
)
| (RepositoryNotification.last_ran_ms.is_null(True)),
Copy link
Contributor

Choose a reason for hiding this comment

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

make sure last_ran_ms is indexed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, added in index here

@@ -9,6 +9,7 @@ class RepositoryNotification(
namedtuple(
"RepositoryNotification",
[
Copy link
Contributor

Choose a reason for hiding this comment

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

is this the DB ID? we shouldn't expose this to an external API

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, good point, I removed it


def _scan_notifications(self):
# scan for tags that are expiring based on configured RepositoryNotifications
scan_for_image_expiry_notifications(event_name="repo_image_expiry")
Copy link
Contributor

@syed syed Jun 25, 2024

Choose a reason for hiding this comment

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

can you use RepoImageExpiryEvent.event_name()

Copy link
Contributor

@syed syed left a comment

Choose a reason for hiding this comment

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

Lgtm

@dmage dmage merged commit 3ca24d7 into 05-20-db-updates Jun 26, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants