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

Define onlyIfUnchanged boolean parameter for CreateOrUpdate and Delete operations #11052

Closed
heaths opened this issue Apr 4, 2020 · 3 comments · Fixed by #11420 or #11975
Closed

Define onlyIfUnchanged boolean parameter for CreateOrUpdate and Delete operations #11052

heaths opened this issue Apr 4, 2020 · 3 comments · Fixed by #11420 or #11975
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Search
Milestone

Comments

@heaths
Copy link
Member

heaths commented Apr 4, 2020

We might consider creating an Options class that unions these together for this operation. We can address that comprehensively in the future.

Originally posted by @tg-msft in #11049

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Apr 4, 2020
@heaths heaths self-assigned this Apr 4, 2020
@heaths heaths added Client This issue points to a problem in the data-plane of the library. Search labels Apr 4, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Apr 4, 2020
@heaths heaths added this to the [2020] May milestone Apr 4, 2020
@heaths
Copy link
Member Author

heaths commented Apr 14, 2020

@sima-zhu we probably want to do this in Java as well. I was thinking perhaps ConditionalRequestOptions - not repeating "Search". @tg-msft also defined a few derivatives of RequestOptions that have similar names, i.e. not repeating "Search" since they are already more-scoped by name. Thoughts?

@heaths
Copy link
Member Author

heaths commented Apr 23, 2020

After much discussion, we've decided to instead define a boolean parameter named onlyIfUnchanged for CreateOrUpdate and Delete operations. For delete, we'll have an overload that takes a string and no ETag-related parameters or options, and a version that takes a resource with an ETag (e.g. SearchIndex) in whole and uses its ETag property, plus the onlyIfUnchanged parameter.

@heaths heaths changed the title Add MatchConditions into a SearchRequestOptions derivative Define onlyIfUnchanged boolean parameter for CreateOrUpdate and Delete operations Apr 23, 2020
heaths added a commit to heaths/azure-sdk-for-net that referenced this issue Apr 28, 2020
heaths added a commit that referenced this issue Apr 28, 2020
…ions (#11420)

* Combine MatchConditions and SearchRequestOptions

Fixes #11052

* Redefine ETag properties as Azure.ETag?

Fixes #11385

* Update public APIs

* Define onlyIfUnchanged for ETag support (#2)

This was suggested to match what AppConfiguration does. It simplifies it, with no practical reason for IfNoneMatch. We could always add that later as well.

* Update CHANGELOG and public APIs
@heaths
Copy link
Member Author

heaths commented May 9, 2020

Seems a critical commit didn't get pushed to the PR branch.

@heaths heaths reopened this May 9, 2020
@heaths heaths modified the milestones: [2020] May, [2020] June May 9, 2020
heaths added a commit to heaths/azure-sdk-for-net that referenced this issue May 9, 2020
heaths added a commit that referenced this issue May 11, 2020
* Change other SearchServiceClient methods to use onlyIfUnchanged

Fixes #11052

* Update public APIs

* Resolve PR feedback
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Search
Projects
None yet
1 participant