cwielenb/CNCF-Dataset huggingface dataset:
Project: Chef InSpec (Provisioning / Security & Compliance)
File: google_compute_instances.md

+++ title = "googlecomputeinstances resource" draft = false gh_repo = "inspec" platform = "gcp" [menu] [menu.inspec] title = "googlecomputeinstances" identifier = "inspec/resources/gcp/googlecomputeinstances.md googlecomputeinstances resource" parent = "inspec/resources/gcp" +++ A `googlecomputeinstances` is used to test a Google Instance resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource ```ruby describe googlecomputeinstances(project: 'chef-gcp-inspec', zone: 'zone') do its('instance_names') { should include 'inspec-instance' } end ``` describe googlecomputeinstances(project: 'chef-inspec-gcp', zone: 'europe-west2-a') do its('count') { should be <= 100} end describe googlecomputeinstances(project: 'chef-inspec-gcp', zone: 'europe-west2-a') do its('instance_ids.count') { should cmp 9 } end describe googlecomputeinstances(project: 'chef-inspec-gcp', zone: 'europe-west2-a') do its('instance_names') { should include "my-favorite-instance" } end Properties that can be accessed from the `googlecomputeinstances` resource: See the resource for more information. `canipforwards` : an array of `googlecomputeinstance` canipforward `cpu_platforms` : an array of `googlecomputeinstance` cpu_platform `creation_timestamps` : an array of `googlecomputeinstance` creation_timestamp `deletion_protections` : an array of `googlecomputeinstance` deletion_protection `disks` : an array of `googlecomputeinstance` disks `guest_accelerators` : an array of `googlecomputeinstance` guest_accelerators `hostnames` : an array of `googlecomputeinstance` hostname `instance_ids` : an array of `googlecomputeinstance` id `label_fingerprints` : an array of `googlecomputeinstance` label_fingerprint `labels` : an array of `googlecomputeinstance` labels `metadata` : an array of `googlecomputeinstance` metadata `machine_types` : an array of `googlecomputeinstance` machine_type `mincpuplatforms` : an array of `googlecomputeinstance` mincpuplatform `instance_names` : an array of `googlecomputeinstance` name `network_interfaces` : an array of `googlecomputeinstance` network_interfaces `schedulings` : an array of `googlecomputeinstance` scheduling `service_accounts` : an array of `googlecomputeinstance` service_accounts `shieldedinstanceconfigs` : an array of `googlecomputeinstance` shieldedinstanceconfig `statuses` : an array of `googlecomputeinstance` status `status_messages` : an array of `googlecomputeinstance` status_message `tags` : an array of `googlecomputeinstance` tags `zones` : an array of `googlecomputeinstance` zone This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. Ensure the is enabled for the current project.
Project: StarRocks (App Definition and Development / Database)
File: json_length.md

displayed_sidebar: "English" Returns the length of a JSON document. If a path is specified, this function returns the length of the value identified by the path. The length of a document is determined according to the following rules: The length of a scalar value is 1. For example, the length of `1`, `"a"`, `true`, `false`, and `null` is 1. The length of an array is the number of array elements. For example, the length of `[1, 2]` is 2. The length of an object is the number of object members. For example, the length of `{"a": 1}` is 1. The length of nested arrays or objects does not count. For example, the length of `{"a": [1, 2]}` is 1, because the nested array `[1, 2]` is not calculated into length. ```Haskell jsonlength(jsondoc[, path]) ``` `json_doc`: required, the JSON document for which to return the length. `path`: optional. It is used to return the length of a value within the document. The path generally starts with `$` and uses `.` as the path separator. `[]` is used as the array subscript, which starts from 0. Returns a value of the INT type. An error is returned if the JSON document is not a valid document. 0 is returned in any of the following scenarios: The `path` does not identify a value in the document. The path is not a valid path expression. The path contains the `` or `*` wildcard. Example 1: Return the length of a scalar value. ```Plain select json_length('1'); ++ | json_length('1') | ++ | 1 | ++ ``` Example 2: Return the length of an empty object. ```Plain select json_length('{}'); +-+ | json_length('{}') | +-+ | 0 | +-+ ``` Example 3: Return the length of an object that has data. ```Plain select json_length('{"Name": "Homer"}'); +-+ | json_length('{"Name": "Homer"}') | +-+ | 1 | +-+ ``` Example 4: Return the length of a JSON array. ```plain text select json_length('[1, 2, 3]'); +--+ | json_length('[1, 2, 3]') | +--+ | 3 | +--+ ``` Example 5: Return the length of a JSON array in which one element has a nested array. The nested array `[3, 4]` is not calculated into length. ```plain text select json_length('[1, 2, [3, 4]]'); +-+ | json_length('[1, 2, [3, 4]]') | +-+ | 3 | +-+ ``` Example 6: Return the length of an object specified by path `$.Person`. ```SQL SET @file = '{ "Person": { "Name": "Homer", "Age": 39, "Hobbies": ["Eating", "Sleeping"] } }'; select json_length(@file, '$.Person') 'Result'; ``` Example 7: Return the length of the value specified by path `$.y`. ```plain text select json_length('{"x": 1, "y": [1, 2]}', '$.y'); ++ | json_length('{"x": 1, "y": [1, 2]}', '$.y') | ++ | 2 | ++ ```
Project: KICS (Provisioning / Security & Compliance)
File: 962fa01e-b791-4dcc-b04a-4a3e7389be5e.md

title: Components Schema Definition Is Unused hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 962fa01e-b791-4dcc-b04a-4a3e7389be5e Query name: Components Schema Definition Is Unused Platform: OpenAPI Severity: <span style="color:#5bc0de">Info</span> Category: Best Practices URL: Components schemas definitions should be referenced or removed from Open API definition<br> ```json title="Positive test num. 1 - json file" hl_lines="33" { "openapi": "3.0.0", "info": { "title": "Simple API Overview", "version": "1.0.0" }, "paths": { "/": { "get": { "operationId": "listVersionsv2", "summary": "List API versions", "responses": { "200": { "$ref": "#/components/schemas/MyObject" } } } } }, "components": { "schemas": { "MyObject": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } }, "MyObject2": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } } } } } ``` ```yaml title="Positive test num. 2 - yaml file" hl_lines="22" openapi: 3.0.0 info: title: Simple API Overview version: 1.0.0 paths: "/": get: operationId: listVersionsv2 summary: List API versions responses: '200': "$ref": "#/components/schemas/MyObject" components: schemas: MyObject: type: object properties: id: type: string name: type: string MyObject2: type: object properties: id: type: string name: type: string ``` ```json title="Negative test num. 1 - json file" { "openapi": "3.0.0", "info": { "title": "Simple API Overview", "version": "1.0.0" }, "paths": { "/": { "get": { "operationId": "listVersionsv2", "summary": "List API versions", "responses": { "200": { "$ref": "#/components/schemas/MyObject" } } } } }, "components": { "schemas": { "MyObject": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } } } } } ``` ```yaml title="Negative test num. 2 - yaml file" openapi: 3.0.0 info: title: Simple API Overview version: 1.0.0 paths: "/": get: operationId: listVersionsv2 summary: List API versions responses: '200': "$ref": "#/components/schemas/MyObject" components: schemas: MyObject: type: object properties: id: type: string name: type: string ```
Project: Meshery (Provisioning / Automation & Configuration)
File: thanos.md

layout: integration title: Thanos subtitle: Collaborative and visual infrastructure as code for Thanos image: /assets/img/integrations/thanos/icons/color/thanos-color.svg permalink: extensibility/integrations/thanos docURL: https://docs.meshery.io/extensibility/integrations/thanos description: integrations-category: Observability and Analysis integrations-subcategory: Monitoring registrant: Artifact Hub components: featureList: [ "Drag-n-drop cloud native infrastructure designer to configure, model, and deploy your workloads.", "Invite anyone to review and make changes to your private designs.", "Ongoing synchronization of Kubernetes configuration and changes across any number of clusters." ] howItWorks: "Collaborative Infrastructure as Code" howItWorksDetails: "Collaboratively manage infrastructure with your coworkers synchronously sharing the same designs." language: en list: include type: extensibility category: integrations
Project: Apache Storm (App Definition and Development / Streaming & Messaging)
File: Acking-framework-implementation.md

title: Acking framework implementation layout: documentation documentation: true tracks completion of each tupletree with a checksum hash: each time a tuple is sent, its value is XORed into the checksum, and each time a tuple is acked its value is XORed in again. If all tuples have been successfully acked, the checksum will be zero (the odds that the checksum will be zero otherwise are vanishingly small). You can read a bit more about the elsewhere on the wiki -- this explains the internal details. The acker is actually a regular bolt. When a new tupletree is born, the spout sends the XORed edge-ids of each tuple recipient, which the acker records in its `pending` ledger. Every time an executor acks a tuple, the acker receives a partial checksum that is the XOR of the tuple's own edge-id (clearing it from the ledger) and the edge-id of each downstream tuple the executor emitted (thus entering them into the ledger). This is accomplished as follows. On a tick tuple, just advance pending tupletree checksums towards death and return. Otherwise, update or create the record for this tupletree: on init: initialize with the given checksum value, and record the spout's id for later. on ack: xor the partial checksum into the existing checksum value on fail: just mark it as failed Next, put the record into the RotatingMap (thus resetting is countdown to expiry) and take action: if the total checksum is zero, the tupletree is complete: remove it from the pending collection and notify the spout of success if the tupletree has failed, it is also complete: remove it from the pending collection and notify the spout of failure Finally, pass on an ack of our own. The acker stores pending tuples in a , a simple device used in several places within Storm to efficiently time-expire a process. The RotatingMap behaves as a HashMap, and offers the same O(1) access guarantees. Internally, it holds several HashMaps ('buckets') of its own, each holding a cohort of records that will expire at the same time. Let's call the longest-lived bucket death row, and the most recent the nursery. Whenever a value is `.put()` to the RotatingMap, it is relocated to the nursery -- and removed from any other bucket it might have been in (effectively resetting its death clock). Whenever its owner calls `.rotate()`, the RotatingMap advances each cohort one step further towards expiration. (Typically, Storm objects call rotate on every receipt of a system tick stream tuple.) If there are any key-value pairs in the former death row bucket, the RotatingMap invokes a callback (given in the constructor) for each key-value pair, letting its owner take appropriate action (eg, failing a tuple.
Project: Trivy (Provisioning / Security & Compliance)
File: trivy_plugin_update.md

Update the local copy of the plugin index ``` trivy plugin update ``` ``` -h, --help help for update ``` ``` --cache-dir string cache directory (default "/path/to/cache") -c, --config string config path (default "trivy.yaml") -d, --debug debug mode --generate-default-config write the default config to trivy-default.yaml --insecure allow insecure server connections -q, --quiet suppress progress bar and log output --timeout duration timeout (default 5m0s) -v, --version show version ``` - Manage plugins
Project: YDB (App Definition and Development / Database)
File: balancing_load.md

{{ ydb-short-name }} supports two methods for disk load balancing: . . At the bottom of the page, there is a button named "Reassign Groups". As a result of some operations, such as , VDisks can be distributed across block store volumes unevenly. You can distribute them more evenly in one of the following ways: one by one from overloaded block store volumes. Use . The command below moves a VDisk from an overloaded block store volume to a less loaded one: ```bash ydb-dstool -e <bs_endpoint> cluster balance ``` The command moves a single VDisk per run. To add storage groups, redefine the host config by increasing the number of slots on PDisks. Before that, you need to get the config to be changed. You can do this with the following command: ```proto Command { TReadHostConfig{ HostConfigId: <host-config-id> } } ``` ```bash ydbd -s <endpoint> admin bs config invoke --proto-file ReadHostConfig.txt ``` Insert the obtained config into the protobuf below and edit the PDiskConfig/ExpectedSlotCount field value in it. ```proto Command { TDefineHostConfig { <host config> } } ``` ```bash ydbd -s <endpoint> admin bs config invoke --proto-file DefineHostConfig.txt ```
Project: Infinispan (App Definition and Development / Database)
File: README.md

Infinispan Server Integration Tests ======== This module contains the Infinispan Server Integration test suite. It uses `infinispan-server-testdriver` as a harness. Tests are annotated with JUnit's `@Category` annotation. The following categories are available: `Java11` `Persistence` `Profiling` `Resilience` `Security` `Smoke` `Stress` `Unstable` The default is to run all categories, except `[Unstable, Profiling, Stress]`, but this can be overridden by setting the `defaultJUnitGroups` system property, e.g. `mvn -DdefaultExcludedJUnitGroups=Persistence ...` The JDBC tests can run against either standalone or containerized databases. The default is to test against containerized versions of H2, MySQL and PostgreSQL. You can specify a different set of databases by setting the system property `org.infinispan.test.database.types`, e.g.: `mvn -Dorg.infinispan.test.database.types=h2,mysql,postgres,mariadb,oracle,db2,sql_server ...` In order for the test to work, for each supplied database name `id` there must be a `src/test/resources/database/id.properties` file which describes the database types and configuration. You can also use the `org.infinispan.test.database.properties.path`system property to specify the path to your database configuration To add JDBC drivers to the servers in order to run tests against specific databases, you can use `org.infinispan.test.database.jdbc.drivers` or `org.infinispan.test.database.jdbc.drivers.file` system property: `mvn -Dorg.infinispan.test.database.jdbc.drivers=com.h2database:h2:1.4.199,com.oracle.jdbc:ojdbc8:jar:18.3.0.0 ...` `mvn -Dorg.infinispan.test.database.jdbc.drivers.file=/opt/jdbc-drivers.txt` You can also specify an external JDBC driver which is not find into maven repositories using `org.infinispan.test.database.jdbc.drivers.external` system property, e.g.:: `mvn -Dorg.infinispan.test.database.jdbc.drivers.external="/opt/jconn4.jar,/opt/another-jdbc.driver.jar` To pass in the address of external databases, use the `org.infinispan.server.test.database.id.address` system property, replacing `id` with the name of your database: `mvn -Dorg.infinispan.server.test.database.db2.address=10.1.2.3 ...` This `@ClassRule` configures and manages an ApacheDS LDAP server using a supplied LDIF. The LDAP server is executed embedded in the same JVM which is running the test. This `@ClassRule` configures and manages a KeyCloak server with a supplied JSON export file. The KeyCloak server is executed within a Docker container.
Project: Meshery (Provisioning / Automation & Configuration)
File: v0.6.34.md

layout: release date: 2022-12-09 tag: v0.6.34 language: en Update the save design toaster verbiage @Chadha93 (#6661) add make commands to debug in Docker extension @harkiratsm (#6654) [chore] Removing deprecated packages @acald-creator (#6667) [server] Add Support To Logout Remote Provider Session @theBeginner86 (#6580) Enabled navigation of application grid @hs05june (#6655) [RJSF] Add a Custom Object Field to fix validation errors | CU-3u6yyf2 @sudo-NithishKarthik (#6660) <MesheryConfigComponent> fixed the conflicting label @partik03 (#6657) Made Configuration Icon consistent @hs05june (#6650) [server] Add Support To Logout Remote Provider Session @theBeginner86 (#6580) [chore] Removing deprecated packages @acald-creator (#6667) Update meshmodels and meshmodel workflows @Revolyssup (#6659) Update helm-chart-releaser.yml @acald-creator (#6649) Bump nokogiri from 1.13.9 to 1.13.10 in /docs @dependabot (#6658) Thank you to our contributors for making this release possible: @Chadha93, @Revolyssup, @acald-creator, @dependabot, @dependabot[bot], @harkiratsm, @hs05june, @leecalcote, @partik03, @sudo-NithishKarthik, @theBeginner86 and Partik SIngh
Project: KICS (Provisioning / Security & Compliance)
File: a9c2f49d-0671-4fc9-9ece-f4e261e128d0.md

title: Root Container Not Mounted Read-only hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: a9c2f49d-0671-4fc9-9ece-f4e261e128d0 Query name: Root Container Not Mounted Read-only Platform: Kubernetes Severity: <span style="color:#edd57e">Low</span> Category: Build Process URL: Check if the root container filesystem is not being mounted read-only.<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="24 12" apiVersion: v1 kind: Pod metadata: name: rootfalse labels: app: goproxy spec: containers: name: contain1_1 image: k8s.gcr.io/goproxy:0.1 securityContext: readOnlyRootFilesystem: false apiVersion: v1 kind: Pod metadata: name: noroot labels: app: goproxy spec: containers: name: contain1_2 image: k8s.gcr.io/goproxy:0.1 securityContext: someotherthing: true ``` ```yaml title="Negative test num. 1 - yaml file" apiVersion: v1 kind: Pod metadata: name: goproxy labels: app: goproxy spec: containers: name: goproxy image: k8s.gcr.io/goproxy:0.1 securityContext: readOnlyRootFilesystem: true ```
Project: ClickHouse (App Definition and Development / Database)
File: groupbitand.md

slug: /en/sql-reference/aggregate-functions/reference/groupbitand sidebar_position: 125 Applies bit-wise `AND` for series of numbers. ``` sql groupBitAnd(expr) ``` Arguments `expr` An expression that results in `UInt` or `Int` type. Return value Value of the `UInt` or `Int` type. Example Test data: ``` text binary decimal 00101100 = 44 00011100 = 28 00001101 = 13 01010101 = 85 ``` Query: ``` sql SELECT groupBitAnd(num) FROM t ``` Where `num` is the column with the test data. Result: ``` text binary decimal 00000100 = 4 ```
Project: Meshery (Provisioning / Automation & Configuration)
File: 02-13-2023-19-19-02_75fc4b02.md

timestamp: "2023-02-13 19:18:39 UTC Mon" meshery-component: meshery-consul meshery-component-version: edge meshery-server-version: "v0.6.51" k8s-distro: minikube k8s-version: "v1.23.13" service-mesh: Consul service-mesh-version: "v1.0.4" tests: consul-client: null consul-server: null overall-status: "failing"
Project: KICS (Provisioning / Security & Compliance)
File: 56f6a008-1b14-4af4-b9b2-ab7cf7e27641.md

title: DocDB Logging Is Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 56f6a008-1b14-4af4-b9b2-ab7cf7e27641 Query name: DocDB Logging Is Disabled Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Observability URL: DocDB logging should be enabled<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1" resource "awsdocdbcluster" "positive1" { cluster_identifier = "my-docdb-cluster" engine = "docdb" master_username = "foo" master_password = "mustbeeightchars" backupretentionperiod = 5 preferredbackupwindow = "07:00-09:00" skipfinalsnapshot = true } ``` ```tf title="Positive test num. 2 - tf file" hl_lines="10" resource "awsdocdbcluster" "positive2" { cluster_identifier = "my-docdb-cluster" engine = "docdb" master_username = "foo" master_password = "mustbeeightchars" backupretentionperiod = 5 preferredbackupwindow = "07:00-09:00" skipfinalsnapshot = true enabledcloudwatchlogs_exports = [] } ``` ```tf title="Positive test num. 3 - tf file" hl_lines="10" resource "awsdocdbcluster" "positive3" { cluster_identifier = "my-docdb-cluster" engine = "docdb" master_username = "foo" master_password = "mustbeeightchars" backupretentionperiod = 5 preferredbackupwindow = "07:00-09:00" skipfinalsnapshot = true enabledcloudwatchlogs_exports = ["profiler"] } ``` <details><summary>Positive test num. 4 - tf file</summary> ```tf hl_lines="10" resource "awsdocdbcluster" "positive4" { cluster_identifier = "my-docdb-cluster" engine = "docdb" master_username = "foo" master_password = "mustbeeightchars" backupretentionperiod = 5 preferredbackupwindow = "07:00-09:00" skipfinalsnapshot = true enabledcloudwatchlogs_exports = ["audit"] } ``` </details> ```tf title="Negative test num. 1 - tf file" resource "awsdocdbcluster" "negative1" { cluster_identifier = "my-docdb-cluster" engine = "docdb" master_username = "foo" master_password = "mustbeeightchars" backupretentionperiod = 5 preferredbackupwindow = "07:00-09:00" skipfinalsnapshot = true enabledcloudwatchlogs_exports = ["profiler", "audit"] } ```