chore: restore pubsub samples until we can convert them to system tests#7909
Open
chore: restore pubsub samples until we can convert them to system tests#7909
Conversation
chore(deps): update dependency mocha to v6 This PR contains the following updates: | Package | Type | Update | Change | References | |---|---|---|---|---| | mocha | devDependencies | major | `^5.2.0` -> `^6.0.0` | [homepage](https://mochajs.org/), [source](https://togithub.com/mochajs/mocha) | --- ### Release Notes <details> <summary>mochajs/mocha</summary> ### [`v6.0.0`](https://togithub.com/mochajs/mocha/blob/master/CHANGELOG.md#​600--2019-02-18) [Compare Source](https://togithub.com/mochajs/mocha/compare/v5.2.0...v6.0.0) #### 🎉 Enhancements - [#​3726](https://togithub.com/mochajs/mocha/issues/3726): Add ability to unload files from `require` cache ([**@​plroebuck**](https://togithub.com/plroebuck)) #### 🐛 Fixes - [#​3737](https://togithub.com/mochajs/mocha/issues/3737): Fix falsy values from options globals ([**@​plroebuck**](https://togithub.com/plroebuck)) - [#​3707](https://togithub.com/mochajs/mocha/issues/3707): Fix encapsulation issues for `Suite#_onlyTests` and `Suite#_onlySuites` ([**@​vkarpov15**](https://togithub.com/vkarpov15)) - [#​3711](https://togithub.com/mochajs/mocha/issues/3711): Fix diagnostic messages dealing with plurality and markup of output ([**@​plroebuck**](https://togithub.com/plroebuck)) - [#​3723](https://togithub.com/mochajs/mocha/issues/3723): Fix "reporter-option" to allow comma-separated options ([**@​boneskull**](https://togithub.com/boneskull)) - [#​3722](https://togithub.com/mochajs/mocha/issues/3722): Fix code quality and performance of `lookupFiles` and `files` ([**@​plroebuck**](https://togithub.com/plroebuck)) - [#​3650](https://togithub.com/mochajs/mocha/issues/3650), [#​3654](https://togithub.com/mochajs/mocha/issues/3654): Fix noisy error message when no files found ([**@​craigtaub**](https://togithub.com/craigtaub)) - [#​3632](https://togithub.com/mochajs/mocha/issues/3632): Tests having an empty title are no longer confused with the "root" suite ([**@​juergba**](https://togithub.com/juergba)) - [#​3666](https://togithub.com/mochajs/mocha/issues/3666): Fix missing error codes ([**@​vkarpov15**](https://togithub.com/vkarpov15)) - [#​3684](https://togithub.com/mochajs/mocha/issues/3684): Fix exiting problem in Node.js v11.7.0+ ([**@​addaleax**](https://togithub.com/addaleax)) - [#​3691](https://togithub.com/mochajs/mocha/issues/3691): Fix `--delay` (and other boolean options) not working in all cases ([**@​boneskull**](https://togithub.com/boneskull)) - [#​3692](https://togithub.com/mochajs/mocha/issues/3692): Fix invalid command-line argument usage not causing actual errors ([**@​boneskull**](https://togithub.com/boneskull)) - [#​3698](https://togithub.com/mochajs/mocha/issues/3698), [#​3699](https://togithub.com/mochajs/mocha/issues/3699): Fix debug-related Node.js options not working in all cases ([**@​boneskull**](https://togithub.com/boneskull)) - [#​3700](https://togithub.com/mochajs/mocha/issues/3700): Growl notifications now show the correct number of tests run ([**@​outsideris**](https://togithub.com/outsideris)) - [#​3686](https://togithub.com/mochajs/mocha/issues/3686): Avoid potential ReDoS when diffing large objects ([**@​cyjake**](https://togithub.com/cyjake)) - [#​3715](https://togithub.com/mochajs/mocha/issues/3715): Fix incorrect order of emitted events when used programmatically ([**@​boneskull**](https://togithub.com/boneskull)) - [#​3706](https://togithub.com/mochajs/mocha/issues/3706): Fix regression wherein `--reporter-option`/`--reporter-options` did not support comma-separated key/value pairs ([**@​boneskull**](https://togithub.com/boneskull)) #### 📖 Documentation - [#​3652](https://togithub.com/mochajs/mocha/issues/3652): Switch from Jekyll to Eleventy ([**@​Munter**](https://togithub.com/Munter)) #### 🔩 Other - [#​3677](https://togithub.com/mochajs/mocha/issues/3677): Add error objects for createUnsupportedError and createInvalidExceptionError ([**@​boneskull**](https://togithub.com/boneskull)) - [#​3733](https://togithub.com/mochajs/mocha/issues/3733): Removed unnecessary processing in post-processing hook ([**@​wanseob**](https://togithub.com/wanseob)) - [#​3730](https://togithub.com/mochajs/mocha/issues/3730): Update nyc to latest version ([**@​coreyfarrell**](https://togithub.com/coreyfarrell)) - [#​3648](https://togithub.com/mochajs/mocha/issues/3648), [#​3680](https://togithub.com/mochajs/mocha/issues/3680): Fixes to support latest versions of [unexpected](https://npm.im/unexpected) and [unexpected-sinon](https://npm.im/unexpected-sinon) ([**@​sunesimonsen**](https://togithub.com/sunesimonsen)) - [#​3638](https://togithub.com/mochajs/mocha/issues/3638): Add meta tag to site ([**@​MartijnCuppens**](https://togithub.com/MartijnCuppens)) - [#​3653](https://togithub.com/mochajs/mocha/issues/3653): Fix parts of test suite failing to run on Windows ([**@​boneskull**](https://togithub.com/boneskull)) </details> --- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is stale, or if you modify the PR title to begin with "`rebase!`". :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- renovate-rebase -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#googleapis/nodejs-pubsub). #488 automerged by dpebot
refactor: use execSync for tests #564 automerged by dpebot
* Relax strictEqual to match RegExp * assert.include * use assert.include * npm run fix * fix: await was accidentally removed causing tests to break * Revert "npm run fix" This reverts commit f1468257881b429b25ef81ef1a2c4128b9ec3d96. * npm run fix * remove await before execSync * is it execa? * use cp.exec for sync-pull test because it might be blocking io * return the Promise * fix listen to error test - process exited 0, didn`t have Error * uninstall execa; * npm run fix * clean up
* updated CHANGELOG.md * updated package.json * updated samples/package.json
* updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip]
* Rewrite flowcontrol sample * Alex's suggestions * reset & passed all tests locally * lint * lint * comment * kir's suggestions * Dave's suggestions * change timeout back to 10 sec
… support it (#1973) * samples: add optimisticSubscribe, plus a few small library changes to support it * fix: simplify DebugMessage handling of StatusError * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: fix copyright date * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
…es (#1985) * build: fix a small issue with the typeless bot invocation * samples: add samples for cloud storage ingestion * samples: fix a paste-o in Kinesis sample * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * samples: fix paste-o with incorrect sample function name * tests: fix sample test quotes --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore(main): release 4.8.0 * chore(main): release 4.8.0 * build: also link the current pubsub version * chore(main): release 4.8.0 --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: feywind <57276408+feywind@users.noreply.github.com>
* samples: update publishing samples to clarify that topic objects should be cached; also fix a usage of publish() * samples: convert publishWithRetrySettings to use veneer * samples: update publishWithRetrySettings with new defaults; add comment about including all items * docs: clarify what subscriber batching means * samples: update EOD sample with endpoint * samples: add comments about ordered publishing as well
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* docs: Add ingestion from Kafka samples and tests * chore: Fix formatting in samples
* fix: type widening to match gapic, and two typing fixes * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * build: dodge broken version of promisify --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* chore!: migrate to Node 18 * chore: linter fix pass * chore: remove accidentally added file * samples: fix linting and typelessing of samples * build: remove typeless bot stuff from owlbot.py * feat: fix a bunch of linter errors, and import new gapic classes * fix: revert some of the promise fixes * tests: fix various test issues caused by version upgrades * chore: linter fixes * chore: try to bypass linting on TS samples for now * build: try updating lint and samples scripts * build: two owlbot related updates * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * build: revert execa to dodge esm for now * chore: also revert execa import for older version * chore: update execa reference once more * chore!: remove legacy otel support * feat!: remove legacy ack deadline parameters, and move maxExtension into subscriber options * build: further revert execa's version * build: more execa adjustments * feat: time to say goodbye to some more old OTel cruft * tests: this will be the day ... that tsc starts paying attention to @internal, apparently * chore: revert package.json version changes so release-please can do it * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [5.0.0](https://togithub.com/googleapis/nodejs-pubsub/compare/v4.11.0...v5.0.0) (2025-04-28) ### ⚠ BREAKING CHANGES * migrate to Node 18 ([#2024](https://togithub.com/googleapis/nodejs-pubsub/issues/2024)) * remove (broken) legacy OTel support * remove legacy ack deadline options * move maxExtension into subscriber options ### Miscellaneous Chores * Migrate to Node 18 ([#2024](https://togithub.com/googleapis/nodejs-pubsub/issues/2024)) ([8b0f5eb](https://togithub.com/googleapis/nodejs-pubsub/commit/8b0f5eb862f513fe8011beb36d6a8554d784b483)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
…#2035) I just noticed this while doing something unrelated.
* chore(main): release 5.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Megan Potter <57276408+feywind@users.noreply.github.com>
#2068) * feat: Add timeout option to Subscription.close() Implements a new `timeout` option (using `Duration`) for the `Subscription.close()` method. This provides more control over the shutdown process: - If `timeout` is zero, the subscription closes as quickly as possible without nacking buffered messages. - If `timeout` is positive, the subscription attempts to nack any buffered messages (in the lease manager) and waits up to the specified duration for pending acknowledgements and nacks to be sent to the server. - If no timeout is provided, the behavior remains as before (waits indefinitely for pending acks/modacks, no nacking). The core logic is implemented in `Subscriber.close()`. `PubSub.close()` documentation is updated to clarify its scope and recommend using `Subscription.close()` directly for this feature. Includes: - Unit tests for the new timeout behavior in `Subscriber.close()`. - A TypeScript sample (`samples/closeSubscriptionWithTimeout.ts`) demonstrating usage. - Updated JSDoc documentation for relevant methods. * docs: revert README change so release-please can do it * feat: jules' vibin' is too lo-fi, fix some bad assumptions * samples: typeless a JS sample for close with timeout * feat: add awaitWithTimeout and test * tests: also test error results without timeout * feat: update for the current spec, test updates coming * tests: misc fixes before further additions * feat: update Temporal shims to match latest standards * chore: linter fix * feat: update to latest spec doc info, finish unit tests * feat: also move the options from close() parameters to subscriber options * chore: fix linter errors * samples: update to latest API changes * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: no need to check isEmpty on remove * chore: remove unneeded promise skip code * fix: substantially clarify the awaitWithTimeout interface * chore: hoist timeout logic into its own method * fix: tests were leaking EventEmitter handlers * chore: change constant to CONSTANT_CASE --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* fix: move off the remaining rc versions * fix: move off rc version of gax
* chore(main): release 5.2.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* tests: fix two system-test bugs with one scone * tests: modernize system tests with individual resources per test * chore: update the headers on duplicated files to please the bot * tests: remove thirty and sixty constants, shift to number of subs * tests: uncomment commented code for later use
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* fix(deps): update all dependencies * build: revert .github/scripts changes, they are templated * build: revert some potentially incompatible changes in samples/package.json * build: revert some potentially incompatible changes in package.json * build: downgrade incompatible trace exporter * build: downgrade to non-ESM uuid * build: downgrade to non-ESM uuid * build: gts update needs other changes * build: gts update needs other changes --------- Co-authored-by: feywind <57276408+feywind@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7908 🦕