Skip to content

Mislabeled warning #494

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

Closed
chamini2 opened this issue Sep 15, 2021 · 7 comments · Fixed by #502
Closed

Mislabeled warning #494

chamini2 opened this issue Sep 15, 2021 · 7 comments · Fixed by #502
Assignees
Labels
🐞bug Something isn't working
Milestone

Comments

@chamini2
Copy link

Is your feature request related to a problem? Please describe.
There is --fail-on-warning that fails for warnings or errors, but no --fail-on-error only to fail for errors (ignoring warnings)

Describe the solution you'd like
--fail-on-error only to fail for errors (ignoring warnings)

Describe alternatives you've considered
None

Additional context
To make a GitHub Action fail for errors only.

@chamini2 chamini2 added the ✨ enhancement New feature or improvement label Sep 15, 2021
@dbanty
Copy link
Collaborator

dbanty commented Sep 15, 2021

I'm a bit confused, failing on only errors should be the default behavior. --fail-on-warning should turn on failing for warnings, but failing on errors should always be true. Is that not the case? If not, then this is a bug.

@chamini2
Copy link
Author

I believe it's not failing on errors, we got:

ERROR parsing PUT /monitoring-profiles/{profile-name}/job within monitoring_profile_controller. Endpoint will not be generated.
Incorrect path templating for /monitoring-profiles/{profile-name}/job (Path parameters do not match with path)
ERROR parsing GET /monitoring-profiles/{profile-name} within monitoring_profile_controller. Endpoint will not be generated.
Incorrect path templating for /monitoring-profiles/{profile-name} (Path parameters do not match with path)
ERROR parsing GET /monitoring-profiles/{profile-name}/jobs within monitoring_profile_controller. Endpoint will not be generated.
Incorrect path templating for /monitoring-profiles/{profile-name}/jobs (Path parameters do not match with path)
WARNING parsing PUT /feature-groups/schedule/offline-to-online-etl/bigquery-firestore within feature_group_load_controller.
Cannot parse response for status code 200, response will be ommitted from generated client
Response(description='OK', headers=None, content={'*/*': MediaType(media_type_schema=Schema(title=None, multipleOf=None, maximum=None, exclusiveMaximum=None, minimum=None, exclusiveMinimum=None, maxLength=None, minLength=None, pattern=None, maxItems=None, minItems=None, uniqueItems=None, maxProperties=None, minProperties=None, required=None, enum=None, type=<DataType.ARRAY: 'array'>, allOf=None, oneOf=[], anyOf=[], schema_not=None, items=Reference(ref='#/components/schemas/FeatureGroupLoad'), properties=None, additionalProperties=None, description=None, schema_format=None, default=None, nullable=False, discriminator=None, readOnly=None, writeOnly=None, xml=None, externalDocs=None, example=None, deprecated=None), example=None, examples=None, encoding=None)}, links=None)
WARNING parsing GET /feature-groups/{featureGroup}/load within feature_group_load_controller.
Cannot parse response for status code 200, response will be ommitted from generated client
Response(description='OK', headers=None, content={'*/*': MediaType(media_type_schema=Reference(ref='#/components/schemas/FeatureGroupLoad'), example=None, examples=None, encoding=None)}, links=None)
WARNING parsing GET /service-account/notebook-role/status within service_account_status_controller.
Cannot parse response for status code 200, response will be ommitted from generated client
Response(description='OK', headers=None, content={'text/plain': MediaType(media_type_schema=Schema(title=None, multipleOf=None, maximum=None, exclusiveMaximum=None, minimum=None, exclusiveMinimum=None, maxLength=None, minLength=None, pattern=None, maxItems=None, minItems=None, uniqueItems=None, maxProperties=None, minProperties=None, required=None, enum=None, type=<DataType.STRING: 'string'>, allOf=None, oneOf=[], anyOf=[], schema_not=None, items=None, properties=None, additionalProperties=None, description=None, schema_format=None, default=None, nullable=False, discriminator=None, readOnly=None, writeOnly=None, xml=None, externalDocs=None, example=None, deprecated=None), example=None, examples=None, encoding=None)}, links=None)
WARNING parsing GET /service-account/api-client-role/status within service_account_status_controller.
Cannot parse response for status code 200, response will be ommitted from generated client
Response(description='OK', headers=None, content={'text/plain': MediaType(media_type_schema=Schema(title=None, multipleOf=None, maximum=None, exclusiveMaximum=None, minimum=None, exclusiveMinimum=None, maxLength=None, minLength=None, pattern=None, maxItems=None, minItems=None, uniqueItems=None, maxProperties=None, minProperties=None, required=None, enum=None, type=<DataType.STRING: 'string'>, allOf=None, oneOf=[], anyOf=[], schema_not=None, items=None, properties=None, additionalProperties=None, description=None, schema_format=None, default=None, nullable=False, discriminator=None, readOnly=None, writeOnly=None, xml=None, externalDocs=None, example=None, deprecated=None), example=None, examples=None, encoding=None)}, links=None)
Skipping Integration
autoflake is not in PATH
Skipping Integration
isort is not in PATH
Skipping Integration
black is not in PATH
If you believe this was a mistake or this tool is missing a feature you need, please open an issue at https://github.com/triaxtec/openapi-python-client/issues/new/choose

and it did not end as error

@chamini2
Copy link
Author

any ideas? @dbanty

@dbanty
Copy link
Collaborator

dbanty commented Sep 21, 2021

I haven't forgotten about you, I've just been on vacation 🏖. I should be able to reproduce and fix it this weekend.

@chamini2
Copy link
Author

Thank you!

@dbanty dbanty added 🐞bug Something isn't working and removed ✨ enhancement New feature or improvement labels Sep 25, 2021
@dbanty dbanty self-assigned this Sep 25, 2021
@dbanty dbanty added this to the 0.10.5 milestone Sep 25, 2021
@dbanty dbanty changed the title Offer a --fail-on-error flag Errors do not fail a GitHub Actions pipeline Sep 25, 2021
@dbanty
Copy link
Collaborator

dbanty commented Sep 26, 2021

Well I found the issue 😓. Turns out that thing labeled "ERROR" is actually a warning... it can't generate the one endpoint but it can keep generating others so it actually just skips that. Clearly it used to be an error at some point and I never updated the text... confusing. I'm going to update the text for 0.10.5. I should probably have a clearer indication of the level of any given message in a future change.

@chamini2
Copy link
Author

Thanks dbanty! Could you also review openapi-generators/openapi-python-client-action#4, it's related to the same problem I found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞bug Something isn't working
Projects
None yet
2 participants