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

Some minor issue fixs found during release check #365

Merged
merged 4 commits into from Dec 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions .dockerignore
Expand Up @@ -3,3 +3,20 @@ node_modules/**
swagger/**
__blobstorage__/**
__queuestorage__/**
__*.json
__*__
*.tgz
*.vsix
*.log
*.png
*.env
*.yml
temp
swagger
.git
.gitattributes
.gitignore
.lintstagedrc
.vscode
.vscodeignore
dist
6 changes: 5 additions & 1 deletion .npmignore
Expand Up @@ -22,4 +22,8 @@ debug.log
__*__.json
__*__
*.env
temp
temp
.gitattributes
.dockerignore
README.mcr.md
icon.png
5 changes: 5 additions & 0 deletions .vscodeignore
Expand Up @@ -8,6 +8,7 @@ azure-pipelines.yml
.lintstagedrc
.gitignore
.npmignore
.dockerignore
Dockerfile
__blobstorage__
typings
Expand All @@ -20,5 +21,9 @@ debug.log
*.tgz
__*__.json
__*__
__queuestorage__
__blobstorage__
__queueTestsPersistence__
__*
*.env
temp
4 changes: 1 addition & 3 deletions BreakingChanges.md
Expand Up @@ -6,11 +6,9 @@

- [Breaking] By default Azurite will block requests with unsupported headers or parameters which may impact data integrity.
- Skip this by switching to loose mode by Azurite configuration parameter `--loose`.
- [Breaking] Apply `LokiFsStructuredAdapter` as default blob metadata loki adapter to improve performance.
- This version cannot guarantee compatible with persisted database models file by previous version. Remove previous metadata file and restart Azurite in case any errors.
- [Breaking] Azurite updates underline metadata schema which does not compatible with previous versions.
- This version cannot guarantee compatible with persisted database models file by previous version. Remove previous metadata file and restart Azurite in case any errors.

## 2019.11 Version 3.3.0-preview

- [Breaking] This version cannot guarantee compatible with persisted database models file by previous version. Remove previous metadata file and restart Azurite in case any errors.
- [Breaking] This version cannot guarantee compatible with persisted database models file by previous version. Remove previous metadata file and restart Azurite in case any errors.
4 changes: 1 addition & 3 deletions ChangeLog.md
Expand Up @@ -14,8 +14,6 @@

Blob:

- [Breaking] Apply `LokiFsStructuredAdapter` as default blob metadata loki adapter to improve performance.
- This version cannot guarantee compatible with persisted database models file by previous version. Remove previous metadata file and restart Azurite in case any errors.
- [Breaking] Azurite updates underline metadata schema which does not compatible with previous versions.
- This version cannot guarantee compatible with persisted database models file by previous version. Remove previous metadata file and restart Azurite in case any errors.
- List blocks will filter the returned block list with input BlockListingFilter.
Expand Down Expand Up @@ -43,7 +41,7 @@ Queue:

- AllowedHeaders and ExposedHeaders are optional now when setting CORS.
- Fix Put message fail with max messagettl.
- Updated message size calculation when checking 64KB limitation.
- Updated message size calculation when checking 64KB limitation.

## 2019.11 Version 3.3.0-preview

Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Expand Up @@ -10,6 +10,7 @@ COPY . .
RUN npm config set unsafe-perm=true
RUN npm ci
RUN npm run build
RUN ls -l
RUN npm install -g

# Blob Storage Port
Expand Down
21,556 changes: 21,556 additions & 0 deletions NOTICE.txt

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -4,7 +4,6 @@
"description": "An open source Azure Storage API compatible server",
"icon": "icon.png",
"version": "3.4.0",
"preview": false,
"publisher": "Azurite",
"categories": [
"Other"
Expand Down Expand Up @@ -198,7 +197,7 @@
"test:blob:sql": "npm run lint && cross-env AZURITE_TEST_DB=mysql://root:my-secret-pw@127.0.0.1:3306/azurite_blob_test mocha --compilers ts-node/register --no-timeouts --grep @sql --recursive tests/blob/*.test.ts tests/blob/**/*.test.ts",
"test:blob:sql:ci": "npm run lint && cross-env AZURITE_TEST_DB=mysql://root:my-secret-pw@127.0.0.1:13306/azurite_blob_test mocha --compilers ts-node/register --no-timeouts --grep @sql --recursive tests/blob/*.test.ts tests/blob/**/*.test.ts",
"test:queue": "npm run lint && mocha --compilers ts-node/register --no-timeouts --recursive tests/queue/*.test.ts tests/queue/**/*.test.ts",
"clean": "rimraf dist typings *.log coverage __testspersistence__ temp __testsstorage__ .nyc_output debug.log *.vsix",
"clean": "rimraf dist typings *.log coverage __testspersistence__ temp __testsstorage__ .nyc_output debug.log *.vsix *.tgz",
"clean:deep": "npm run clean && rimraf debug.log __*",
"validate:npmpack:win": "npm install && npm run build && npm pack && cross-var npm install -g azurite-$npm_package_version.tgz && azurite -v && azurite-blob -v && azurite-queue -v",
"validate:npmpack:linux_mac": "npm install && npm run build && npm pack && cross-var sudo npm install -g azurite-$npm_package_version.tgz && azurite -v && azurite-blob -v && azurite-queue -v",
Expand Down
8 changes: 0 additions & 8 deletions src/blob/persistence/LokiBlobMetadataStore.ts
Expand Up @@ -7,7 +7,6 @@ import {
convertDateTimeStringMsTo7Digital,
rimrafAsync
} from "../../common/utils/utils";
import { lfsa } from "../../common/utils/utils";
import StorageErrorFactory from "../errors/StorageErrorFactory";
import * as Models from "../generated/artifacts/models";
import { LeaseStatusType } from "../generated/artifacts/models";
Expand Down Expand Up @@ -100,7 +99,6 @@ export default class LokiBlobMetadataStore

public constructor(public readonly lokiDBPath: string) {
this.db = new Loki(lokiDBPath, {
adapter: new lfsa(),
autosave: true,
autosaveInterval: 5000
});
Expand Down Expand Up @@ -209,12 +207,6 @@ export default class LokiBlobMetadataStore
if (this.isClosed()) {
await rimrafAsync(this.lokiDBPath);

// Remove separate metadata collection json files generated by LokiFsStructuredAdapter
const searchScope = 20; // Should be larger than number of collections for every loki database
for (let i = 0; i < searchScope; i++) {
await rimrafAsync(`${this.lokiDBPath}.${i}`);
}

return;
}
throw new Error(`Cannot clean LokiBlobMetadataStore, it's not closed.`);
Expand Down
7 changes: 7 additions & 0 deletions src/blob/persistence/SqlBlobMetadataStore.ts
Expand Up @@ -103,6 +103,13 @@ export default class SqlBlobMetadataStore implements IBlobMetadataStore {
connectionURI: string,
sequelizeOptions?: SequelizeOptions
) {
// Enable encrypt connection for SQL Server
if (connectionURI.startsWith("mssql") && sequelizeOptions) {
sequelizeOptions.dialectOptions = sequelizeOptions.dialectOptions || {};
(sequelizeOptions.dialectOptions as any).options =
(sequelizeOptions.dialectOptions as any).options || {};
(sequelizeOptions.dialectOptions as any).options.encrypt = true;
}
this.sequelize = new Sequelize(connectionURI, sequelizeOptions);
}

Expand Down
7 changes: 7 additions & 0 deletions src/common/persistence/SqlExtentMetadataStore.ts
Expand Up @@ -36,6 +36,13 @@ export default class SqlExtentMetadataStore implements IExtentMetadataStore {
connectionURI: string,
sequelizeOptions?: SequelizeOptions
) {
// Enable encrypt connection for SQL Server
if (connectionURI.startsWith("mssql") && sequelizeOptions) {
sequelizeOptions.dialectOptions = sequelizeOptions.dialectOptions || {};
(sequelizeOptions.dialectOptions as any).options =
(sequelizeOptions.dialectOptions as any).options || {};
(sequelizeOptions.dialectOptions as any).options.encrypt = true;
}
this.sequelize = new Sequelize(connectionURI, sequelizeOptions);
}

Expand Down