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/kv + routes #23

Closed
wants to merge 13 commits into from
Closed

Feat/kv + routes #23

wants to merge 13 commits into from

Conversation

thomas-mauran
Copy link
Contributor

@thomas-mauran thomas-mauran commented Aug 30, 2023

this pr has been coded by @sea-gull-diana here

What's this PR do ?

This PR takes the kv implementation from @charley04310 's PR and uses it to implement routes workloads and instances
When scheduling an instance in the POST instances route, the program creates a thread where it follows the stream returned by the scheduler and saves updates to a kv::Batch, which is read and saved to the kv store every 5 seconds.

We are also now generating uuids for instances and send them to scheduler on instance creation. These uuids can be sent to scheduler later in order to stop or destroy instances.

Other changes:

  • Created a KeyValueBatch struct which has a batch property and implements Defer and DerefMut (hopefully correctly), thus allowing me to clear the batch after every update.
  • Return instance id to client on instance creation.
  • Add mutex for kv management
  • Match status code

@thomas-mauran
Copy link
Contributor Author

ping @sameo for a review

@sameo
Copy link
Contributor

sameo commented Aug 31, 2023

@charley04310 Any idea why the CI is not triggered with that PR?

@charley04310
Copy link
Contributor

@sameo, I would say that this mainly comes from the fact that the CI is only implemented on push event. Would the workflow need updating like something like this ?

on:
  pull_request:
    paths:
      - "controller/**"

@sameo
Copy link
Contributor

sameo commented Aug 31, 2023

@sameo, I would say that this mainly comes from the fact that the CI is only implemented on push event. Would the workflow need updating like something like this ?

on:
  pull_request:
    paths:
      - "controller/**"

Ah yes, it should. Thanks!

@sameo
Copy link
Contributor

sameo commented Aug 31, 2023

All PRs should trigger the CI.

@sameo
Copy link
Contributor

sameo commented Aug 31, 2023

Please rebase this PR.

@thomas-mauran
Copy link
Contributor Author

Please rebase this PR.

Should be good now

@thomas-mauran thomas-mauran changed the title Feat/deletion routes Feat/kv + routes Sep 1, 2023
@thomas-mauran
Copy link
Contributor Author

ping @sameo for a review

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