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

feat(query): add feature flag list-in-normalize #8845

Merged
merged 1 commit into from
Jun 12, 2023
Merged

Conversation

mangalaman93
Copy link
Member

@mangalaman93 mangalaman93 commented May 31, 2023

This feature flag allows configuring @normalize in the query language such that if there are multiple fields with same alias, they could be returned as a list or non-list.

There was a breaking change at some point with the PR #7639. Some customers do not prefer a list response in case of @normalize. We would like to not make any breaking changes going forward, and hence, introducing this feature flag enables users to make that choice.

@dgraph-bot dgraph-bot added area/core internal mechanisms area/testing Testing related issues go Pull requests that update Go code labels May 31, 2023
@mangalaman93 mangalaman93 changed the title Revert "fix(DGRAPH): fix @normalize response Revert "fix(DGRAPH): fix @normalize response" May 31, 2023
@mangalaman93 mangalaman93 changed the title Revert "fix(DGRAPH): fix @normalize response" [BREAKING] Revert "fix(DGRAPH): fix @normalize response" May 31, 2023
@joshua-goldstein
Copy link
Contributor

Which future release is this going into, since this is a breaking change? Will we bring this into v23?

@MichelDiz
Copy link
Contributor

Just a question, are you sure about this?
I remember this behavior being a request from the community. I don't record exactly, but there was a discussion about this back then. Do we have a new discussion to revert this?
The previous behavior in my opinion is invalid even by JSON standards. Where two keys cannot have the same name in the same object.

e.g from the PR:

"b2": [
      {
        "Name": "Process",
        "id": "Process",
        "Name":"Namespace",
        "id": "Core/Namespace"
      }
    ]
"b2": [
      {
        "Name": [
          "Process",
          "Namespace"
        ],
        "id": [
          "Process",
          "Core/Namespace"
        ]
      }
]

@mangalaman93 mangalaman93 changed the title [BREAKING] Revert "fix(DGRAPH): fix @normalize response" [WIP] Revert "fix(DGRAPH): fix @normalize response" Jun 7, 2023
@mangalaman93 mangalaman93 reopened this Jun 9, 2023
@mangalaman93 mangalaman93 changed the title [WIP] Revert "fix(DGRAPH): fix @normalize response" feat(query): add feature flag list-in-normalize Jun 9, 2023
This feature flag allows configuring @normalize in the query
language such that if there are multiple fields with same alias,
they could be returned as a list or non-list.

There was a breaking change at some point with the PR
#7639. Some customers
do not prefer a list response in case of @normalize. We would
like to not make any breaking changes going forward, and hence,
introducing this feature flag enables users to make that choice.
@mangalaman93
Copy link
Member Author

Modified the PR to provide a feature flag which is enabled by default. It can be disabled if needed.

dgraphtest/config.go Show resolved Hide resolved
@mangalaman93 mangalaman93 merged commit d3ec3b9 into main Jun 12, 2023
@mangalaman93 mangalaman93 deleted the aman/normalize branch June 12, 2023 06:42
mangalaman93 added a commit that referenced this pull request Jun 14, 2023
mangalaman93 added a commit that referenced this pull request Jun 14, 2023
mangalaman93 added a commit that referenced this pull request Jun 15, 2023
dgraph-bot pushed a commit that referenced this pull request Jul 7, 2023
This feature flag allows configuring @normalize in the query language
such that if there are multiple fields with same alias, they could be
returned as a list or non-list.
    
There was a breaking change at some point with the PR
#7639. Some customers do not
prefer a list response in case of @normalize. We would like to not make
any breaking changes going forward, and hence, introducing this feature
flag enables users to make that choice.
dgraph-bot pushed a commit that referenced this pull request Jul 7, 2023
mangalaman93 added a commit that referenced this pull request Aug 3, 2023
This feature flag allows configuring @normalize in the query language
such that if there are multiple fields with same alias, they could be
returned as a list or non-list.

There was a breaking change at some point with the PR
#7639. Some customers do not
prefer a list response in case of @normalize. We would like to not make
any breaking changes going forward, and hence, introducing this feature
flag enables users to make that choice.
mangalaman93 added a commit that referenced this pull request Aug 3, 2023
This feature flag allows configuring @normalize in the query language
such that if there are multiple fields with same alias, they could be
returned as a list or non-list.

There was a breaking change at some point with the PR
#7639. Some customers do not
prefer a list response in case of @normalize. We would like to not make
any breaking changes going forward, and hence, introducing this feature
flag enables users to make that choice.
mangalaman93 added a commit that referenced this pull request Aug 4, 2023
This feature flag allows configuring @normalize in the query language
such that if there are multiple fields with same alias, they could be
returned as a list or non-list.

There was a breaking change at some point with the PR
#7639. Some customers do not
prefer a list response in case of @normalize. We would like to not make
any breaking changes going forward, and hence, introducing this feature
flag enables users to make that choice.
mangalaman93 added a commit that referenced this pull request Aug 4, 2023
This feature flag allows configuring @normalize in the query language
such that if there are multiple fields with same alias, they could be
returned as a list or non-list.

There was a breaking change at some point with the PR
#7639. Some customers do not
prefer a list response in case of @normalize. We would like to not make
any breaking changes going forward, and hence, introducing this feature
flag enables users to make that choice.
mangalaman93 added a commit that referenced this pull request Aug 8, 2023
…8929)

This feature flag allows configuring @normalize in the query language
such that if there are multiple fields with same alias, they could be
returned as a list or non-list.

There was a breaking change at some point with the PR
#7639. Some customers do not
prefer a list response in case of @normalize. We would like to not make
any breaking changes going forward, and hence, introducing this feature
flag enables users to make that choice.
jbhamra1 pushed a commit that referenced this pull request Aug 17, 2023
…8929)

This feature flag allows configuring @normalize in the query language
such that if there are multiple fields with same alias, they could be
returned as a list or non-list.

There was a breaking change at some point with the PR
#7639. Some customers do not
prefer a list response in case of @normalize. We would like to not make
any breaking changes going forward, and hence, introducing this feature
flag enables users to make that choice.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core internal mechanisms area/testing Testing related issues go Pull requests that update Go code
Development

Successfully merging this pull request may close these issues.

5 participants