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

✨ feat: migrates core resources to v2 APIs #340

Merged
merged 54 commits into from
Sep 4, 2024

Conversation

pallabpain
Copy link
Contributor

@pallabpain pallabpain commented Jul 30, 2024

Description

This pull request contains more than just migrating resources to v2. It also refactors the core applier in the CLI and removes the resolver cache that has been adding significant overheads while processing and applying manifests.

Demos

Performance improve in the apply and delete commands

asciicast

Depends

@pallabpain pallabpain requested review from a team as code owners July 30, 2024 18:00
@pallabpain pallabpain self-assigned this Jul 30, 2024
@pallabpain pallabpain marked this pull request as draft July 30, 2024 18:03
@pallabpain pallabpain force-pushed the feat/v2-core-migration branch 6 times, most recently from 2c85639 to c97a174 Compare July 31, 2024 18:44
@pallabpain pallabpain added 🐛 bug Something isn't working 🔨 refactor Improvements in an existing feature ✨ feature A new feature addition to the CLI labels Jul 31, 2024
@pallabpain pallabpain marked this pull request as ready for review July 31, 2024 19:00
riocli/deployment/list.py Outdated Show resolved Hide resolved
@pallabpain pallabpain requested review from amitsingh21 and rrkumarshikhar and removed request for RomilShah July 31, 2024 19:02
@pallabpain pallabpain changed the title ✨ feat: v2 core migration ✨ feat: migrates core resources to v2 APIs Aug 1, 2024
@pallabpain pallabpain force-pushed the feat/v2-core-migration branch 7 times, most recently from 1a8c9c4 to a1d347d Compare August 3, 2024 06:52
pallabpain and others added 7 commits August 22, 2024 17:20
When features is null, the jsonschema validation fails for deployment
manifests. This commit fixes the issue by extending the valid types for
features.

Wrike Ticket: https://www.wrike.com/open.htm?id=1466707323
The rio deployment update command essentially restarts the deployment
and serves no other purpose. Hence, it makes sense to rename the command
to restart. However, there may be scripts that are currently using the
update command and hence, in order to maintain compatibility, we
implement an alias in this commit and mark the update command as
deprecated.

Wrike Ticket: https://www.wrike.com/open.htm?id=1470267514
This commit introduces a sub-command to manage the CLI context.
The rio device deployment command was still using the old client to
invoke the list deployments API. This commit updates the command to use
the v2 client with the right query parameters.
This commit updates the rio deployment execute command to run commands on device deployments.

BREAKING CHANGE: The rio deployment execute command no longer supports cloud deployments.
The poll_disk method has 'Bound' in the list of statuses which caused
the apply command to fail when a deployment depends on a disk. The
poll_disk is supposed to wait until the status changes to 'Available'
before returning. This commit fixes the issue.
The replica value defaults to None in the existing implementation which
results in a wrong value sent in the query parameter. This commit fixes
the issue by setting the default to 0.

Wrike Ticket: https://www.wrike.com/open.htm?id=1478463257
@pallabpain pallabpain force-pushed the feat/v2-core-migration branch 2 times, most recently from 35951d0 to 7987a54 Compare August 22, 2024 12:02
@rapyuta-robotics rapyuta-robotics deleted a comment from github-actions bot Aug 22, 2024
@rapyuta-robotics rapyuta-robotics deleted a comment from github-actions bot Aug 22, 2024
@rapyuta-robotics rapyuta-robotics deleted a comment from github-actions bot Aug 22, 2024
This commit adds a field in the deployment schema to wait for
dependencies to come to a running state before a deployment is created.
When no disks are deleted using the rio disk delete command, the
existing implementation returns a message that's not really accurate.
Ideally, it should say that no disk was deleted. This commit fixes the
issue.

Wrike Ticket: https://www.wrike.com/open.htm?id=1478463819
@pallabpain pallabpain force-pushed the feat/v2-core-migration branch from 7987a54 to 9038bd8 Compare August 23, 2024 05:00
The files argument in the import command is variadic. If you forget
specifying a tree name and pass only file to import, it will assume the
file as the tree name and the files tuple will be empty. It has to be
handled explicitly per the documentation here:
https://click.palletsprojects.com/en/8.1.x/arguments/
When the apply or delete command fails, it doesn't clearly mention which
resource failed. This commit fixes the issue by printing the resource
name along with the eror.

Wrike Ticket: https://www.wrike.com/open.htm?id=1480954550
When deletion policy for a resource is set to `retain` in the manifest,
the delete command should print an appropriate error message.
Copy link

github-actions bot commented Sep 4, 2024

🤖 Pull Request Artifacts (#10699045624) 🎉

This commit updates the AppImage workflow to delete older comments
that publish the link to the artifacts before adding the new comment
ensuring that there's always one latest comment with the link to the
last successful AppImage build on a PR.

Wrike Ticket: https://www.wrike.com/open.htm?id=1130198233
@pallabpain pallabpain force-pushed the feat/v2-core-migration branch from 4d94770 to f645f73 Compare September 4, 2024 09:33
If REQUEST_ID is set in the system env, then all v2 API calls will
have X-Request-ID header set to the value of REQUEST_ID. This is
particularly helpful in debugging.
@pallabpain pallabpain force-pushed the feat/v2-core-migration branch from f645f73 to e6f5927 Compare September 4, 2024 09:34
@pallabpain pallabpain merged commit 5ce15f1 into devel Sep 4, 2024
8 checks passed
@rr-github-ci-user
Copy link
Collaborator

🎉 This PR is included in version 9.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pallabpain pallabpain deleted the feat/v2-core-migration branch October 14, 2024 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working ✨ feature A new feature addition to the CLI 🔨 refactor Improvements in an existing feature released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants