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

[Event Hubs] Test Issues with Rollup 1.14.0 #3484

Closed
chradek opened this issue Jun 5, 2019 · 3 comments · Fixed by #4079
Closed

[Event Hubs] Test Issues with Rollup 1.14.0 #3484

chradek opened this issue Jun 5, 2019 · 3 comments · Fixed by #4079
Assignees
Labels
EngSys This issue is impacting the engineering system. Event Hubs

Comments

@chradek
Copy link
Contributor

chradek commented Jun 5, 2019

Running the node integration tests in the @azure/event-hubs package throws connection-related errors for most tests that reach out over the network.

Steps to reproduce

  1. rush update
  2. rush build -t @azure/event-hubs
  3. cd into sdk/eventhub/event-hubs directory
  4. Create .env file in sdk/eventhub/event-hubs directory
  5. Generate test build: rushx build:test
  6. Run node integration tests: rushx integration-test:node

Findings

We believe the root cause is a regression in rollup@1.14.0: rollup/rollup#2970. This should be fixed in rollup@1.16.3: https://github.com/rollup/rollup/blob/master/CHANGELOG.md#1163.

TypeScript

// log.ts
export const context = debugModule("azure:event-hubs:connectionContext");


// connectionContext.ts
import * as log from "./log";

const onConnectionOpen: OnAmqpEvent = (context: EventContext) => {
   connectionContext.wasConnectionCloseCalled = false;
      log.context(
        "[%s] setting 'wasConnectionCloseCalled' property of connection context to %s.",
        connectionContext.connection.id,
        connectionContext.wasConnectionCloseCalled
      );
    };

ESM (valid)

// log.js
export const context = debugModule("azure:event-hubs:connectionContext");

// connectionContext.js
import * as log from "./log";

const onConnectionOpen = (context) => {
    connectionContext.wasConnectionCloseCalled = false;
    log.context("[%s] setting 'wasConnectionCloseCalled' property of connection context to %s.", connectionContext.connection.id, connectionContext.wasConnectionCloseCalled);
};

rollup@1.13.1 - CJS (valid)

const onConnectionOpen = (context$1) => {
    connectionContext.wasConnectionCloseCalled = false;
    context("[%s] setting 'wasConnectionCloseCalled' property of connection context to %s.", connectionContext.connection.id, connectionContext.wasConnectionCloseCalled);
};

rollup@1.14.0 - CJS (invalid)

const onConnectionOpen = (context) => {
    connectionContext.wasConnectionCloseCalled = false;
    context("[%s] setting 'wasConnectionCloseCalled' property of connection context to %s.", connectionContext.connection.id, connectionContext.wasConnectionCloseCalled);
};

Test Failures

1) Create EventHubClient #RunnableInBrowser
     creates an EventHubClient from an Azure.Identity credential:
   Uncaught Unhandled error. ({ _context:
 TypeError: context is not a function
     at Connection.onConnectionOpen (/home/vsts/work/1/s/sdk/eventhub/event-hubs/test-dist/index.js:12812:13)
     at Connection.emit (events.js:198:13)
     at emit (/home/vsts/work/1/s/common/temp/node_modules/.registry.npmjs.org/rhea-promise/0.1.15/node_modules/rhea-promise/dist/lib/util/utils.js:129:24)
     at Object.emitEvent (/home/vsts/work/1/s/common/temp/node_modules/.registry.npmjs.org/rhea-promise/0.1.15/node_modules/rhea-promise/dist/lib/util/utils.js:140:9)
     at Connection._connection.on (/home/vsts/work/1/s/common/temp/node_modules/.registry.npmjs.org/rhea-promise/0.1.15/node_modules/rhea-promise/dist/lib/connection.js:378:25)
     at Connection.emit (events.js:203:15)
     at Connection.dispatch (/home/vsts/work/1/s/common/temp/node_modules/.registry.npmjs.org/rhea/1.0.7/node_modules/rhea/lib/connection.js:242:37)
     at Connection.on_open (/home/vsts/work/1/s/common/temp/node_modules/.registry.npmjs.org/rhea/1.0.7/node_modules/rhea/lib/connection.js:640:14)
     at c.dispatch (/home/vsts/work/1/s/common/temp/node_modules/.registry.npmjs.org/rhea/1.0.7/node_modules/rhea/lib/types.js:909:33)
     at Transport.read (/home/vsts/work/1/s/common/temp/node_modules/.registry.npmjs.org/rhea/1.0.7/node_modules/rhea/lib/transport.js:108:36)
     at SaslClient.read (/home/vsts/work/1/s/common/temp/node_modules/.registry.npmjs.org/rhea/1.0.7/node_modules/rhea/lib/sasl.js:299:26)
     at Connection.input (/home/vsts/work/1/s/common/temp/node_modules/.registry.npmjs.org/rhea/1.0.7/node_modules/rhea/lib/connection.js:501:35)
     at TLSSocket.emit (events.js:198:13)
     at addChunk (_stream_readable.js:288:12)
     at readableAddChunk (_stream_readable.js:269:11)
     at TLSSocket.Readable.push (_stream_readable.js:224:10)
     at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17),

https://dev.azure.com/azure-sdk/internal/_build/results?buildId=57447

@chradek chradek self-assigned this Jun 5, 2019
@triage-new-issues triage-new-issues bot removed the triage label Jun 5, 2019
@chradek
Copy link
Contributor Author

chradek commented Jun 5, 2019

Narrowed it down to version 1.14.0 of rollup breaks our build. This was released earlier today. Version 1.13.1 works as expected.

@chradek
Copy link
Contributor Author

chradek commented Jun 5, 2019

We should also check if other packages are impacted, specifically service bus.

@chradek
Copy link
Contributor Author

chradek commented Jun 5, 2019

Narrowed the symtpom to a single parameter in connectionContext being renamed when generating the test build using rollup. The version in dist-esm is correct.

@mikeharder mikeharder self-assigned this Jun 7, 2019
@mikeharder mikeharder added the EngSys This issue is impacting the engineering system. label Jun 7, 2019
@mikeharder mikeharder changed the title [Event Hubs] Test Issues with Rollup [Event Hubs] Test Issues with Rollup 1.14.0 Jun 7, 2019
mikeharder added a commit that referenced this issue Jul 8, 2019
- "rollup" was previously pinned to 1.13.1 due to a regression in 1.14.0
  - rollup/rollup#2970
- The regression is fixed in 1.16.3
  - https://github.com/rollup/rollup/blob/master/CHANGELOG.md#1163
- Fixes #3484
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
EngSys This issue is impacting the engineering system. Event Hubs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants