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

status: refactor update contract info to be a background job (SC-1411) #2409

Merged
merged 5 commits into from Feb 16, 2023

Conversation

aciba90
Copy link
Collaborator

@aciba90 aciba90 commented Jan 31, 2023

Proposed Commit Message

status: refactor update contract info to be a background job

At the moment, the backend service call to check if the
contract info has to be updated can be slow under load,
and this was executed during `pro status`, blocking it
during some seconds.

Move the update contract info check as a background job
to improve user experience.

Test Steps

Checklist

  • I have updated or added any unit tests accordingly
  • I have updated or added any integration tests accordingly
  • I have updated or added any documentation accordingly

Does this PR require extra reviews?

  • Yes
  • No

@aciba90 aciba90 changed the title status: refactor update contract info to be a background job status: refactor update contract info to be a background job (SC-1411) Feb 7, 2023
@aciba90
Copy link
Collaborator Author

aciba90 commented Feb 7, 2023

I have cherry-picked 72bdfe2 to fix a motd test and there is another unrelated test failing:

features/api_security.feature:69 Call package manifest endpoint for machine

@aciba90 aciba90 marked this pull request as ready for review February 7, 2023 09:54
Copy link
Collaborator

@orndorffgrant orndorffgrant left a comment

Choose a reason for hiding this comment

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

Looking good! Some small suggestions

features/attach_validtoken.feature Outdated Show resolved Hide resolved
lib/timer.py Outdated Show resolved Hide resolved
uaclient/jobs/update_contract_info.py Outdated Show resolved Hide resolved
@aciba90
Copy link
Collaborator Author

aciba90 commented Feb 9, 2023

Thanks for the feedback, @orndorffgrant, I have applied your comments/suggestions.

Copy link
Member

@renanrodrigo renanrodrigo left a comment

Choose a reason for hiding this comment

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

LGTM - couple small comments

uaclient/jobs/tests/test_update_contract_info.py Outdated Show resolved Hide resolved
aciba90 and others added 5 commits February 13, 2023 13:29
For bionic, we now need to install a new package to
trigger esm-apps messages. The same package is also used
to correctly populate the security-status content on Bionic
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

4 participants