VSTS Extension - Release definition data, environment ids - azure-devops

I am developing web extension for VSTS. I am using vss sdk of Microsoft.
I got some issue.
You can see on the image that there is new line - App insights Settings
This pop up appears on clicking on 3 dots near every release definition on page of list of all releases.
This button navigates user to some environment of some specific release.
Example of link:
https://ozcodedev.visualstudio.com/OzCode/_releaseProgress?releaseId=372&_a=release-environment-logs&environmentId=850
The problem that I do not know how to fetch list of releases and environments for building this link.
How can I get them on page All release pipelines.

Through the GUI it is not possible to get all the release ids and the environment ids for each step. However this is possible through the VSTS APIS. You could use the release endpoint to and iterate to obtain your release id
https://{accountName}.vsrm.visualstudio.com/{project}/_apis/release/releases?api-version=4.1-preview.6
Once you have the release id you can use it like so
https://{accountName}.vsrm.visualstudio.com/{project}/_apis/release/releases/{releaseId}?api-version=4.1-preview.6
Within the returned JSON you can follow iterate the path environment[n].id to obtain the environment id.
You can then construct the link using this information.
Hope that helps

Ok. So after working 2 days on this issue I found solution.
1.It is possible to fetch data that I wanted on Client Side. For this I used Microsoft's library vss-web-extension-sdk. Install it - npm install vss-web-extension-sd --save.
2.Add relevant scopes to your vss-extension.json. In my case the problem was - that I needed data that relates to managing of VSTS user releases. So after Including "vso.release_manage" to my scopes array I stopped to got 401 Unauthorized error because access token was changed according to new scopes.
https://learn.microsoft.com/en-us/vsts/extend/develop/manifest?view=vsts#scopes
In this documentation you can check which scope controls which resources that can be accessed by your extension.

You can use our ts/js clients to get whatever you want for your experience.
We have extensive documentation available here. Let me know if you are blocked anywhere.

Related

Action on Google deploy tab returns 504

When trying to access https://console.actions.google.com/project/*project-id*/release/ I get following error message:
If I open the developer console in Chrome and check for failed network calls it shows a 504 on https://console.actions.google.com/m/actions/agents/versions/get?projectNumber=*project-number* with this body:
I tried clearing my cache and tested on multiple browsers but since it also happens on other devices I guess this is a server issue.
Anyone who can help me out?
I was experiencing the same issue for a published Action.
According to Actions on Google support, it's because the cumulative size of all the versions of our action were causing that version request to timeout when it tries to pre-load them all at once.
The solution for me was to, raise a support request (I clicked the link in your screenshot, Actions on Google Support, included a screenshot of that message, request type deployment issue and a brief description of not being able to access the deploy/test tabs) and then when support responded, they asked which versions to keep/delete. I said delete all except one version either side of the currently deployed version.
A note on preventing this - I couldn't find a consistent method for deleting versions/releases. I believe the versions created in Dialogflow by doing a Publish A Version can be deleted in Dialogflow. But versions created by releases in Actions on Google, have the delete options greyed out in Dialogflow, and I couldn't find where to do that in Actions on Google.

Any way to get a link to a GitHub action's latest result?

GitHub's Actions feature recently started letting users generate badges, to showcase the status of their tests. For example, if I have a set of tests that run on my repo's dev branch from a file named .github/test_dev.yml, I can access that build's status by adding /badge.svg to the end of the test's URL.
https://github.com/<username>/<repo_name>/actions/workflows/test_dev.yml/badge.svg
That's great from the standpoint of keeping your project readme up to date with the status of the project, but the next logical step would be to also add a link to the badge that points to the latest testing outcome.
Unfortunately, even though you can access all the tests of a particular action as follows:
https://github.com/<username>/<repo_name>/actions/workflows/test_dev.yml
The test runs themselves seem to be behind a unique ID under actions/runs/.
https://github.com/<username>/<repo_name>/actions/runs/1234567890
Is there any way to construct a URL that just points to the latest test? Something like:
https://github.com/<username>/<repo_name>/actions/workflows/test_dev.yml?result=latest
I poked through GitHub's documentation, but even though there's some documentation surrounding the generation of those badge SVG's, I couldn't find anything about linking directly to the action that actually generated that SVG.
you can use this to get the id in a yaml file:
https://github.com/<username>/<repo_name>/actions/runs/${{ github.run_id }}

Google Actions CLI 3.1.0 version and actions.intent.TEXT

I want to be able to talk with Google Assistant, but connect the Actions project directly to an NLP service I already have running on my server. In other words, NOT use dialogflow.
All the following examples show how to do this.
With Rasa
https://blog.rasa.com/going-beyond-hey-google-building-a-rasa-powered-google-assistant/
With LUIS
https://www.grokkingandroid.com/using-the-actions-sdk/
https://dzone.com/articles/using-the-actions-sdk-for-google-assistant-develop
With Watson
https://www.youtube.com/watch?v=no0R0bSkHXc
They use the actions.intent.MAIN as the invocation and actions.intent.TEXT for all other utterances from the talker.
This is what I need. I don’t want to create a load of intents, with utterance phrases, inside the Action because I just want all the phrases spoken by the talker to be passed to my server, and for my NLP service to deal with them.
So I set up a new Action project, install the Actions CLI and then spend 3 days trying all possible combinations without success, because all these examples are using gactions cli 2.1.3 and Google have now moved on to gactions cli 3.1.0.
Not only have the commands changed, but so too has the file formats and structure.
It appears there is also a new Google Actions Console, and actions.intent.TEXT is no longer available.
My Action is webhook connected to my server, but I cannot figure out how to get the action.intent.TEXT included and working.
Everything I find, even here
Publishing Actions on google without Dialogflow
is pre version update and follows the same pattern.
Can anyone point to an up-to-date, v3.1.0, discussion, tutorial or example about how to send all talker phrases through to an NLP that isn’t dialogflow, or has Google closed that avenue?
Is it possible to somehow go back and use the 2.1 CLI either with the new Console or revert the console back. (I have both CLI versions, I can see how different their commands are)
Is it possible to go back and use 2.1?
There is no way to go back to AoG 2. You probably also don't want to do so - newer features aren't available with v2 and are only available with v3.
Can I use my own NLP with v3?
Yes, although it isn't as obvious, and there are some changes in semantics.
As an overview, what you'll need to do is:
Create a Type that can accept "Free form text". I usually call this type "Any".
In the console, it looks something like this:
Create a Custom Intent that has a single parameter of this Any Type and at least one phrase that captures everything for this parameter. (So you should add one training phrase, highlight the entire phrase, and set it for the parameter. Sometimes I also add additional phrases that includes words that I don't want to capture.) I usually call the Intent "matchAny" and the parameter "any".
In the console, it could be something like this:
Finally, you'll have a Scene that you transition to from the Main invocation. When it matches the "matchAny" Intent, it should call your webhook with a handler name. Your webhook will be called with the "any" parameter set with the user utterance. (Note that the JSON has also changed.
Again, the console might have it looking something like this:
That seems like a lot of work. Isn't there just some way to do all that from the command line?
Yes. You can do all of that in the configuration files that the CLI accesses and then upload it. (You can then also use the console to review the configuration, if necessary, to make sure they're configured as you expect. You can shift back and forth between them as appropriate.)
Google also has a github repository that contains most of the files pre-configured for this sort of setup.
You will need to update the configuration from the repository to handle the webhook correctly (it includes code to illustrate what is happening using the inline code editor) and to add your project ID.

AWS Amplify iOS SDK problem after adding REST API to Swift project

I'm having a problem after adding the AWS Amplify iOS SDK REST API to my project. I am unable to build my project due to 3 fatal compiler errors in one Amplify added file (*Client.swift under the generated-src folder), and I don't know what to do about them.
Everything was going very well with my iOS app after leveraging the Drop-in UI for authentication: I was able to sign in via my pre-existing Amazon Cognito User Pool. So, things were working.
Next step, I wanted to access a pre-existing DynamoDB table. It seems that the way to do this in an Amplify context is to add the REST API.
Following the steps in the link above, I knew Amplify was doing something I didn't want it to do by creating its own Cognito User Pool; I guess because I specified that I wanted to "Restrict API access" to authenticated users. What I expected is that I would restrict access on the basis of my already existing Cognito User Pool, not a new one.
Anyway, that is not my immediate problem.
After issuing the pod install --repo-update command, I added the new generated-src folder to my project. I thought it was curious that my awsconfiguration.json had not changed. At that point, as instructed, I attempted to build the project but was unable to do so due to those 3 errors.
/Users/xxxxx/Dev/iOS/xxxxxxxxxx/generated-src/xxxxxxxxxxxClient.swift:148:34:
Cannot assign to property: 'endpoint' is a get-only property
/Users/xxxxx/Dev/iOS/xxxxxxxxxx/generated-src/xxxxxxxxxxxClient.swift:174:13:
Value of type 'xxxxxxxxxxxClient' has no member 'invokeHTTPRequest'
/Users/xxxxx/Dev/iOS/xxxxxxxxxxx/generated-src/xxxxxxxxxxxClient.swift:195:13:
Value of type 'xxxxxxxxxxxClient' has no member 'invokeHTTPRequest'
I cannot advance to the next step (thinking it might be the reason for those errors) because the Build Settings tab for my project doesn't show an Objective-C Bridging Header category. (Yes, I presume? Until built?)
Can someone help me out?
The good developers over at AWS Amplify's iOS SDK Github repo answered my question. As a result, they are updating the REST API guide to reflect the proper order of steps.
To summarize: you must add the Objective-C bridging header path to the Build Settings for the project. It was not obvious to me where to find this setting, but they posted a screenshot showing how to find it. Filtering without choosing those explicit settings did not turn it up in my case.

TeamCity REST Api supported requests and names of parameters

I was trying to use the REST API of TeamCity but i can't find a list of all supported requests and the names of parameters. I wanted to look it up in their official documentation (https://confluence.jetbrains.com/display/TCD10/REST+API)
where a link to exactly this list is provided
(http://teamcity:8111/app/rest/application.wadl)
but i just can't connect to it. Seems like the page is down.
I have googled all kinds of stuff in the hope to find this list somewhere else but i couldn't find anything smart.
Does anyone know where to find such a list or can provide one? That would be fantastic.
Thanks
You can find available API on the public teamcity:
https://teamcity.jetbrains.com/app/rest/swagger.json
You can navigate through the response inside the paths and look at supported methods, and required parameters for each API.
You can also access to the .wadl on the public teamcity server:
https://teamcity.jetbrains.com/app/rest/application.wadl
When you are inside the documentation of teamcity, they use teamcity:8111 as your own teamcity, installed on your server.
The URL examples on this page assume that your TeamCity server web UI is accessible via the http://teamcity:8111 URL.
If you download a copy of teamcity, start a copy of the server, and then connect to /app/rest/application.wadl, you will probably get a copy of representation.