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: Naas Storage API notebook #2537

Conversation

l-loic
Copy link
Contributor

@l-loic l-loic commented Jun 11, 2024

Fixes

This PR resolves #2523

What does this PR do?

Naas Storage API Notebook

@l-loic l-loic requested review from Dr0p42 and FlorentLvr June 11, 2024 08:12
@l-loic l-loic self-assigned this Jun 11, 2024
@FlorentLvr
Copy link
Contributor

@l-loic, i checked your notebook and it does respect our framework.
Could you please adapt it? 🙏 TY
https://github.com/jupyter-naas/awesome-notebooks?tab=readme-ov-file#how-is-organized-a-template

Image

@FlorentLvr
Copy link
Contributor

@l-loic, it's hard to review as the notebook is huge and has information about differents functions.
Could you please create one notebook by function like I did for asset:

  • Naas API/Naas_Create_Workspace_Storage.iypnb
  • Naas API/Naas_Delete_Workspace_Storage.iypnb
    You can merge master to your branch to check the example :)
    TY 🙏

Copy link

gitguardian bot commented Jul 2, 2024

⚠️ GitGuardian has uncovered 3 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
11541006 Triggered Generic Password 70e2000 Naas API/Naas_API_Update_Asset.ipynb View secret
11541006 Triggered Generic Password 70e2000 Naas API/Naas_API_Get_Asset.ipynb View secret
3347580 Triggered GitHub Access Token 70e2000 GitHub/GitHub_Get_commits_ranking_from_repository.ipynb View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@l-loic
Copy link
Contributor Author

l-loic commented Jul 2, 2024

@FlorentLvr hi, you may review

@FlorentLvr
Copy link
Contributor

FlorentLvr commented Jul 2, 2024

@l-loic , as we discussed, I test your notebooks and it failed on:

  • Create Storage Object: ERROR:naas_python.domains.storage.adaptors.secondary.providers.S3StorageProviderAdaptor:Parameter validation failed:
    Invalid type for parameter ContentType, value: None, type: <class 'NoneType'>, valid types: <class 'str'>
  • List Storage Objects: 401 -> On this notebook, could you please create a conditions where if storage_prefix is None then return all? TY

OK:

  • List Storage
  • Create Storage
  • Delete Storage

@FlorentLvr FlorentLvr merged commit e0f74c0 into master Jul 3, 2024
5 checks passed
@FlorentLvr FlorentLvr deleted the 2523-feat-create-notebooks-for-crud-operations-using-naas-python-for-storage branch July 3, 2024 08:12
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.

feat: Create notebooks for CRUD operations using naas-python for storage
2 participants