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

Feature/SK-1039 | Add upload, activate & deactivate package to fedn api v1 #706

Merged
merged 5 commits into from
Sep 19, 2024

Conversation

niklastheman
Copy link
Contributor

New endpoints

  • POST /packages | Uploads a compute package. Stores file in minio and object in mongo. Sets the uploaded package as active.
  • PUT /packages/active | Expects an "id" property in the body. Sets the provided package (id) as active..
  • DELETE /packages/active | Deletes the current "active" object (compute package). Thus making no package active. The remove package is still present in the db though, just not in active stage.

New env

  • FEDN_COMPUTE_PACKAGE_DIR - config where the compute package is to be stored on disk on the server.

@github-actions github-actions bot added feature New feature or request minor labels Sep 18, 2024
except Exception:
raise
finally:
# Delete the file after it has been saved
os.remove(file_path)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Wrede removed this. Is there a reason you added this or is it a mistake?

Copy link
Member

Choose a reason for hiding this comment

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

if "name" is different, and you have many packages, is it not good to delete it?

Copy link
Member

@Wrede Wrede left a comment

Choose a reason for hiding this comment

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

approved with comment

except Exception:
raise
finally:
# Delete the file after it has been saved
os.remove(file_path)
Copy link
Member

Choose a reason for hiding this comment

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

if "name" is different, and you have many packages, is it not good to delete it?

@niklastheman niklastheman merged commit e967b4a into master Sep 19, 2024
19 checks passed
@niklastheman niklastheman deleted the feature/SK-1039 branch September 19, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants