Skip to content

Fix logs for autoentities#3299

Open
RubenCerna2079 wants to merge 6 commits intomainfrom
dev/rubencerna/autoentities-fix-logs
Open

Fix logs for autoentities#3299
RubenCerna2079 wants to merge 6 commits intomainfrom
dev/rubencerna/autoentities-fix-logs

Conversation

@RubenCerna2079
Copy link
Contributor

@RubenCerna2079 RubenCerna2079 commented Mar 19, 2026

Why make this change?

What is this change?

This changes the log messages so they are more clear by adding ' ' to the definition names from the autoentities, and stating that they are definition names beforehand. We also change the name from Autoentities to autoentities in the logs so that they are all consistent.
Lastly we also change some of the logs from Information to Debug.

How was this tested?

Tested locally since all the changes are related to the messages written in the logs.

@RubenCerna2079
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves clarity and reduces noise in autoentities-related logging across the runtime and CLI, aligning terminology/casing and making some parameter logs Debug-level.

Changes:

  • Standardizes log/error message wording to consistently use autoentities and to quote definition names (e.g., 'name').
  • Lowers autoentities query parameter logging from Information to Debug (MSSQL metadata provider).
  • Updates a few CLI outputs related to autoentities simulation for consistent casing.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/Core/Services/MetadataProviders/SqlMetadataProvider.cs Standardizes “Autoentities” → “autoentities” in a NotSupportedException message.
src/Core/Services/MetadataProviders/MsSqlMetadataProvider.cs Improves autoentities-related error/log strings, switches query-parameter logs to Debug, and changes QueryAutoentitiesAsync signature to include the definition name.
src/Config/ObjectModel/RuntimeConfig.cs Updates exception message for invalid autoentities definition lookup.
src/Cli/ConfigGenerator.cs Standardizes autoentities simulation CLI wording/casing.

You can also share your feedback on Copilot code review. Take the survey.

@RubenCerna2079
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@RubenCerna2079
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

…entities-fix-logs' into dev/rubencerna/autoentities-fix-logs
@RubenCerna2079
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

{
throw new DataApiBuilderException(
message: $"Cannot create new entity from autoentity pattern due to an internal error.",
message: $"Cannot create new entity from autoentities definition '{autoentityName}' due to an internal error.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per the bug #3264 , the message should be:

Cannot create new entity from autoentities member 'autoentityName' due to an internal error

whereas the other bug says it should be definition.
Clarify that there is a discrepancy in expectation. I do think definition is the right term to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

4 participants