Is the "dialogflow-fulfillment-nodejs" library still maintained or do I need to switch to the "Dialogflow API: Node.js Client" library? - google-cloud-platform

I realized in the github of the library "dialogflow-fulfillment-nodejs" that there are no new updates and many discussions about whether the library will continue even in the "README.md" they wrote "Warning: This library is no longer maintained. It should only be used when using the inline editor. "
I've been doing tests with the In-line Editor on DialogFlow but I realized that when I changed the Cloud Functions the version from Node 8 to Node 10, because Firebase says that the support for Node 8 will end, I thought about changing the version, however I had a lot of problems when doing Deploy in the In-line Editor so I thought if the problem of the library itself that still uses Node 6 in package.json?
Is that a problem with this library that still uses Node 6 so when changing to Node 10 in Cloud Functions he stopped doing Deploy?
What should I use in my webhook service?

As you can read from the public repository, the library is not longer maintained. However, it also says:
... it should only be used when using the inline editor
Also when looking at the Dialogflow console under the Fulfillment section the Inline Editor option when enabled, it states:
Newly created cloud functions now use Node.js 10 as runtime engine.
Check migration guide for more details.
For a graphical reference, see img.
I've created my last Cloud Function recently and can confirm that when looking at the package.json file the engine has the version properly set.
So even if the library is no longer maintained, the support within the Inline Editor remains available and I don't see anything about it being deprecated on their documentation. My conclusion is that you can use it with confidence.
Finally, regarding your issue about deploying the Cloud Function using the Inline Editor, it may be because of something else. My guess is that you or someone with the required permissions, made a change on the Cloud Function directly and not using the Inline Editor; thus, falling in an scenario mentioned on the limitations section, that states the following:
If you modify your code with the Cloud Functions console, you can no
longer use the inline editor to modify your code. Your function will
continue to provide fulfillment for your agent, but future edits must
be made in the Cloud Functions console.
If you would like to keep using Inline Editor to deploy your future changes, I suggest you to backup your Cloud Function, and create a new one using Inline Editor (for that you may need to disable the Inline Editor and remove manually the Cloud Function previously created, remember to backup your code and configuration).

The Dialogflow API: Node.js Client is not a library for use in the fulfillment webhook. It is meant to be used as a client that calls Dialogflow to either build/edit agents or submit content to determine a matching Intent.
For webhooks, you're expected to parse the JSON yourself and send a validly formatted JSON as part of the response. While the dialogflow-fulfillment-nodejs library isn't deprecated, as noted, it also isn't maintained. So if Dialogflow ES ever does get updates - the library likely will not. There are third-party libraries such as multivocal that are being worked on to provide fulfillment, and these can work in the inline editor.

Related

`gsutil equivalent` missing in GCP User Interface

I am doing a tutorial on Google Certified Associate Cloud Engineer 2020, which used to be on Udemy and now is on Cloud Guru. I am watching a video on GCS: Google Cloud Storage.
At one point tutor, while using GCP User Interface, is renaming a file. In the window Rename Object, a great feature shows gsutil equivalent.
This gsutil equivalent is not showing on my GCP User Interface. Is there any option to turn this on, or is this a feature that no longer exists?
I have tried to look at different options in User Interface, but I cannot find the option I am looking for. I have tried to Google this, but most things that come up are more related to gsutil itself rather than User Interface.
Related to your question if you have to activate something to be able to get this feature, the answer is that you don’t have to activate anything as there is no way to activate it because this is a feature from the GCP UI interface that has been changed since the video that you used as a reference was released.
If you want to get the same gsutil command you would be able if you click on move option instead of using rename. This will open another window where you would find the same gsutil command as you found in the image that you shared.
The reason why the same command is present in the move option as it was in the rename is because in the end a rename the same as a move, which is in fact a 2-step process: a copy and a delete, as can be seen in the steps to rename using the REST API as described in the docs.
In the case that you want this feature to be again available on the GCP UI you can always open a Feature Request in the Issue Tracker asking for it.
Rename feature is also available in GCP Console Just Chek following screenshots
Check This :
https://i.stack.imgur.com/b8pyW.png

How to review code of previously created function in AWS Lambda

i am new to AWS.
I need to create a Lambda function in AWS, but before it i need to review some code of previously created functions. But when i want to review code of function there's a message
The deployment package of your Lambda function "tes-GetInfo" is too large to enable inline code editing. However, you can still invoke your function.
Does anyone know is it possible to some how review it in AWS.
I was looking a lot but still haven't found any ways to do it here.
You can download your function code by exporting it, assuming your function was developed in some interpreted language like JavaScript/Python.
This can be done by doing an export to the function:
Go to your function and in the Actions dropdown select Export function:
Chose Download deployment package.
This will download the deployed function locally and you will be able to investigate your code.

AWS Lambda diff between code in editor and deployed

The title really says it all, I haven't been able to find any information on it, so I'm assuming it's not possible without external source control but is there any way to see what the difference between the lambda code currently deployed and what changes are waiting to be deployed?
The only way to compare versions of your function (at a code level comparison) is by using external source control options like git.

Using cloud functions vs cloud run as webhook for dialogflow

I don't know much about web development and cloud computing. From what I've read when using Cloud functions as the webhook service for dialogflow, you are limited to write code in just 1 source file. I would like to create a real complex dialogflow agent, so It would be handy to have an organized code structure to make the development easier.
I've recently discovered Cloud run which seems like it can also handle webhook requests and makes it possible to develop a complex code structure.
I don't want to use Cloud Run just because it is inconvenient to write everything in one file, but on the other hand it would be strange to have a cloud function with a single file with thousands of lines of code.
Is it possible to have multiple files in a single cloud function?
Is cloud run suitable for my problem? (create a complex dialogflow agent)
Is it possible to have multiple files in a single cloud function?
Yes. When you deploy to Google Cloud Functions you create a bundle with all your source files or have it pull from a source repository.
But Dialogflow only allows index.js and package.json in the Built-In Editor
For simplicity, the built-in code editor only allows you to edit those two files. But the built-in editor is mostly just meant for basic testing. If you're doing serious coding, you probably already have an environment you prefer to use to code and deploy that code.
Is Cloud Run suitable?
Certainly. The biggest thing Cloud Run will get you is complete control over your runtime environment, since you're specifying the details of that environment in addition to the code.
The biggest downside, however, is that you also have to determine details of that environment. Cloud Funcitons provide an HTTPS server without you having to worry about those details, as long as the rest of the environment is suitable.
What other options do I have?
Anywhere you want! Dialogflow only requires that your webhook
Be at a public address (ie - one that Google can resolve and reach)
Runs an HTTPS server at that address with a non-self-signed certificate
During testing, it is common to run it on your own machine via a tunnel such as ngrok, but this isn't a good idea in production. If you're already familiar with running an HTTPS server in another environment, and you wish to continue using that environment, you should be fine.

How to download and edit lambda with AWS explorer

I'm trying to use AWS explorer in PyCharm to download and edit an existing lambda function on my AWS account, but I'm unable to find out how to do that. I've read through all the documentation available on the wiki as well as followed a bunch of tutorials on deploying new lambda functions, but I can't find out how to edit and download existing functions. I can download the AWS lambda using the console, but I'm not sure how to get this to be editable in my PyCharm project, but this also seems like a workaround anyway. Is there a way to do this within the AWS Explorer tool?
No, currently (Oct 2019) you can't download a Lambda Function's source and edit it locally. If you know the name of the S3 object where the code is stored, you could pull that file down adn make changes, re-zip it, re-upload it back to S3, force the Lambda to cold-start (change the memory slider) and it will pick up the new code. but this is extremely brittle.
Have you tried cloud9, I find it the best way to work on lambdas, especially if you are working as a team. but the problem with cloud9 is also it seems it's not actively being developed and you have lots of manual work to update SAM and dev tools in there. Anyhow I still recommend cloud9.