Semantic-release release-notes-generator how to teach new types - semantic-release

Can anyone give us a hint how to configure #semantic-release/release-notes-generator to take extra commit types (those additional to preset ones) while generating release-notes?
Our commits-analyzer config:
"#semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{
"type": "refactor",
"release": "patch"
},
{
"type": "minfeat",
"release": "patch"
}
]
}
At this moment we have no extra configuration for #semantic-release/release-notes-generator, and surely it requires some as new types don't show up in changelog that is generated by #semantic-release/changelog after release-notes-generator runs

You will have to implement your own conventional-changelog preset in order to handle those new commit type.
For example the default angular preset handles only certain commit types: https://github.com/conventional-changelog/conventional-changelog/blob/e865af4df8d06795cebc7af09364ade19119e089/packages/conventional-changelog-angular/writer-opts.js#L36

Related

How to quantize specific layers on OpenVINO Workbench?

I have a trained onnx model that needs to be quantized to INT8. But I want my last fully connected layers are still in FP32 or FP16. So how can I choose specific layers to quantize (or not to quantize)?
PS when I was working with NNCF, I just use parametr ignored_scopes. Maybe is there something similar here at Workbench?
Use "ignored" parameter in configuration file to exclude nodes or operation types from optimization.
"algorithms": [
{
"name": "DefaultQuantization", // Optimization algorithm name
"params": {
"ignored": {
// List of nodes that are excluded from optimization
"scope": [
"<NODE_NAME>"
],
// List of types that are excluded from optimization
"operations": [
{
"type": "<NODE_TYPE>",
// Includes excluding by attributes
"attributes": {
"<NAME>": "<VALUE>" // Lists of values is not included
}
},
{
"type": "<NODE_TYPE>" // Excluding only by type
}
]
}

Using reference funtion in an ARM template parameter file

Is there anyway to use the reference funtion in an ARM parameter file? I understand the following can be used to retrieve the intrumentation key of an app insights instance but this doesnt seem to work in a parameter file.
"[reference('microsoft.insights/components/web-app-name-01', '2015-05-01').InstrumentationKey]"
I currently set a long list of environment variables using an array from a parameter file and need to include the dynamic app insights instrumentation key to that list of variables.
Unfortunately, no.
Reference function only works at runtime. It can't be used in the parameters or variables sections because both are resolved during the initial parsing phase of the template.
Here is an excerpt from the docs and also how to use reference correctly:
You can't use the reference function in the variables section of the template. The reference function derives its value from the resource's runtime state. However, variables are resolved during the initial parsing of the template. Construct values that need the reference function directly in the resources or outputs section of the template.
Not in a param file... it's possible to simulate what you want by nested a deployment if that's an option. So your param file can contain the resourceId of the insights resource and then a nested deployment can make the reference call - but TBH, probably easier to fetch the key as a pipeline step (or similar).
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"insightsResourceId": {
"type": "string",
"defaultValue": "'microsoft.insights/components/web-app-name-01'"
}
},
"resources": [
{
"apiVersion": "2018-02-01",
"type": "Microsoft.Resources/deployments",
"name": "nestedDeployment",
"properties": {
"mode": "Incremental",
"parameters": {
"instrumentationKey": {
"value": "[reference(parameters('insightsResourceId'), '2015-05-01').InstrumentationKey]"
}
},
"template": {
// original template goes here
}
}
}
]
}
Way 1
Use the reference function in your parameter file for resources that are already deployed in another template. For that you have to pass the ApiVersion parameter. Refer MsDoc. which follows:
"value": "[reference(resourceId(variables('<AppInsightsResourceGroup>'),'Microsoft.Insights/components', variables('<ApplicationInsightsName>')), '2015-05-01', 'Full').properties.InstrumentationKey]"
You need to change the property that you are referencing from '.InstrumentationKey' to '.properties.InstrumentationKey'.
Refer to Kwill answer for more information.
Way 2
Get the Content of parameter file in PowerShell variable/Object using
$ParameterObject = Get-Content ./ParameterFileName.json
Update the Parameter file values using
#Assign the parameter values using
$ParameterObject.parameters.<KeyName>.value = "your dynamic value"
Pass $parameterObject to -TemplateParameterObject parameter
Refer here
Way 3
You have to Add/Modify the parameter file values using (PowerShell/ Dev lang (like Python, c#,...) ). After changing the parameter file try to deploy it.

How to only create a PR for matchedDependencies with Renovate

I want to only create a Pull Request for the below specified dependencies. All other dependencies should not be considered. The config below does not do that because I get separate PR's for all dependencies that do not match the rules I specified. For example I get a PR for SimpleInjector.
How can I get one PR only for the Dependencies that match, but no other PR's at all without creating explicit exclusion rules for every dependency?
"packageRules": [
{
"matchPackagePatterns": [
"System.*",
],
"excludePackageNames": ["Microsoft.CodeAnalysis.FxCopAnalyzers"],
"matchUpdateTypes": [
"minor",
"patch"
],
"groupName": "non major",
"groupSlug": "non-major"
}
]
}
There are two things to know that were key to solve this problem:
Rules get evaluated from top to bottom
All dependencies get updated by default
The config below disables all dependencies first and then selectively enables some dependencies again:
"packageRules": [
{
"matchPackagePatterns": ["*"],
"enabled": false
},
{
"matchPackagePatterns": [
"System.*",
],
"enabled": true
},
{
"matchUpdateTypes": [
"minor",
"patch"
],
"groupSlug": "non-major"
}
]
Read here: https://docs.renovatebot.com/configuration-options/#packagerules
Important to know: Renovate will evaluate all packageRules and not stop once it gets a first match. You should order your packageRules in ascending order of importance so that more important rules come later and can override settings from earlier rules if needed.

Searching custom fields in Maniphest (Phabricator)

I set up a custom field in Maniphest as a drop down. It assigns the correct value to each task, but the copy and search function don't work at all.
If I try to search by a value in this field, everything comes up matching all the other search criteria and ignores my custom field.
If I create a similar task, it always defaults back to the first option in the list.
{
"my-comp:task-type": {
"name": "Type",
"type": "select",
"options": {
"my-comp:bug": "Bug",
"my-comp:feature": "Feature",
"my-comp:ui": "UI",
"my-comp:improve": "Improvement",
"my-comp:misc": "Misc",
"my-comp:planning": "Planning"
},
"required": true,
"search": true,
"copy": true
}
}
Copy currently doesn't work: T8055. There doesn't appear to be a workaround offered at this time.
As for the search, what version are you running? I am running commit 2eab1c1943c511 from the stable branch and I am not experiencing the issue. I also upgraded to f2b2264e8def0a and I still didn't have the issue. I think you may need to upgrade your version of Phabricator.

Google Cloud Datastore runQuery returning 412 "no matching index found"

** UPDATE **
Thanks to Alfred Fuller for pointing out that I need to create a manual index for this query.
Unfortunately, using the JSON API, from a .NET application, there does not appear to be an officially supported way of doing so. In fact, there does not officially appear to be a way to do this at all from an app outside of App Engine, which is strange since the Cloud Datastore API was designed to allow access to the Datastore outside of App Engine.
The closest hack I could find was to POST the index definition using RPC to http://appengine.google.com/api/datastore/index/add. Can someone give me the raw spec for how to do this exactly (i.e. URL parameters, what exactly should the body look like, etc), perhaps using Fiddler to inspect the call made by appcfg.cmd?
** ORIGINAL QUESTION **
According to the docs, "a query can combine equality (EQUAL) filters for different properties, along with one or more inequality filters on a single property".
However, this query fails:
{
"query": {
"kinds": [
{
"name": "CodeProse.Pogo.Tests.TestPerson"
}
],
"filter": {
"compositeFilter": {
"operator": "and",
"filters": [
{
"propertyFilter": {
"operator": "equal",
"property": {
"name": "DepartmentCode"
},
"value": {
"integerValue": "123"
}
}
},
{
"propertyFilter": {
"operator": "greaterThan",
"property": {
"name": "HourlyRate"
},
"value": {
"doubleValue": 50
}
}
},
{
"propertyFilter": {
"operator": "lessThan",
"property": {
"name": "HourlyRate"
},
"value": {
"doubleValue": 100
}
}
}
]
}
}
}
}
with the following response:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "FAILED_PRECONDITION",
"message": "no matching index found.",
"locationType": "header",
"location": "If-Match"
}
],
"code": 412,
"message": "no matching index found."
}
}
The JSON API does not yet support local index generation, but we've documented a process that you can follow to generate the xml definition of the index at https://developers.google.com/datastore/docs/tools/indexconfig#Datastore_Manual_index_configuration
Please give this a shot and let us know if it doesn't work.
This is a temporary solution that we hope to replace with automatic local index generation as soon as we can.
The error "no matching index found." indicates that an index needs to be added for the query to work. See the auto index generation documentation.
In this case you need an index with the properties DepartmentCode and HourlyRate (in that order).
For gcloud-node I fixed it with those 3 links:
https://github.com/GoogleCloudPlatform/gcloud-node/issues/369
https://github.com/GoogleCloudPlatform/gcloud-node/blob/master/system-test/data/index.yaml
and most important link:
https://cloud.google.com/appengine/docs/python/config/indexconfig#Python_About_index_yaml to write your index.yaml file
As explained in the last link, an index is what allows complex queries to run faster by storing the result set of the queries in an index. When you get no matching index found it means that you tried to run a complex query involving order or filter. So to make your query work, you need to create your index on the google datastore indexes by creating a config file manually to define your indexes that represent the query you are trying to run. Here is how you fix:
create an index.yaml file in a folder named for example indexes in your app directory by following the directives for the python conf file: https://cloud.google.com/appengine/docs/python/config/indexconfig#Python_About_index_yaml or get inspiration from the gcloud-node tests in https://github.com/GoogleCloudPlatform/gcloud-node/blob/master/system-test/data/index.yaml
create the indexes from the config file with this command:
gcloud preview datastore create-indexes indexes/index.yaml
see https://cloud.google.com/sdk/gcloud/reference/preview/datastore/create-indexes
wait for the indexes to serve on your developer console in Cloud Datastore/Indexes, the interface should display "serving" once the index is built
once it is serving your query should work
For example for this query:
var q = ds.createQuery('project')
.filter('tags =', category)
.order('-date');
index.yaml looks like:
indexes:
- kind: project
ancestor: no
properties:
- name: tags
- name: date
direction: desc
Try not to order the result. After removing orderby(), it worked for me.

Resources