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

Upgrade to Celery 5.0 #17

Merged

Conversation

king-alexander
Copy link
Collaborator

@king-alexander king-alexander commented Jun 27, 2022

🗣 Description

Starting with version 5.0, Celery parses command line options with Click, which introduced breaking changes. I updated the call in celery.py that starts the app accordingly.

I didn't completely avoid scope creep. In the process of upgrading, I noticed a a minor bug when the component services of admiral were starting up. Redis Commander depends upon Redis, but attempted to start first, leading to a recoverable error. This blip was corrected in docker-compose.yml.

💭 Motivation and context

This change resolves #6.

🧪 Testing

I successfully started admiral in both of its modes: celery-shell and bash. Furthermore, all unit and system tests passed.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • All new and existing tests pass.

✅ Post-merge checklist

  • Add a tag or create a release.

@king-alexander king-alexander added the dependencies Pull requests that update a dependency file label Jun 27, 2022
@king-alexander king-alexander self-assigned this Jun 27, 2022
@king-alexander king-alexander marked this pull request as ready for review June 28, 2022 14:02
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

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

Nice work @king-alexander! I noted some minor changes that I'd like to see included here before I approve.

docker-compose.yml Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
@king-alexander king-alexander force-pushed the improvement/upgrade-celery branch 2 times, most recently from 683c4b9 to e356a2d Compare June 28, 2022 19:24
@king-alexander king-alexander requested a review from dav3r June 28, 2022 19:34
docker-compose.yml Outdated Show resolved Hide resolved
Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

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

Thanks for figuring out how to get us onto the latest major version! I have some housekeeping and version pinning related feedback for you below.

docker-compose.yml Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
docker-compose.yml Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
Celery 5.0 introduced breaking changes to the command line interface.
One such change is that you can no longer pass "celery" in argv when
programatically starting the celery app. This commit updates our
invocation and requires Celery 5.0 (Singularity), the lowest stable
version we can support with this change.
@king-alexander king-alexander force-pushed the improvement/upgrade-celery branch from 782a463 to a5df33e Compare June 29, 2022 14:08
@king-alexander king-alexander force-pushed the improvement/upgrade-celery branch from 4208f55 to 8d0388f Compare June 30, 2022 14:04
@king-alexander king-alexander requested review from mcdonnnj and dav3r June 30, 2022 14:11
docker-compose.yml Outdated Show resolved Hide resolved
king-alexander and others added 2 commits June 30, 2022 15:30
The ports in use should be specified as a quoted string to avoid conflicts with YAML Base-60 floating point numbers.

Co-authored-by: Nick <[email protected]>
@king-alexander king-alexander requested a review from dav3r June 30, 2022 19:34
Quotation marks around environment variables are preferred to the -/= syntax for consistency with the rest of the file.

Co-authored-by: dav3r <[email protected]>
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

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

I think everything looks good to me now, thank you @king-alexander for sorting all of this out! ⚓

Copy link
Member

@jsf9k jsf9k left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

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

Thanks for your work on getting this upgrade across the finish line! One small suggestion just to fix a comment's alignment but otherwise LGTM ✔

docker-compose.yml Outdated Show resolved Hide resolved
@king-alexander king-alexander merged commit 6e370ab into cisagov:develop Jul 21, 2022
@king-alexander king-alexander deleted the improvement/upgrade-celery branch July 21, 2022 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to Celery 5.0
4 participants