cwielenb/CNCF-Dataset huggingface dataset:
Project: ArangoDB (App Definition and Development / Database)
File: tryv2.md

+++ title = "`BOOSTOUTCOMETRYV2(spec, expr)`" description = "Evaluate an expression which results in an understood type, continuing execution if successful, immediately returning `tryoperationreturn_as(X)` from the calling function if unsuccessful." +++ Evaluate an expression which results in a type matching the following customisation points, continuing execution if successful, immediately returning {{% api "tryoperationreturn_as(X)" %}} from the calling function if unsuccessful: `BOOSTOUTCOMEV2NAMESPACE::`{{% api "tryoperationhasvalue(X)" %}} `BOOSTOUTCOMEV2NAMESPACE::`{{% api "tryoperationreturnas(X)" %}} `BOOSTOUTCOMEV2NAMESPACE::`{{% api "tryoperationextractvalue(X)" %}} Default overloads for these customisation points are provided. See . Hints are given to the compiler that the expression will be successful. If you expect failure, you should use {{% api "BOOSTOUTCOMETRYV2FAILURELIKELY(spec, expr)" %}} instead. Overridable: Not overridable. Definition: Firstly the expression's temporary is bound to a uniquely named, stack allocated, `spec`. If that reference's bound object's `tryoperationhasvalue()` is false, immediately execute `return tryoperationreturnas(propagated unique reference);`, propagating the rvalue/lvalue/etc-ness of the original expression. Header: `<boost/outcome/try.hpp>`
Project: YugabyteDB (App Definition and Development / Database)
File: get.md

title: GET linkTitle: GET description: GET menu: preview: parent: api-yedis weight: 2070 aliases: /preview/api/redis/get /preview/api/yedis/get type: docs `GET key` This command fetches the value that is associated with the given `key`. If the `key` does not exist, null is returned. If the `key` is associated with a non-string value, an error is raised. Returns string value of the given `key`. ```sh $ GET yugakey ``` ``` (null) ``` ```sh $ SET yugakey "Yugabyte" ``` ``` "OK" ``` ```sh $ GET yugakey ``` ``` "Yugabyte" ``` , , , , , , ,
Project: YugabyteDB (App Definition and Development / Database)
File: run-sample-apps.md

app is a sample ecommerce application built using a microservices design pattern. React UI, Node.js Express app framework and YugabyteDB (YCQL and YEDIS) are used as the underlying technology stack. Create a cluster. ```sh $ kubectl apply -f yugabyte-statefulset.yaml ``` Initialize the YEDIS API. ```sh $ kubectl exec -it yb-master-0 -- /home/yugabyte/bin/yb-admin --masteraddresses yb-master-0.yb-masters.default.svc.cluster.local:7100,yb-master-1.yb-masters.default.svc.cluster.local:7100,yb-master-2.yb-masters.default.svc.cluster.local:7100 setupredis_table ``` Clients can now connect to the YSQL, YCQL, and YEDIS APIs of the cluster at the following ports: `5433`, `9042`, and `6379`, respectively. ```sh $ kubectl run yugastore --image=yugabytedb/yugastore:latest --port=3001 --command -- /usr/local/yugastore/bin/start-for-kubernetes.sh ``` Verify the deployment. ```sh $ kubectl get deployments ``` ``` NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE yugastore 1 1 1 1 13m ``` Check all the pods. ```sh $ kubectl get pods ``` ``` NAME READY STATUS RESTARTS AGE yb-master-0 1/1 Running 0 7h yb-master-1 1/1 Running 0 7h yb-master-2 1/1 Running 0 7h yb-tserver-0 1/1 Running 0 7h yb-tserver-1 1/1 Running 0 7h yb-tserver-2 1/1 Running 0 7h yugastore-55d7c6965-ql95t 1/1 Running 0 13m ``` Note the yugastore pod ID above so that you can redirect its 3001 port to the localhost's 3001. ```sh $ kubectl port-forward yugastore-55d7c6965-ql95t 3001 ``` Now you can see the Yugastore app at http://localhost:3001. You can do this as shown below. ```sh $ kubectl exec -it yugastore-55d7c6965-ql95t -- node /usr/local/yugastore/test/sample-user.js ``` Now you can observe the effects of the read/write operations generated by the load tester by simply going to the YugabyteDB Admin UI. First you have to find the Admin UI URL using the command below. ```sh $ minikube service yb-master-ui --url ``` ``` http://192.168.99.100:31283 ``` The above output is the Admin UI URL and visiting the Tablet Servers page there will show you the current state of the cluster. Details of Yugastore architecture are documented . Source code is available in the . After running Yugastore, run the app. This app is built on top of YugabyteDB as the database (using the YCQL API), Confluent Kafka as the message broker, KSQL or Apache Spark Streaming for real-time analytics and Spring Boot as the application framework.
Project: StarRocks (App Definition and Development / Database)
File: quarter.md

displayed_sidebar: "English" Returns the quarter part of a date, in the range of 1 to 4. ```Haskell INT quarter(DATETIME|DATE date); ``` `date`: It must be of the DATETIME or DATE type. Returns an INT value. NULL is returned in any of the following scenarios: The date is not a valid DATETIME or DATE value. The input is empty. The date does not exist, for example, 2022-02-29. Example 1: Return the quarter part of a DATETIME value. ```Plain SELECT QUARTER("2022-10-09 15:59:33"); +--+ | quarter('2022-10-09 15:59:33') | +--+ | 4 | +--+ ``` Example 2: Return the quarter part of a DATE value. ```Plain SELECT QUARTER("2022-10-09"); +--+ | quarter('2022-10-09') | +--+ | 4 | +--+ ``` Example 3: Return the quarter part that corresponds to the current time or date. ```Plain SELECT QUARTER(NOW()); +-+ | quarter(now()) | +-+ | 4 | +-+ SELECT QUARTER(CURDATE()); +--+ | quarter(curdate()) | +--+ | 4 | +--+ ```
Project: ClickHouse (App Definition and Development / Database)
File: v23.5.4.25-stable.md

sidebar_position: 1 sidebar_label: 2023 Backported in : Improve the progress bar for file/s3/hdfs/url table functions by using chunk size from source data and using incremental total size counting in each thread. Fix the progress bar for Cluster functions. This closes . (). Backported in : Disable cache setting `donotevictindexandmarkfiles` (Was enabled in `23.5`). (). Backported in : Split huge `RUN` in Dockerfile into smaller conditional. Install the necessary tools on demand in the same `RUN` layer, and remove them after that. Upgrade the OS only once at the beginning. Use a modern way to check the signed repository. Downgrade the base repo to ubuntu:20.04 to address the issues on older docker versions. Upgrade golang version to address golang vulnerabilities. (). Backported in : This a follow-up for , the cleanup was lost during refactoring. (). Query Cache: Try to fix bad cast from ColumnConst to ColumnVector<char8_t> (). Fix type of LDAP server params hash in cache entry (). Fallback to parsing big integer from String instead of exception in Parquet format (). Do not apply projection if read-in-order was enabled. (). Fix race azure blob storage iterator (). Fix ineffective query cache for SELECTs with subqueries (). Fix fuzzer failure in ActionsDAG (). Fix ParallelReadBuffer seek ().
Project: Dapr (App Definition and Development / Application Definition & Image Build)
File: writing-integration-test.md

Integration tests are run against a live running daprd binary locally. Each test scenario is run against a new instance of daprd, where each scenario modifies the daprd configuration to suit the test. Tests are expected to complete within seconds, ideally less than 5, and should not take longer than 30. Binaries are always built from source within the test. You can find out more about the background and design decisions of the integration tests through a talk by joshvanl . ```bash go test -v -race -tags integration ./tests/integration ``` You can also run a subset of tests by specifying the `-focus` flag, which takes a . ```bash go test -v -race -tags integration ./tests/integration -focus sentry go test -v -race -tags integration ./tests/integration -test.skip Test_Integration/sentry/validator/jwks -focus sentry ``` Rather than building from source, you can also set a custom daprd, sentry, or placement binary path with the environment variables: `DAPRINTEGRATIONDAPRD_PATH` `DAPRINTEGRATIONPLACEMENT_PATH` `DAPRINTEGRATIONSENTRY_PATH` By default, binary logs will not be printed unless the test fails. You can force logs to always be printed with the environment variable `DAPRINTEGRATIONLOGS=true`. You can override the directory that is used to read the CRD definitions that are served by the Kubernetes process with the environment variable `DAPRINTEGRATIONCRD_DIRECTORY`. To add a new test scenario, either create a new subject directory in `tests/integration/suite` and create a new file there, or use an existing subject directory if appropriate. Each test scenario is represented by a `struct` which implements the following interface. The `struct` name is used as the test name. ```go type Case interface { Setup(*testing.T) []framework.RunDaprdOption Run(testing.T, framework.Command) } ``` To add the test to the suite, add the following `init` function ```go func init() { suite.Register(new(MyNewTestScenario)) } ``` Finally, include your integration test directory with a blank identifier to `tests/integration/integration.go` so that the init function is invoked. ```go _ "github.com/dapr/dapr/tests/integration/suite/my-new-test-scenario" ``` You may need to extend the framework options to suit your test scenario. These are defined in `tests/integration/framework`. Take a look at `tests/integration/suite/ports/ports.go` as a "hello world" example to base your test on.
Project: StarRocks (App Definition and Development / Database)
File: current_timestamp.md

displayed_sidebar: "English" Obtains the current date and returns a value if the DATETIME type. This function is a synonym of the function. ```Haskell DATETIME CURRENT_TIMESTAMP() ``` Example 1: Return the current time. ```Plain Text MySQL > select current_timestamp(); ++ | current_timestamp() | ++ | 2019-05-27 15:59:33 | ++ ``` Example 2: When you create a table, you can use this function for a column so that current time is the default value of the column. ```SQL CREATE TABLE IF NOT EXISTS sr_member ( sr_id INT, name STRING, city_code INT, regdate DATETIME DEFAULT currenttimestamp, verified BOOLEAN ); ``` CURRENT_TIMESTAMP,CURRENT,TIMESTAMP
Project: KICS (Provisioning / Security & Compliance)
File: a4966c4f-9141-48b8-a564-ffe9959945bc.md

title: S3 Bucket With All Permissions hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: a4966c4f-9141-48b8-a564-ffe9959945bc Query name: S3 Bucket With All Permissions Platform: Terraform Severity: <span style="color:#ff0000">Critical</span> Category: Access Control URL: S3 Buckets should not have all permissions, as to prevent leaking private information to the entire internet or allow unauthorized data tampering / deletion. This means the 'Effect' must not be 'Allow' when the 'Action' is '*', for all Principals.<br> ```tf title="Positive test num. 1 - tf file" hl_lines="5" resource "awss3bucket" "positive1" { bucket = "S3B_181355" acl = "private" policy = <<EOF { "Id": "id113", "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:*" ], "Effect": "Allow", "Resource": "arn:aws:s3:::S3B_181355/*", "Principal": "*" } ] } EOF } ``` ```tf title="Positive test num. 2 - tf file" hl_lines="12" module "s3_bucket" { source = "terraform-aws-modules/s3-bucket/aws" version = "3.7.0" bucket = "my-s3-bucket" acl = "private" versioning = { enabled = true } policy = <<EOF { "Id": "id113", "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:*" ], "Effect": "Allow", "Resource": "arn:aws:s3:::S3B_181355/*", "Principal": "*" } ] } EOF } ``` ```tf title="Negative test num. 1 - tf file" resource "awss3bucket" "negative1" { bucket = "S3B_181355" acl = "private" policy = <<EOF { "Id": "id113", "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:putObject" ], "Effect": "Allow", "Resource": "arn:aws:s3:::S3B_181355/*", "Principal": "*" } ] } EOF } ``` ```tf title="Negative test num. 2 - tf file" module "s3_bucket" { source = "terraform-aws-modules/s3-bucket/aws" version = "3.7.0" bucket = "my-s3-bucket" acl = "private" versioning = { enabled = true } policy = <<EOF { "Id": "id113", "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:putObject" ], "Effect": "Allow", "Resource": "arn:aws:s3:::S3B_181355/*", "Principal": "*" } ] } EOF } ```
Project: kiosk (Provisioning / Automation & Configuration)
File: VERSIONING.md

We follow the , and use the corresponding tooling. For the purposes of the aforementioned guidelines, controller-runtime counts as a "library project", but otherwise follows the guidelines exactly. For release branches, we generally tend to support backporting one (1) major release (`release-{X-1}` or `release-0.{Y-1}`), but may go back further if the need arises and is very pressing (e.g. security updates). Note the . Particularly: We DO guarantee Kubernetes REST API compability -- if a given version of controller-runtime stops working with what should be a supported version of Kubernetes, this is almost certainly a bug. We DO NOT guarantee any particular compability matrix between kubernetes library dependencies (client-go, apimachinery, etc); Such compability is infeasible due to the way those libraries are versioned.
Project: Chef InSpec (Provisioning / Security & Compliance)
File: google_storage_bucket_acl.md

+++ title = "googlestoragebucket_acl resource" draft = false gh_repo = "inspec" platform = "gcp" [menu] [menu.inspec] title = "googlestoragebucket_acl" identifier = "inspec/resources/gcp/googlestoragebucketacl.md googlestoragebucketacl resource" parent = "inspec/resources/gcp" +++ A `googlestoragebucket_acl` is used to test a Google BucketACL resource ```ruby describe googlestoragebucket_acl(bucket: 'storage-bucket-name', entity: user-email) do it { should exist } its('role') { should cmp "OWNER" } its('bucket') { should eq 'storage-bucket-name' } its('email') { should include entity-email.com } end describe googlestoragebucket_acl(bucket: 'storage-bucket-name', entity: "allUsers") do it { should_not exist } end ``` describe googlestoragebucket_acl(bucket: 'bucket-buvsjjcndqz', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do it { should exist } end describe googlestoragebucket_acl(bucket: 'bucket-buvsjjcndqz', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do its('role') { should eq 'OWNER' } end Properties that can be accessed from the `googlestoragebucket_acl` resource: `domain` : The domain associated with the entity. `email` : The email address associated with the entity. `entity` : The entity holding the permission, in one of the following forms: user-userId user-email group-groupId group-email domain-domain project-team-projectId allUsers allAuthenticatedUsers Examples: The user liz@example.com would be user-liz@example.com. The group example@googlegroups.com would be group-example@googlegroups.com. To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. `entity_id` : The ID for the entity `id` : The ID of the access-control entry. `project_team` : The project team associated with the entity `project_number` : The project team associated with the entity `team` : The team. Possible values: editors owners viewers `role` : The access permission for the entity. Possible values: OWNER READER WRITER Ensure the is enabled for the current project.
Project: GraphScope (App Definition and Development / Database)
File: deploy_graphscope_operator.md

Save and modify the following configuration template. ```yaml coordinator: service_port: 63800 launcher_type: operator operator_launcher: gae_endpoint: 'gs-engine:60001' # gae endpoint, to be resolved by gRPC. Could be a service endpoint. hosts: ["gs-engine-0", "gs-engine-1"] # pod name lists namespace: default # namespace session: num_workers: 2 # number of engine workers (pods) instance_id: instance-0000 # A random instance id vineyard: socket: /tmp/vineyard.sock # use the actual socket path rpc_port: 9600 ``` Say the configuration has been saved in `/home/graphscope/config.yaml`, then start the coordinator with the config file. ```python python3 -m gscoordinator --config-file /home/graphscope/config.yaml ``` In practice, the configuration file should be saved to a configmap, and mount that configmap to the pod of coordinator.
Project: KICS (Provisioning / Security & Compliance)
File: 58876b44-a690-4e9f-9214-7735fa0dd15d.md

title: CronJob Deadline Not Configured hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 58876b44-a690-4e9f-9214-7735fa0dd15d Query name: CronJob Deadline Not Configured Platform: Terraform Severity: <span style="color:#edd57e">Low</span> Category: Resource Management URL: Cronjobs must have a configured deadline, which means the attribute 'startingdeadlineseconds' must be defined<br> ```tf title="Positive test num. 1 - tf file" hl_lines="5" resource "kubernetescronjob" "demo" { metadata { name = "demo" } spec { concurrency_policy = "Replace" failedjobshistory_limit = 5 schedule = "1 0 *" successfuljobshistory_limit = 10 job_template { metadata {} spec { backoff_limit = 2 ttlsecondsafter_finished = 10 template { metadata {} spec { container { name = "hello" image = "busybox" command = ["/bin/sh", "-c", "date; echo Hello from the Kubernetes cluster"] } } } } } } } ``` ```tf title="Negative test num. 1 - tf file" resource "kubernetescronjob" "demo2" { metadata { name = "demo" } spec { concurrency_policy = "Replace" failedjobshistory_limit = 5 schedule = "1 0 *" startingdeadlineseconds = 10 successfuljobshistory_limit = 10 job_template { metadata {} spec { backoff_limit = 2 ttlsecondsafter_finished = 10 template { metadata {} spec { container { name = "hello" image = "busybox" command = ["/bin/sh", "-c", "date; echo Hello from the Kubernetes cluster"] } } } } } } } ```
Project: Trivy (Provisioning / Security & Compliance)
File: filesystem.md

Scan your local projects for Vulnerabilities Misconfigurations Secrets Licenses By default, vulnerability and secret scanning are enabled, and you can configure that with `--scanners`. ```bash $ trivy fs /path/to/project ``` It's also possible to scan a single file. ``` $ trivy fs ~/src/github.com/aquasecurity/trivy-ci-test/Pipfile.lock ``` It is enabled by default. Trivy will look for vulnerabilities based on lock files such as Gemfile.lock and package-lock.json. See for the detail. ``` $ trivy fs ~/src/github.com/aquasecurity/trivy-ci-test ``` <details> <summary>Result</summary> ``` 2020-06-01T17:06:58.652+0300 WARN OS is not detected and vulnerabilities in OS packages are not detected. 2020-06-01T17:06:58.652+0300 INFO Detecting pipenv vulnerabilities... 2020-06-01T17:06:58.691+0300 INFO Detecting cargo vulnerabilities... Pipfile.lock ============ Total: 10 (UNKNOWN: 2, LOW: 0, MEDIUM: 6, HIGH: 2, CRITICAL: 0) +++-+-+++ | LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE | +++-+-+++ | django | CVE-2020-7471 | HIGH | 2.0.9 | 3.0.3, 2.2.10, 1.11.28 | django: potential | | | | | | | SQL injection via | | | | | | | StringAgg(delimiter) | ++-+ +++ | | CVE-2019-19844 | MEDIUM | | 3.0.1, 2.2.9, 1.11.27 | Django: crafted email address | | | | | | | allows account takeover | ++ + +++ | | CVE-2019-3498 | | | 2.1.5, 2.0.10, 1.11.18 | python-django: Content | | | | | | | spoofing via URL path in | | | | | | | default 404 page | ++ + +++ | | CVE-2019-6975 | | | 2.1.6, 2.0.11, 1.11.19 | python-django: | | | | | | | memory exhaustion in | | | | | | | django.utils.numberformat.format() | +++-+-+++ ... ``` </details> It is disabled by default and can be enabled with `--scanners misconfig`. See for the detail. ```shell $ trivy fs --scanners misconfig /path/to/project ``` It is enabled by default. See for the detail. ```shell $ trivy fs /path/to/project ``` It is disabled by default. See for the detail. ```shell $ trivy fs --scanners license /path/to/project ``` Trivy can generate SBOM for local projects. See for the detail.
Project: KICS (Provisioning / Security & Compliance)
File: a2fdf451-89dd-451e-af92-bf6c0f4bab96.md

title: Configuration Aggregator to All Regions Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: a2fdf451-89dd-451e-af92-bf6c0f4bab96 Query name: Configuration Aggregator to All Regions Disabled Platform: Ansible Severity: <span style="color:#edd57e">Low</span> Category: Observability URL: AWS Config Configuration Aggregator All Regions must be set to True<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="24 10" name: Create cross-account aggregator community.aws.awsconfigaggregator: name: testconfigrule state: present account_sources: account_ids: 1234567890 0123456789 9012345678 allawsregions: no organization_source: allawsregions: yes name: Create cross-account aggregator2 community.aws.awsconfigaggregator: name: testconfigrule state: present account_sources: account_ids: 1234567890 0123456789 9012345678 allawsregions: yes organization_source: allawsregions: no ``` ```yaml title="Negative test num. 1 - yaml file" name: Create cross-account aggregator community.aws.awsconfigaggregator: name: testconfigrule state: present account_sources: account_ids: 1234567890 0123456789 9012345678 allawsregions: yes organization_source: allawsregions: yes ```
Project: ClickHouse (App Definition and Development / Database)
File: v20.5.2.7-stable.md

Add `Alter table drop replica replica_name` support. This fixes . (). Add number of errors to ignore while choosing replicas (`distributedreplicaerror_ignore`). (). Multiversion metadata for storages without structure locks. (). Slightly relax the validation of ODBC connection string. If the hostname or username contains only word characters along with `.` and `-`, don't put it into curly braces. It is needed, because some ODBC drivers (e.g. PostgreSQL) don't understand when hostname is enclosed in curly braces. (). Support `SIGNED` and `UNSIGNED` modifiers of standard integer types (`BIGINT`, `INT`, ...) for compatibility with MySQL. (). Allow to use `sumWithOverflow` as `SimpleAggregateFunction`. Closes . (). Add FixedString support in Hashing functions. (). Fix unexpected behaviour of queries like `SELECT , xyz.*` which were success while an error expected. (). Fix wrong result for `if()` with NULLs in condition. (). Fix memory accounting via HTTP interface (can be significant with `waitendof_query=1`). (). Fix rare crash caused by using `Nullable` column in prewhere condition. Continuation of . (). Backported in : Fix potential floating point exception when parsing DateTime64. This fixes . (). Fix potential floating point exception when parsing DateTime64. This fixes . (). Backported in : Use the correct current database for checking access rights after statement `USE database`. (). Backported in : Fix incorrect comparison of tuples with `Nullable` columns. Fixes . (). Add simple GitHub hook script for the serverless environment. (). Send logs to client on fatal errors if possible. This will make test results more readable. (). Allow ClickHouse to run on Android. (). NO CL ENTRY: 'Merging '. (). NO CL ENTRY: 'Cherry pick to 20.5: Fix strange and wrong code around DateTime64'. ().
Project: StarRocks (App Definition and Development / Database)
File: SHOW_ROLES.md

displayed_sidebar: "English" import UserManagementPriv from '../../../assets/commonMarkdown/userManagementPriv.md' Displays all roles in the system. You can use `SHOW GRANTS FOR ROLE <role_name>;` to view the privileges of a specific role. For more information, see . This command is supported from v3.0. <UserManagementPriv /> ```SQL SHOW ROLES ``` Return fields: | Field | Description | | | | | Name | The name of the role. | Display all roles in the system. ```SQL mysql> SHOW ROLES; ++ | Name | ++ | root | | db_admin | | cluster_admin | | user_admin | | public | | testrole | ++ ```