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

"Update UpdateEntity and DeleteEntity to throw InvalidInput error for Malformed Etag" #2062

Merged
merged 51 commits into from
Aug 21, 2023

Conversation

PrasantJillella
Copy link
Contributor

No description provided.

Copy link
Member

@blueww blueww left a comment

Choose a reason for hiding this comment

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

Please see my comments to fix the build failure.
Please add change log: https://github.com/Azure/Azurite/blob/main/ChangeLog.md

src/table/handlers/TableHandler.ts Outdated Show resolved Hide resolved
@blueww
Copy link
Member

blueww commented Jul 21, 2023

The test case build fail:

tests/table/apis/table.entity.issues.test.ts(220,11): error TS1155: 'const' declarations must be initialized.
tests/table/apis/table.entity.issues.test.ts(232,17): error TS2554: Expected 2-3 arguments, but got 1.
tests/table/apis/table.entity.issues.test.ts(234,15): error TS2454: Variable 'rowKey' is used before being assigned.
tests/table/apis/table.entity.issues.test.ts(244,15): error TS2454: Variable 'rowKey' is used before being assigned.
tests/table/apis/table.entity.issues.test.ts(252,17): error TS2551: Property 'mergeEntity' does not exist on type 'TableClient'. Did you mean 'getEntity'?
tests/table/apis/table.entity.issues.test.ts(254,15): error TS2454: Variable 'rowKey' is used before being assigned.
tests/table/apis/table.entity.issues.test.ts(256,15): error TS7006: Parameter 'reason' implicitly has an 'any' type.

Copy link
Contributor Author

@PrasantJillella PrasantJillella left a comment

Choose a reason for hiding this comment

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

Addressing comments.

Copy link
Member

@blueww blueww left a comment

Choose a reason for hiding this comment

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

The code change looks good to me.
Would you please also add the change to changelog: https://github.com/Azure/Azurite/blob/main/ChangeLog.md

@PrasantJillella
Copy link
Contributor Author

The code change looks good to me. Would you please also add the change to changelog: https://github.com/Azure/Azurite/blob/main/ChangeLog.md

Hi raised a PR for the suggested changeLog updated
#2095

Please take a look, thank you.

@blueww
Copy link
Member

blueww commented Aug 14, 2023

@PrasantJillella

The change log looks good to me. But why not add it into same PR as the code change?
For better tracking the code change in the future, normally we should have change log in same PR with the code change.

@blueww
Copy link
Member

blueww commented Aug 14, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@blueww
Copy link
Member

blueww commented Aug 16, 2023

@PrasantJillella

Please note, there still 2 things blocked the PR from merge:

  1. the license/cla is still not agreed by you.
  2. the change log is not added to same PR with code change.

jetuk and others added 24 commits August 18, 2023 09:26
Add missing requestId to the appendBlock operation of an append blob.

Fixes Azure#631.
Bumps [tslib](https://github.com/Microsoft/tslib) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/Microsoft/tslib/releases)
- [Commits](microsoft/tslib@2.6.0...v2.6.1)

---
updated-dependencies:
- dependency-name: tslib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…osecond precision is provided in the underlying value. (Azure#2077)

* fix: Resolve issues with datetime comparisons in scenarios where microsecond precision is provided in the underlying value.

Fixes Filtering by Dates with Table Service no longer working in 3.25.0 Azure#2069

* doc: Update changelog

* fix: Ensure that we only match exact GUIDs for the legacy comparison model
…thing (Azure#2079)

* Adding all of the code to correctly remove any entities with non populated fields when doing a query on said field. This includes the tests, as well as a reproduction for the current issue

* The current check for partition key was using !! which for an empty string in JS resolve to false, causing the query context to think this was a table instead of an entity. Instead check for the existence of the field

* Adding to the changelog

* Addressing PR comment and removing unecessary !! symbols

---------

Co-authored-by: Garrett Baski <[email protected]>
Co-authored-by: Wei Wei <[email protected]>
Bumps [@azure/core-auth](https://github.com/Azure/azure-sdk-for-js) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/Azure/azure-sdk-for-js/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/Changelog-for-next-generation.md)
- [Commits](https://github.com/Azure/azure-sdk-for-js/compare/@azure/core-auth_1.4.0...@azure/core-auth_1.5.0)

---
updated-dependencies:
- dependency-name: "@azure/core-auth"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@azure/core-rest-pipeline](https://github.com/Azure/azure-sdk-for-js) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/Azure/azure-sdk-for-js/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/Changelog-for-next-generation.md)
- [Commits](https://github.com/Azure/azure-sdk-for-js/compare/@azure/core-rest-pipeline_1.11.0...@azure/core-rest-pipeline_1.12.0)

---
updated-dependencies:
- dependency-name: "@azure/core-rest-pipeline"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [cross-env](https://github.com/kentcdodds/cross-env) from 6.0.3 to 7.0.3.
- [Release notes](https://github.com/kentcdodds/cross-env/releases)
- [Changelog](https://github.com/kentcdodds/cross-env/blob/master/CHANGELOG.md)
- [Commits](kentcdodds/cross-env@v6.0.3...v7.0.3)

---
updated-dependencies:
- dependency-name: cross-env
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/validator](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/validator) from 13.7.17 to 13.11.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/validator)

---
updated-dependencies:
- dependency-name: "@types/validator"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) and [@types/jsonwebtoken](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jsonwebtoken). These dependencies needed to be updated together.

Updates `jsonwebtoken` from 9.0.0 to 9.0.1
- [Changelog](https://github.com/auth0/node-jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](auth0/node-jsonwebtoken@v9.0.0...v9.0.1)

Updates `@types/jsonwebtoken` from 9.0.1 to 9.0.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jsonwebtoken)

---
updated-dependencies:
- dependency-name: jsonwebtoken
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: "@types/jsonwebtoken"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [prettier](https://github.com/prettier/prettier) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.0.0...3.0.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.5.2 to 3.6.0.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](sidorares/node-mysql2@v3.5.2...v3.6.0)

---
updated-dependencies:
- dependency-name: mysql2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/bluebird](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/bluebird) from 3.5.37 to 3.5.38.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/bluebird)

---
updated-dependencies:
- dependency-name: "@types/bluebird"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/vscode](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/vscode) from 1.80.0 to 1.81.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/vscode)

---
updated-dependencies:
- dependency-name: "@types/vscode"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [rcedit](https://github.com/electron/node-rcedit) from 3.0.1 to 3.1.0.
- [Release notes](https://github.com/electron/node-rcedit/releases)
- [Changelog](https://github.com/electron/node-rcedit/blob/master/.releaserc.json)
- [Commits](electron/node-rcedit@v3.0.1...v3.1.0)

---
updated-dependencies:
- dependency-name: rcedit
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix 2061 & 2083

* fix issue Azure#2064

* Add test cases and change log

---------

Co-authored-by: EmmaZhu <[email protected]>
Bumps [prettier](https://github.com/prettier/prettier) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.0.1...3.0.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint](https://github.com/eslint/eslint) from 8.46.0 to 8.47.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.46.0...v8.47.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.2.3 to 14.0.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](lint-staged/lint-staged@v13.2.3...v14.0.0)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [azure-storage](https://github.com/Azure/azure-storage-node) from 2.10.6 to 2.10.7.
- [Release notes](https://github.com/Azure/azure-storage-node/releases)
- [Changelog](https://github.com/Azure/azure-storage-node/blob/master/ChangeLog.md)
- [Commits](https://github.com/Azure/azure-storage-node/commits)

---
updated-dependencies:
- dependency-name: azure-storage
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ChangeLog.md Outdated
@@ -20,6 +20,9 @@ Queue:
- Fixed error code when dequeue message with invalid visibilitytimeout (issue #2083)
- Fixed error code when sas request authentication failed (issue #2064)

Table:
- Fixed the errorCode returned, when malformed Etag is provided for table Update/Delete calls. (issue #2013)

Copy link
Member

Choose a reason for hiding this comment

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

Add the change log to "## Upcoming Release" above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@PrasantJillella PrasantJillella changed the title "Update, Delete and Merge entities throw InvalidInput error for Malformed Etag" "Update UpdateEntity and DeleteEntity to throw InvalidInput error for Malformed Etag" Aug 18, 2023
@blueww blueww merged commit fb3e85a into Azure:main Aug 21, 2023
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants