How to find child pipeline run id of execute pipeline - azure

I want to find the expression to find the run id of child pipeline of Execute pipeline, currently I am using:
#activity('Execute Pipeline1').Output.pipeline.RunId
which is giving error. How can I access it?

I figured out that the expression "#activity('Execute Pipeline1').output" gives a JSON which is converted to a String and
hence anything beyond the output value is not being parsed as a JSON.
One way to get past this is by using a custom activity chained to the execute pipeline activity and parse it using .NET code.
Hope this helps.

Related

Can a global expression be created in Azure Data Factory?

I have certain expressions used by multiple steps in Azure Data Factory.
For instance, I get the start time of a pipeline often:
#formatDateTime(pipeline().TriggerTime, 'yyyy-MM-dd HH:mm:ss.fff')
If I need to change it for some reason, I'd need to update it everywhere.
I know about global parameters; however, is there a way to create global expressions?
Based on my knowledge, currently there is no way to have a global expression similar to Global parameters.
For you have to have a common source of truth or 1 common expression, I would suggest you to create a common pipeline in the ADF and call that pipeline via execute pipeline activity to avoid re writing the same code every where.
You could add a variable to the pipeline and set it to the appropriate value at the start of your pipeline run: https://learn.microsoft.com/en-us/azure/data-factory/control-flow-set-variable-activity
You can then refer to this variable as you do with parameters or change its value on the go.

Azure Devops API Release test results

I've got a couple of questions.
I'm trying to use the Azure DevOps API to get the test results from a release, the release has multiple tests that are listed separately in the test runs i.e they have different RunID numbers. What URI do I use to get the actual test results the way it's displayed if you click on the test results from within the release pipeline. If this cannot be done, how do I get all of the test results relating to one release and output the fail and success total of them added together.
The other way I've looked at this is to get all of the RunID's from the tests and filter through them matching the release name in the Run to the release name in the release pipeline, but seeing as there are over 1248 runs I don't want to do that.
I'm having trouble getting the run query working I don't know how to set the minLastUpdatedDate={minLastUpdatedDate} or the
maxLastUpdatedDate={maxLastUpdatedDate} are set.
https://learn.microsoft.com/en-us/rest/api/azure/devops/test/runs/query?view=azure-devops-rest-5.0
The documentation doesn't specify the format apart from date-time!
Some examples would be great.
Is DateTime format the main problem here?
"yyyy-MM-dd" and
"MM/dd/yyyy HH:mm:ss"
both worked for me, I guess more would too.
Example:
https://[...]/_apis/test/runs?minLastUpdatedDate=2019-07-02&maxLastUpdatedDate=07/05/2019 16:16:11&releaseIds=243&releaseEnvIds=2899&api-version=5.0

How to stop the whole test execution but with PASS status in RobotFramework?

Is there any way I can stop the whole robot test execution with PASS status?
For some specific reasons, I need to stop the whole test but still get a GREEN report.
Currently I am using FATAL ERROR which will raise a assertion error and return FAIL to report.
I was trying to create a user keyword to do this, but I am not really familiar with the robot error handling process, could anyone help?
There's an attribute ROBOT_EXIT_ON_FAILURE in BuiltIn.py, and I am thinking about to create another attribute like ROBOT_EXIT_ON_SUCCESS, but have no idea how to.
Environment: robotframework==3.0.2 with Python 3.6.5
There is nothing built-in to support this. By design, a fatal error will cause all remaining tests and suites to have a FAIL status.
Just about your only choice is to write a keyword that sets a global variable, and then have every test include a setup that uses pass execution if to skip the test if the flag is set.
If I understood you correctly, you need to pass the test execution forcefully and return green status for that test, is that right? You have a built in keyword "Pass Execution" for that. Did you try using that?

Jmeter passes steps and not print to consul

I am facing an issue that I could not understand how to resolve.
I created a test plan that need to connect DB and count the results.
The problem is that Jmeter not perform any validation afterwards, I created a JSSR223 in the JDBC request and just want to print the results and Jmeter not print.
I created another sampler to print the DB results and still Jmeter not printing.
Jmeter just passes this steps,
In the results tree I saw that it connects to DB and failed in the assertion, but why it passes the other steps? and just moving to debug sampler?
I can not print the results, I can not perform any debug since it is just black box.
can someone please advise?
you can see in yellow all the steps that Jmeter not performed and just not exists in the results tree.
enter image description here
Get used to check jmeter.log file, it normally contains information regarding what went wrong, you should be able to figure out the root cause by looking into the log file. If you are not - update your question with jmeter.log file contents (at least essential parts)
My expectation is that your ${Conv_sense} variable is not defined (or cannot be cast to Integer). Double check whether it is defined or not using Debug Sampler and View Results Tree listener combination.
Also don't refer JMeter Variables like ${Conv_sense} in Groovy scripts body, use vars.get('Conv_sense}') instead, otherwise it might conflict with Groovy GStringTemplate resulting in undefined behavior.

Does Get-AzureRmHdInsightJobOutput return an object?

I am currently working on a pre-existing kettle job that calls a powershell script that sends Azure HdInsight a pig job. Get-AzureHdInsightJobOutput is part of this script and is now deprecated. So I am replacing it with Get-AzureRmHdInsightJobOutput. However the new cmdlet has two parameter sets, one for display and one for download. I need an object to be returned in order to avoid making changes to the kettle job.
I'm hoping to find out if the display parameters will return an object or if they just print out the results.
Yes, Get-AzureRmHdInsightJobOutput cmdlet will return string object when in use with the Display parameter set, regardless of the DisplayOutputType.
You can refer to the source code of this cmdlet below in the Azure PowerShell github link:
GetAzureHDInsightJobOutputCommand.cs
Hope this helps!

Resources