Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make check-format failed #1692

Open
gyliu513 opened this issue Dec 17, 2024 · 0 comments · May be fixed by #1699
Open

make check-format failed #1692

gyliu513 opened this issue Dec 17, 2024 · 0 comments · May be fixed by #1699
Labels
bug Something isn't working triage:needs-triage

Comments

@gyliu513
Copy link
Member

Area(s)

area:docs

What happened?

Description

check-format is a sub-command for check, and check-format always failed.

root@gyliu-d61:~/github.com/open-telemetry/semantic-conventions# make check-format
npm run check:format

> check:format
> npm run _check:format || (echo '[help] Run: npm run format'; exit 1)


> _check:format
> npx prettier --check .

Checking formatting...
[warn] docs/attributes-registry/android.md
[warn] docs/attributes-registry/artifact.md
[warn] docs/attributes-registry/aspnetcore.md
[warn] docs/attributes-registry/aws.md
[warn] docs/attributes-registry/azure.md
[warn] docs/attributes-registry/browser.md
[warn] docs/attributes-registry/cicd.md
[warn] docs/attributes-registry/client.md
[warn] docs/attributes-registry/cloud.md
[warn] docs/attributes-registry/cloudevents.md
[warn] docs/attributes-registry/cloudfoundry.md
[warn] docs/attributes-registry/code.md
[warn] docs/attributes-registry/container.md
[warn] docs/attributes-registry/cpu.md
[warn] docs/attributes-registry/db.md
[warn] docs/attributes-registry/deployment.md
[warn] docs/attributes-registry/destination.md
[warn] docs/attributes-registry/device.md
[warn] docs/attributes-registry/disk.md
[warn] docs/attributes-registry/dns.md
[warn] docs/attributes-registry/dotnet.md
[warn] docs/attributes-registry/enduser.md
[warn] docs/attributes-registry/error.md
[warn] docs/attributes-registry/event.md
[warn] docs/attributes-registry/exception.md
[warn] docs/attributes-registry/faas.md
[warn] docs/attributes-registry/feature-flag.md
[warn] docs/attributes-registry/file.md
[warn] docs/attributes-registry/gcp.md
[warn] docs/attributes-registry/gen-ai.md
[warn] docs/attributes-registry/geo.md
[warn] docs/attributes-registry/go.md
[warn] docs/attributes-registry/graphql.md
[warn] docs/attributes-registry/hardware.md
[warn] docs/attributes-registry/heroku.md
[warn] docs/attributes-registry/host.md
[warn] docs/attributes-registry/http.md
[warn] docs/attributes-registry/ios.md
[warn] docs/attributes-registry/jvm.md
[warn] docs/attributes-registry/k8s.md
[warn] docs/attributes-registry/linux.md
[warn] docs/attributes-registry/log.md
[warn] docs/attributes-registry/messaging.md
[warn] docs/attributes-registry/network.md
[warn] docs/attributes-registry/nodejs.md
[warn] docs/attributes-registry/oci.md
[warn] docs/attributes-registry/opentracing.md
[warn] docs/attributes-registry/os.md
[warn] docs/attributes-registry/otel.md
[warn] docs/attributes-registry/peer.md
[warn] docs/attributes-registry/process.md
[warn] docs/attributes-registry/profile.md
[warn] docs/attributes-registry/rpc.md
[warn] docs/attributes-registry/security-rule.md
[warn] docs/attributes-registry/server.md
[warn] docs/attributes-registry/service.md
[warn] docs/attributes-registry/session.md
[warn] docs/attributes-registry/signalr.md
[warn] docs/attributes-registry/source.md
[warn] docs/attributes-registry/system.md
[warn] docs/attributes-registry/telemetry.md
[warn] docs/attributes-registry/test.md
[warn] docs/attributes-registry/thread.md
[warn] docs/attributes-registry/tls.md
[warn] docs/attributes-registry/url.md
[warn] docs/attributes-registry/user-agent.md
[warn] docs/attributes-registry/user.md
[warn] docs/attributes-registry/v8js.md
[warn] docs/attributes-registry/vcs.md
[warn] docs/attributes-registry/webengine.md
[warn] Code style issues found in 70 files. Run Prettier with --write to fix.
[help] Run: npm run format
make: *** [Makefile:177: check-format] Error 1

I can run fix-format to fix all issues.

root@gyliu-d61:~/github.com/open-telemetry/semantic-conventions# make fix-format
npm run fix:format

> fix:format
> npm run _check:format -- --write


> _check:format
> npx prettier --check . --write

Checking formatting...
[warn] docs/attributes-registry/android.md
[warn] docs/attributes-registry/artifact.md
[warn] docs/attributes-registry/aspnetcore.md
[warn] docs/attributes-registry/aws.md
[warn] docs/attributes-registry/azure.md
[warn] docs/attributes-registry/browser.md
[warn] docs/attributes-registry/cicd.md
[warn] docs/attributes-registry/client.md
[warn] docs/attributes-registry/cloud.md
[warn] docs/attributes-registry/cloudevents.md
[warn] docs/attributes-registry/cloudfoundry.md
[warn] docs/attributes-registry/code.md
[warn] docs/attributes-registry/container.md
[warn] docs/attributes-registry/cpu.md
[warn] docs/attributes-registry/db.md
[warn] docs/attributes-registry/deployment.md
[warn] docs/attributes-registry/destination.md
[warn] docs/attributes-registry/device.md
[warn] docs/attributes-registry/disk.md
[warn] docs/attributes-registry/dns.md
[warn] docs/attributes-registry/dotnet.md
[warn] docs/attributes-registry/enduser.md
[warn] docs/attributes-registry/error.md
[warn] docs/attributes-registry/event.md
[warn] docs/attributes-registry/exception.md
[warn] docs/attributes-registry/faas.md
[warn] docs/attributes-registry/feature-flag.md
[warn] docs/attributes-registry/file.md
[warn] docs/attributes-registry/gcp.md
[warn] docs/attributes-registry/gen-ai.md
[warn] docs/attributes-registry/geo.md
[warn] docs/attributes-registry/go.md
[warn] docs/attributes-registry/graphql.md
[warn] docs/attributes-registry/hardware.md
[warn] docs/attributes-registry/heroku.md
[warn] docs/attributes-registry/host.md
[warn] docs/attributes-registry/http.md
[warn] docs/attributes-registry/ios.md
[warn] docs/attributes-registry/jvm.md
[warn] docs/attributes-registry/k8s.md
[warn] docs/attributes-registry/linux.md
[warn] docs/attributes-registry/log.md
[warn] docs/attributes-registry/messaging.md
[warn] docs/attributes-registry/network.md
[warn] docs/attributes-registry/nodejs.md
[warn] docs/attributes-registry/oci.md
[warn] docs/attributes-registry/opentracing.md
[warn] docs/attributes-registry/os.md
[warn] docs/attributes-registry/otel.md
[warn] docs/attributes-registry/peer.md
[warn] docs/attributes-registry/process.md
[warn] docs/attributes-registry/profile.md
[warn] docs/attributes-registry/rpc.md
[warn] docs/attributes-registry/security-rule.md
[warn] docs/attributes-registry/server.md
[warn] docs/attributes-registry/service.md
[warn] docs/attributes-registry/session.md
[warn] docs/attributes-registry/signalr.md
[warn] docs/attributes-registry/source.md
[warn] docs/attributes-registry/system.md
[warn] docs/attributes-registry/telemetry.md
[warn] docs/attributes-registry/test.md
[warn] docs/attributes-registry/thread.md
[warn] docs/attributes-registry/tls.md
[warn] docs/attributes-registry/url.md
[warn] docs/attributes-registry/user-agent.md
[warn] docs/attributes-registry/user.md
[warn] docs/attributes-registry/v8js.md
[warn] docs/attributes-registry/vcs.md
[warn] docs/attributes-registry/webengine.md
[warn] Code style issues fixed in 70 files.

And the update in the md file is as follows:

root@gyliu-d61:~/github.com/open-telemetry/semantic-conventions# git diff docs/attributes-registry/gen-ai.md
diff --git a/docs/attributes-registry/gen-ai.md b/docs/attributes-registry/gen-ai.md
index 6606150..31b13ac 100644
--- a/docs/attributes-registry/gen-ai.md
+++ b/docs/attributes-registry/gen-ai.md
@@ -14,25 +14,25 @@

 This document defines the attributes used to describe telemetry in the context of Generative Artificial Intelligence (GenAI) Models requests and responses.

-| Attribute | Type | Description | Examples | Stability |
-|---|---|---|---|---|
-| <a id="gen-ai-operation-name" href="#gen-ai-operation-name">`gen_ai.operation.name`</a> | string | The name of the operation being performed. [1] | `chat`; `text_completion`; `embeddings` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-request-encoding-formats" href="#gen-ai-request-encoding-formats">`gen_ai.request.encoding_formats`</a> | string[] | The encoding formats requested in an embeddings operation, if specified. [2] | `["base64"]`; `["float", "binary"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-request-frequency-penalty" href="#gen-ai-request-frequency-penalty">`gen_ai.request.frequency_penalty`</a> | double | The frequency penalty setting for the GenAI request. | `0.1` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-request-max-tokens" href="#gen-ai-request-max-tokens">`gen_ai.request.max_tokens`</a> | int | The maximum number of tokens the model generates for a request. | `100` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-request-model" href="#gen-ai-request-model">`gen_ai.request.model`</a> | string | The name of the GenAI model a request is being made to. | `gpt-4` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-request-presence-penalty" href="#gen-ai-request-presence-penalty">`gen_ai.request.presence_penalty`</a> | double | The presence penalty setting for the GenAI request. | `0.1` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-request-stop-sequences" href="#gen-ai-request-stop-sequences">`gen_ai.request.stop_sequences`</a> | string[] | List of sequences that the model will use to stop generating further tokens. | `["forest", "lived"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-request-temperature" href="#gen-ai-request-temperature">`gen_ai.request.temperature`</a> | double | The temperature setting for the GenAI request. | `0.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-request-top-k" href="#gen-ai-request-top-k">`gen_ai.request.top_k`</a> | double | The top_k sampling setting for the GenAI request. | `1.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-request-top-p" href="#gen-ai-request-top-p">`gen_ai.request.top_p`</a> | double | The top_p sampling setting for the GenAI request. | `1.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-response-finish-reasons" href="#gen-ai-response-finish-reasons">`gen_ai.response.finish_reasons`</a> | string[] | Array of reasons the model stopped generating tokens, corresponding to each generation received. | `["stop"]`; `["stop", "length"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-response-id" href="#gen-ai-response-id">`gen_ai.response.id`</a> | string | The unique identifier for the completion. | `chatcmpl-123` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-response-model" href="#gen-ai-response-model">`gen_ai.response.model`</a> | string | The name of the model that generated the response. | `gpt-4-0613` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-system" href="#gen-ai-system">`gen_ai.system`</a> | string | The Generative AI product as identified by the client or server instrumentation. [3] | `openai` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-token-type" href="#gen-ai-token-type">`gen_ai.token.type`</a> | string | The type of token being counted. | `input`; `output` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-usage-input-tokens" href="#gen-ai-usage-input-tokens">`gen_ai.usage.input_tokens`</a> | int | The number of tokens used in the GenAI input (prompt). | `100` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| <a id="gen-ai-usage-output-tokens" href="#gen-ai-usage-output-tokens">`gen_ai.usage.output_tokens`</a> | int | The number of tokens used in the GenAI response (completion). | `180` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| Attribute                                                                                                                | Type     | Description                                                                                      | Examples                                | Stability                                                        |
+| ------------------------------------------------------------------------------------------------------------------------ | -------- | ------------------------------------------------------------------------------------------------ | --------------------------------------- | ---------------------------------------------------------------- |
+| <a id="gen-ai-operation-name" href="#gen-ai-operation-name">`gen_ai.operation.name`</a>                                  | string   | The name of the operation being performed. [1]                                                   | `chat`; `text_completion`; `embeddings` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| <a id="gen-ai-request-encoding-formats" href="#gen-ai-request-encoding-formats">`gen_ai.request.encoding_formats`</a>    | string[] | The encoding formats requested in an embeddings operation, if specified. [2]                     | `["base64"]`; `["float", "binary"]`     | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| <a id="gen-ai-request-frequency-penalty" href="#gen-ai-request-frequency-penalty">`gen_ai.request.frequency_penalty`</a> | double   | The frequency penalty setting for the GenAI request.                                             | `0.1`                                   | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| <a id="gen-ai-request-max-tokens" href="#gen-ai-request-max-tokens">`gen_ai.request.max_tokens`</a>                      | int      | The maximum number of tokens the model generates for a request.                                  | `100`                                   | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| <a id="gen-ai-request-model" href="#gen-ai-request-model">`gen_ai.request.model`</a>                                     | string   | The name of the GenAI model a request is being made to.                                          | `gpt-4`                                 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| <a id="gen-ai-request-presence-penalty" href="#gen-ai-request-presence-penalty">`gen_ai.request.presence_penalty`</a>    | double   | The presence penalty setting for the GenAI request.                                              | `0.1`                                   | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| <a id="gen-ai-request-stop-sequences" href="#gen-ai-request-stop-sequences">`gen_ai.request.stop_sequences`</a>          | string[] | List of sequences that the model will use to stop generating further tokens.                     | `["forest", "lived"]`                   | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| <a id="gen-ai-request-temperature" href="#gen-ai-request-temperature">`gen_ai.request.temperature`</a>                   | double   | The temperature setting for the GenAI request.

But when I run "make attribute-registry-generation", the fix will be rollback.

Seems we do not have make check in CI process yet, but make check is always a recommended CLI that dev needs to run before create the PR, shall we run make fix-format again for attribute-registry-generation in Makefile?

@lmolkova comments? Thanks!

Steps to Reproduce (if any)

Expected Result

Actual Result

Semantic convention version

any

Additional context

No response

@gyliu513 gyliu513 added bug Something isn't working triage:needs-triage labels Dec 17, 2024
@gyliu513 gyliu513 linked a pull request Dec 18, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage:needs-triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant