-
Notifications
You must be signed in to change notification settings - Fork 24
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: Update naas.secret with new method #438
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @l-loic for the pull request. I opened an issue that should be done before proceeding, it will improve the experience, because I am concerned that people might stop the kernel or restart it while the naas.list
is actually porting everything if they have a lot of secrets.
naas/secret.py
Outdated
except naas_python.domains.secret.SecretSchema.SecretNotFound: | ||
return None | ||
except: | ||
print("Secret get failed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to have a better error handling here to make sure it reflects the issue we are getting and to help the user fix the issue.
break | ||
|
||
# try: | ||
remote_secret = self.__get_remote_secret(name=name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I commented the try/except because it was messing with the SecretNotFound error. But we still need to display something if we have a connection error to api.naas.ai I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @l-loic, I bumped to the latest version of nasa-python, and the bulk create seems to work ok.
There is a last error though when trying to get a non existing secret:

This is what is expected:

@FlorentLvr @l-loic I did the secrets backup. A soon as @l-loic is fixing the last issue we are ready to merge. |
…pyter-naas/naas into 437-update-naassecret-with-new-method
|
this issue resolve #437