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

Issue:#1712 fix by resetting generation id #1727

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
displayName: should skip tests
- bash: test $SKIP_TESTS && echo "Skipped!" || yarn install
displayName: yarn install
- bash: test $SKIP_TESTS && echo "Skipped!" || docker-compose -f ${COMPOSE_FILE} pull
- bash: test $SKIP_TESTS && echo "Skipped!" || docker compose -f ${COMPOSE_FILE} pull
displayName: docker-compose pull
- bash: test $SKIP_TESTS && echo "Skipped!" || yarn test:group:broker:ci
displayName: test
Expand All @@ -94,7 +94,7 @@ jobs:
displayName: should skip tests
- bash: test $SKIP_TESTS && echo "Skipped!" || yarn install
displayName: yarn install
- bash: test $SKIP_TESTS && echo "Skipped!" || docker-compose -f ${COMPOSE_FILE} pull
- bash: test $SKIP_TESTS && echo "Skipped!" || docker compose -f ${COMPOSE_FILE} pull
displayName: docker-compose pull
- bash: test $SKIP_TESTS && echo "Skipped!" || yarn test:group:admin:ci
displayName: test
Expand All @@ -119,7 +119,7 @@ jobs:
displayName: should skip tests
- bash: test $SKIP_TESTS && echo "Skipped!" || yarn install
displayName: yarn install
- bash: test $SKIP_TESTS && echo "Skipped!" || docker-compose -f ${COMPOSE_FILE} pull
- bash: test $SKIP_TESTS && echo "Skipped!" || docker compose -f ${COMPOSE_FILE} pull
displayName: docker-compose pull
- bash: test $SKIP_TESTS && echo "Skipped!" || yarn test:group:producer:ci
displayName: test
Expand All @@ -144,7 +144,7 @@ jobs:
displayName: should skip tests
- bash: test $SKIP_TESTS && echo "Skipped!" || yarn install
displayName: yarn install
- bash: test $SKIP_TESTS && echo "Skipped!" || docker-compose -f ${COMPOSE_FILE} pull
- bash: test $SKIP_TESTS && echo "Skipped!" || docker compose -f ${COMPOSE_FILE} pull
displayName: docker-compose pull
- bash: test $SKIP_TESTS && echo "Skipped!" || yarn test:group:consumer:ci
displayName: test
Expand All @@ -171,7 +171,7 @@ jobs:
displayName: should skip tests
- bash: test $SKIP_TESTS && echo "Skipped!" || yarn install
displayName: yarn install
- bash: test $SKIP_TESTS && echo "Skipped!" || docker-compose -f ${COMPOSE_FILE} pull
- bash: test $SKIP_TESTS && echo "Skipped!" || docker compose -f ${COMPOSE_FILE} pull
displayName: docker-compose pull
- bash: test $SKIP_TESTS && echo "Skipped!" || yarn test:group:others:ci
displayName: test
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
displayName: should skip tests
- bash: test $SKIP_TESTS && echo "Skipped!" || yarn install
displayName: yarn install
- bash: test $SKIP_TESTS && echo "Skipped!" || docker-compose -f ${COMPOSE_FILE} pull
- bash: test $SKIP_TESTS && echo "Skipped!" || docker compose -f ${COMPOSE_FILE} pull
displayName: docker-compose pull
- bash: test $SKIP_TESTS && echo "Skipped!" || yarn test:group:oauthbearer:ci
displayName: test
Expand Down
4 changes: 2 additions & 2 deletions scripts/dockerComposeUp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
COMPOSE_FILE=${COMPOSE_FILE:="docker-compose.2_4.yml"}

echo "Running compose file: ${COMPOSE_FILE}:"
docker-compose -f "${COMPOSE_FILE}" up --force-recreate -d
docker compose -f "${COMPOSE_FILE}" up --force-recreate -d
if [ -z ${NO_LOGS} ]; then
docker-compose -f "${COMPOSE_FILE}" logs -f
docker compose -f "${COMPOSE_FILE}" logs -f
fi
4 changes: 2 additions & 2 deletions scripts/testWithKafka.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ find_container_id() {
}

quit() {
docker-compose -f "${COMPOSE_FILE}" down --remove-orphans
docker compose -f "${COMPOSE_FILE}" down --remove-orphans
exit 1
}

Expand Down Expand Up @@ -51,6 +51,6 @@ TEST_EXIT=$?
echo

if [ -z ${DO_NOT_STOP} ]; then
docker-compose -f "${COMPOSE_FILE}" down --remove-orphans
docker compose -f "${COMPOSE_FILE}" down --remove-orphans
fi
exit ${TEST_EXIT}
2 changes: 1 addition & 1 deletion scripts/waitForKafka.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ waitForNode(kafka3ContainerId)
console.log('\nAll nodes up:')
console.log(
execa
.commandSync(`docker-compose -f ${process.env.COMPOSE_FILE} ps`, { shell: true })
.commandSync(`docker compose -f ${process.env.COMPOSE_FILE} ps`, { shell: true })
.stdout.toString('utf-8')
)

Expand Down
3 changes: 2 additions & 1 deletion src/consumer/consumerGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,9 @@ module.exports = class ConsumerGroup {
throw new KafkaJSError(e)
}

if (e.type === 'UNKNOWN_MEMBER_ID') {
if (e.type === 'UNKNOWN_MEMBER_ID' || e.type === 'ILLEGAL_GENERATION') {
this.memberId = null
this.groupGenerationId = null
throw new KafkaJSError(e)
}

Expand Down
4 changes: 1 addition & 3 deletions src/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,7 @@ class KafkaJSNoBrokerAvailableError extends KafkaJSError {
}

const isRebalancing = e =>
e.type === 'REBALANCE_IN_PROGRESS' ||
e.type === 'NOT_COORDINATOR_FOR_GROUP' ||
e.type === 'ILLEGAL_GENERATION'
e.type === 'REBALANCE_IN_PROGRESS' || e.type === 'NOT_COORDINATOR_FOR_GROUP'

const isKafkaJSError = e => e instanceof KafkaJSError

Expand Down