Satoshi-Sh commented on code in PR #37512:
URL: https://github.com/apache/airflow/pull/37512#discussion_r1497663622
##########
airflow/api_connexion/openapi/v1.yaml:
##########
@@ -639,8 +639,8 @@ paths:
"404":
$ref: "#/components/responses/NotFound"
- ?
/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/{map_index}/setNote
Review Comment:
I didn't update those parts on my own. Probably Lint OpenAPI made the
change. I tried to revert the code to the original but I cannot push it. I'm
not familiar with formatting that much. If you have a look at it, it would be
great.
```
Lint OpenAPI using
spectral........................................................Failed
- hook id: lint-openapi
- exit code: 1
/src/airflow/api_connexion/openapi/v1.yaml
1842:4 error parser Bad indentation of a mapping entry
1843:4 error parser Incomplete explicit mapping pair; a key node is
missed
1843:4 warning parser Mapping key must be a string scalar
paths
1852:5 error parser Bad indentation of a mapping entry
✖ 4 problems (3 errors, 1 warning, 0 infos, 0 hints)
Lint OpenAPI using
openapi-spec-validator..........................................Failed
- hook id: lint-openapi
- exit code: 1
while parsing a block mapping
in "<urllib response>", line 249, column 3
did not find expected key
in "<urllib response>", line 1842, column 4
Lint Dockerfile................................................(no files to
check)Skipped
Check airflow.kubernetes imports are not used..................(no files to
check)Skipped
Check airflow-bug-report provider list is sorted/unique........(no files to
check)Skipped
Check cncf.kubernetes imports used for executors only..........(no files to
check)Skipped
Check compatibility of Providers with Airflow..................(no files to
check)Skipped
Check google-re2 is declared as dependency when needed.........(no files to
check)Skipped
Update mounts in the local yml file............................(no files to
check)Skipped
Check dependency of SQL Providers with common data structure...(no files to
check)Skipped
Update dependencies for provider packages......................(no files to
check)Skipped
Checks setup extra packages....................................(no files to
check)Skipped
Check order of dependencies in pyproject.toml..................(no files to
check)Skipped
Update extras in documentation.................................(no files to
check)Skipped
Check order of extras in Dockerfile............................(no files to
check)Skipped
Generate airflow diagrams......................................(no files to
check)Skipped
Updates supported versions in documentation....................(no files to
check)Skipped
Check that the REVISION_HEADS_MAP is up-to-date................(no files to
check)Skipped
Update version to the latest version in the documentation......(no files to
check)Skipped
Check for pydevd debug statements accidentally left............(no files to
check)Skipped
Verify example dags do not use hard-coded version numbers......(no files to
check)Skipped
Don't use safe in templates....................................(no files to
check)Skipped
No providers imports in core example DAGs......................(no files to
check)Skipped
Do not use DeprecationWarning in providers.....................(no files to
check)Skipped
No relative imports............................................(no files to
check)Skipped
Don't use urlparse in code.....................................(no files to
check)Skipped
Check NEW_SESSION is only used with @provide_session...........(no files to
check)Skipped
Check for language that we do not accept as community..........(no files to
check)Skipped
Check BaseOperator and partial() arguments.....................(no files to
check)Skipped
Check model __init__ and decorator arguments are in sync.......(no files to
check)Skipped
Check BaseOperator core imports................................(no files to
check)Skipped
Check BaseOperatorLink core imports............................(no files to
check)Skipped
Check BaseOperator[Link] other imports.........................(no files to
check)Skipped
Check @task decorator implements custom_operator_name..........(no files to
check)Skipped
Verify usage of Airflow deprecation classes in core............(no files to
check)Skipped
Check provide_session and create_session imports...............(no files to
check)Skipped
Make sure LoggingMixin is not used alone.......................(no files to
check)Skipped
Make sure days_ago is imported from airflow.utils.dates........(no files to
check)Skipped
start_date not to be defined in default_args in example_dags...(no files to
check)Skipped
Check if licenses are OK for Apache............................(no files to
check)Skipped
Check if aiobotocore is an optional dependency only............(no files to
check)Skipped
Checks for Boring Cyborg configuration
consistency.................................Passed
Sort INTHEWILD.md alphabetically...............................(no files to
check)Skipped
Sort alphabetically and uniquify installed_providers.txt.......(no files to
check)Skipped
Sort alphabetically and uniquify spelling_wordlist.txt.........(no files to
check)Skipped
Lint Helm Chart................................................(no files to
check)Skipped
Check Shell scripts syntax correctness.........................(no files to
check)Skipped
stylelint......................................................(no files to
check)Skipped
Provider init file is
missing......................................................Passed
Provider subpackage init files are
there...........................................Passed
Validate hook IDs & names and sync with docs...................(no files to
check)Skipped
Sync integrations list with docs...............................(no files to
check)Skipped
Update Breeze README.md with config files hash.................(no files to
check)Skipped
Update Source Date Epoch for reproducible builds...............(no files to
check)Skipped
Breeze should have small number of top-level dependencies......(no files to
check)Skipped
Check if system tests have required segments of code...........(no files to
check)Skipped
Generate PyPI README...........................................(no files to
check)Skipped
Run markdownlint...............................................(no files to
check)Skipped
Lint JSON Schema files with JSON Schema........................(no files to
check)Skipped
Lint NodePort Service with JSON Schema.........................(no files to
check)Skipped
Lint Docker compose files with JSON Schema.....................(no files to
check)Skipped
Lint chart/values.schema.json file with JSON Schema............(no files to
check)Skipped
Vendor k8s definitions into values.schema.json.................(no files to
check)Skipped
Lint chart/values.yaml file with JSON Schema...................(no files to
check)Skipped
Lint config_templates/config.yml file with JSON Schema.........(no files to
check)Skipped
Check that workflow files have persist-credentials disabled....(no files to
check)Skipped
Check that docstrings do not specify param types...............(no files to
check)Skipped
Lint chart/values.schema.json file.............................(no files to
check)Skipped
Inline Dockerfile and Dockerfile.ci scripts....................(no files to
check)Skipped
Check changelogs for duplicate entries.........................(no files to
check)Skipped
Check newsfragments are
valid......................................................Passed
Update output of breeze commands in Breeze documentation.......(no files to
check)Skipped
Check that example dags url include provider
versions..............................Passed
Check that system tests is properly added......................(no files to
check)Skipped
Check that all logging methods are lazy........................(no files to
check)Skipped
Create missing init.py files in tests..........................(no files to
check)Skipped
TS types generation / ESLint / Prettier against UI
files...........................Failed
- hook id: ts-compile-format-lint-www
- exit code: 1
yarn install v1.22.21
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.42s.
yarn run v1.22.21
$ npx openapi-typescript "../api_connexion/openapi/v1.yaml" --output
static/js/types/api-generated.ts && node alias-rest-types.js
static/js/types/api-generated.ts
✨ openapi-typescript 5.4.1
file:///home/satoshi/projects/airflow/airflow/www/node_modules/openapi-typescript/dist/load.js:18
throw new Error(`YAML: ${err.toString()}`);
^
Error: YAML: YAMLException: bad indentation of a mapping entry (1842:4)
1839 | "404":
1840 | $ref: "#/components/res ...
1841 |
1842 | ? /dags/{dag_id}/dagRuns/{dag_ ...
-----------^
1843 | : parameters:
1844 | - $ref: "#/components/param ...
at parseSchema
(file:///home/satoshi/projects/airflow/airflow/www/node_modules/openapi-typescript/dist/load.js:18:19)
at load
(file:///home/satoshi/projects/airflow/airflow/www/node_modules/openapi-typescript/dist/load.js:122:33)
at openapiTS
(file:///home/satoshi/projects/airflow/airflow/www/node_modules/openapi-typescript/dist/index.js:38:11)
at generateSchema
(file:///home/satoshi/projects/airflow/airflow/www/node_modules/openapi-typescript/bin/cli.js:97:24)
at
file:///home/satoshi/projects/airflow/airflow/www/node_modules/openapi-typescript/bin/cli.js:196:13
at Array.map (<anonymous>)
at main
(file:///home/satoshi/projects/airflow/airflow/www/node_modules/openapi-typescript/bin/cli.js:186:20)
Node.js v21.6.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this
command.
Traceback (most recent call last):
File
"/home/satoshi/projects/airflow/./scripts/ci/pre_commit/pre_commit_www_lint.py",
line 32, in <module>
subprocess.check_call(["yarn", "run", "generate-api-types"], cwd=dir)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['yarn', 'run',
'generate-api-types']' returned non-zero exit status 1.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]