feedback-to-code/mozzarella huggingface dataset:
Repository: bazelbuild/bazel
Issue: Improve error message for incompatible_string_join_requires_strings
Labels: P1
bad error messaging

When the flag `--incompatible_string_join_requires_strings` is enabled, Baze checks that each element is a string (see https://github.com/bazelbuild/bazel/issues/7802).

However, the error message is just a type error. This can be confusing for users who are upgrading Bazel. The error message should at least include the name of the flag.

Since we're flipping the flag in Bazel 0.27, it would be great to improve the error message before that. @jin, @c-parsons, do you have time to do it this week? (tomorrow is public holiday in Germany)

Thanks!

Issue comments:
I can take a stab at this.

Pull request review comments:

Patch that resolved the issue:
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java b/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
index 1d4cf1bca70c4f..4e2e46ba5a12be 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
@@ -115,7 +115,11 @@ public String join(String self, SkylarkList<?> elements, Location loc, Environme
         if (!(item instanceof String)) {
           throw new EvalException(
               loc,
-              "sequence element must be a string (got '" + EvalUtils.getDataTypeName(item) + "')");
+              "sequence element must be a string (got '"
+                  + EvalUtils.getDataTypeName(item)
+                  + "'). See https://github.com/bazelbuild/bazel/issues/7802 for information about "
+                  + "--incompatible_string_join_requires_strings."
+          );
         }
       }
     }


Test patch:
Repository: bazelbuild/bazel
Issue: "Updating Bazel" link on https://docs.bazel.build/versions/0.28.0/bazel-overview.html 404s
Labels: type: bug
P0
team-OSS

The leftnav bar is not versioned with the rest of the documentation, and if the link target in the navbar does not exist in a particular version,  the link 404s.

It has happened  with recently added https://docs.bazel.build/versions/master/updating-bazel.html (added in https://github.com/bazelbuild/bazel/commit/4285b4bf14eecbd0f5b7a0b09cad617109c6abab)

Issue comments:
Website deployed, all works now.

Pull request review comments:
could you explain why this is needed?
accident, removed

Patch that resolved the issue:
diff --git a/site/_layouts/documentation.html b/site/_layouts/documentation.html
index d963a8d81628ed..da01c8fc0103ba 100644
--- a/site/_layouts/documentation.html
+++ b/site/_layouts/documentation.html
@@ -6,6 +6,14 @@
 <!-- /versions/0.12.3/baz.md -> ["0.12.3", "baz.md"] -->
 {% assign versioned_url_parts = page.url | split: '/' | shift | shift %}
 {% assign current_version = versioned_url_parts.first %}
+{% assign version_components = current_version | split: '.' %}
+{% if version_components.size < 2 %}
+{%   assign major_version = "master" %}
+{%   assign minor_version = "master" %}
+{% else % }
+{%   assign minor_version = version_components[0] %}
+{%   assign minor_version = version_components[1] %}
+{% endif %}
 
 <!DOCTYPE html>
 <html lang="en" itemscope itemtype="https://schema.org/WebPage">
@@ -68,9 +76,11 @@ <h3>Installing and Using Bazel</h3>
                 </ul>
               </li>
 
+              {% if major_version == "master" or major_version > 0 or minor_version > 28 %}
               <li class="sidebar-nav">
                 <a href="/versions/{{ current_version }}/updating-bazel.html">Updating Bazel</a>
               </li>
+              {% endif %}
 
               <li>
                 <a class="sidebar-nav-heading" data-toggle="collapse"


Test patch:
Repository: bazelbuild/bazel
Issue: Windows: winsdk_configure errors on other platforms
Labels: type: bug
P2
area-Windows
team-OSS

### Description of the problem / feature request:

Bazel workspace's `winsdk_configure()` repository rule runs (and throws java.io.IOExceptions) on every platform, not just Windows.

### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

1. get https://github.com/bazelbuild/bazel/commit/47d0173cc92f5544c0cca718a1f393a01fc863e9
2. `bazel build src:bazel`
3. `export CC_CONFIGURE_DEBUG=1`
4. `bazel-bin/src/bazel build --nobuild //src:bazel`

### What operating system are you running Bazel on?

Linux

### If `bazel info release` returns "development version" or "(@non-git)", tell us how you built Bazel.

built at https://github.com/bazelbuild/bazel/commit/47d0173cc92f5544c0cca718a1f393a01fc863e9


Issue comments:
Example:
```
DEBUG: /tmp/winsdk/51c9aa8f783c7ef42fa88749bcc55eec/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:118:5: 
Auto-Configuration Warning: registry query result for VC 8.0:                                                  

STDOUT(start)

STDOUT(end)
STDERR(start):
java.io.IOException: Cannot run program "C:\Windows\system32\reg.exe" (in directory "/tmp/winsdk/51c9aa8f783c7ef42fa88749bcc55eec/external/local_config_winsdk"): error=2, No such file or directory                           
STDERR(end)
```

The errors are not fatal though.
Blocking https://github.com/bazelbuild/bazel/issues/8572
Not a release blocker: the affected file is not embedded into Bazel.

Pull request review comments:

Patch that resolved the issue:
diff --git a/src/main/res/winsdk_configure.bzl b/src/main/res/winsdk_configure.bzl
index 2eb7d0e2ef838e..3b77acbc8a537b 100644
--- a/src/main/res/winsdk_configure.bzl
+++ b/src/main/res/winsdk_configure.bzl
@@ -14,6 +14,16 @@
 
 """Configure local Resource Compilers for every available target platform.
 
+Platform support:
+
+- Linux/macOS/non-Windows: this repository rule is almost a no-op.
+  It generates an empty BUILD file, and does not actually discover any
+  toolchains. The register_local_rc_exe_toolchains() method is a no-op.
+
+- Windows: this repository rule discovers the Windows SDK path, the installed
+  rc.exe compilers. The register_local_rc_exe_toolchains() registers a toolchain
+  for each rc.exe compiler.
+
 Usage:
 
     load("//src/main/res:winsdk_configure.bzl", "winsdk_configure")
@@ -46,6 +56,9 @@ def _find_rc_exes(root):
     return result
 
 def _find_all_rc_exe(repository_ctx):
+    if not repository_ctx.os.name.startswith("windows"):
+        return {}
+
     vc = find_vc_path(repository_ctx)
     if vc:
         env = setup_vc_env_vars(


Test patch:
Repository: bazelbuild/bazel
Issue: build_setting rules should not use toolchain resolution
Labels: type: feature request
P2
team-Configurability

Following from #9097.  Rules created using the build_setting features (https://docs.bazel.build/versions/master/skylark/config.html#instantiating-build-settings) should disable toolchain resolution (and probably also be non-configurable).

Issue comments:
Thanks for fixing this!

cc @lberki 

Pull request review comments:

Patch that resolved the issue:
diff --git a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
index f4119496292500..0a08231e4c6bc0 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
@@ -853,6 +853,10 @@ public RuleClass build(String name, String key) {
           attrBuilder.allowedRuleClasses(ANY_RULE);
         }
         this.add(attrBuilder);
+
+        // Build setting rules should opt out of toolchain resolution, since they form part of the
+        // configuration.
+        this.useToolchainResolution(false);
       }
 
       return new RuleClass(


Test patch:
Repository: bazelbuild/bazel
Issue: bazel.sh attempts to exec directory {WORKSPACE_DIR}/tools/bazel
Labels: type: bug
P1
team-OSS

### Description of the problem / feature request:

Using Bazel installed via apt, since 2.0.0 it attempts to exec `{WORKSPACE}/tools/bazel` if it exists, even as directory. This path is commonly used as a directory for storing Bazel related tools and the path is not obviously documented as being special.

The error seen is:

```
/usr/bin/bazel: line 196: <path to workspace snipped>/tools/bazel: Is a directory
/usr/bin/bazel: line 196: exec: <path to workspace snipped>/tools/bazel: cannot execute: Is a directory
```

The commit that introduced this was https://github.com/bazelbuild/bazel/commit/d3f8efca72a0e2013467c033df1bf58dd76e8a10 by @philwo 

In particular, these lines in bazel.sh:

https://github.com/bazelbuild/bazel/blob/d5ae460f1581ddf27514b4be18255481b47b4075/scripts/packages/bazel.sh#L193-L197

Prior to this commit, the wrapper was also checked if it was not a directory:

https://github.com/bazelbuild/bazel/blob/40f464c32f4b14d92689dfc1db4c00ecd5d58645/scripts/packages/bazel.sh#L79-L81

Proposed solution is to re-add the directory exclusion check, which I will do shortly in a PR.

### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Create an standard workspace with a folder at `tools/bazel`. Using Bazel intalled via apt, run any bazel command (just `bazel` will do)

### What operating system are you running Bazel on?

Ubuntu 18.04

### What's the output of `bazel info release`?

release 2.0.0

###  Have you found anything relevant by searching the web?

Previous similar issue: https://github.com/bazelbuild/bazel/issues/3422


Issue comments:
Sorry for the unintended breakage and thank you for catching and fixing it!

Pull request review comments:
Code review brought up the question of why not just use `-f` here instead of `! -d`:

```
if [[ -x "$wrapper" && -f "$wrapper" ]]; then
```

It looks fine to me, because symlinks are handled correctly that way, too ("If file is a symbolic link, test will fully dereference it and then evaluate the expression against the file referenced"), but wanted to check with you.
Honestly I just went with what it was before, so I didn’t really think about alternatives. If there’s a preferred change, I’m fine with that 👍
I’m also not able to make the changes to the pr currently, so feel free to edit it yourself if you want

Patch that resolved the issue:
diff --git a/scripts/packages/bazel.sh b/scripts/packages/bazel.sh
index 7ffb79b7aac8b6..055641dd1cbf96 100755
--- a/scripts/packages/bazel.sh
+++ b/scripts/packages/bazel.sh
@@ -191,7 +191,7 @@ if [[ ! -x $BAZEL_REAL ]]; then
 fi
 
 readonly wrapper="${workspace_dir}/tools/bazel"
-if [[ -x "$wrapper" ]]; then
+if [[ -x "$wrapper" && ! -d "$wrapper" ]]; then
   export BAZEL_REAL
   exec -a "$0" "${wrapper}" "$@"
 fi


Test patch:
Repository: bazelbuild/bazel
Issue: java_stub_template improperly qualifies paths
Labels: type: bug
P2
team-Rules-Java

In [java_stub_template.txt](https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt;drc=02f8da948bf3955304a4cef9399bd3907430bbc4;l=298), when building the classpath for the manifest file, every path entry is first qualified with the working directory, even when the path is already an absolute path.

The code should check for relative paths before qualifying them.

Issue comments:

Pull request review comments:
very attentive :)
isn't this supposed to be `file://` (note the double slash?)
(I keep forgetting that this syntax exists)
No, the syntax is, apparently, file:(path), where path can be relative to the current directory or absolute. This matches the previous implementation.
Me too.

Patch that resolved the issue:
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt
index 1aac7f8c90c131..41b3362ba863f6 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt
@@ -288,28 +288,41 @@ ARGS=(
 
 
 function create_and_run_classpath_jar() {
-  # Build class path as one single string separated by spaces
-  MANIFEST_CLASSPATH=""
+  # Build class path.
+  MANIFEST_CLASSPATH=()
   if is_windows; then
     CLASSPATH_SEPARATOR=";"
-    URI_PREFIX="file:/"  # e.g. "file:/C:/temp/foo.jar"
   else
     CLASSPATH_SEPARATOR=":"
-    URI_PREFIX="file:$(pwd)/"  # e.g. "file:/usr/local/foo.jar"
   fi
 
-  URI_PREFIX=${URI_PREFIX//\//\\/}
-  MANIFEST_CLASSPATH="${CLASSPATH_SEPARATOR}${CLASSPATH}"
+  OLDIFS="$IFS"
+  IFS="${CLASSPATH_SEPARATOR}" # Use a custom separator for the loop.
+  for path in ${CLASSPATH}; do
+    # Convert spaces to %20
 
-  MANIFEST_CLASSPATH=$(sed "s/ /%20/g" <<< "${MANIFEST_CLASSPATH}")
-  MANIFEST_CLASSPATH=$(sed "s/$CLASSPATH_SEPARATOR/ $URI_PREFIX/g" <<< "${MANIFEST_CLASSPATH}")
+    if is_windows; then
+      path="file:/${path}" # e.g. "file:/C:/temp/foo.jar"
+    else
+      # If not absolute, qualify the path
+      case "${path}" in
+        /*) ;; # Already an absolute path
+        *) path="$(pwd)/${path}";; # Now qualified
+      esac
+      path="file:${path}" # e.g. "file:/usr/local/foo.jar"
+    fi
+
+    path=$(sed "s/ /%20/g" <<< "${path}")
+    MANIFEST_CLASSPATH+=("${path}")
+  done
+  IFS="$OLDIFS"
 
   # Create manifest file
   MANIFEST_FILE="$(mktemp -t XXXXXXXX.jar_manifest)"
   (
     echo "Manifest-Version: 1.0"
 
-    CLASSPATH_LINE="Class-Path:$MANIFEST_CLASSPATH"
+    CLASSPATH_LINE="Class-Path: ${MANIFEST_CLASSPATH[*]}"
     CLASSPATH_MANIFEST_LINES=$(sed -E $'s/(.{71})/\\1\\\n /g' <<< "${CLASSPATH_LINE}")
 
     echo "$CLASSPATH_MANIFEST_LINES"


Test patch:
Repository: provectus/kafka-ui
Issue: Add custom parameters to topic creation form
Labels: scope/frontend

### AC
The user is able to:
-  add multiple custom parameters to topic creation form
- select available custom topic parameter from list
- update value of added parameter
- remove added parameter
- review validation error & update custom params

<img width="546" alt="Screenshot 2020-02-27 22 37 49" src="https://user-images.githubusercontent.com/365855/75480177-d7090f00-59b1-11ea-8b36-f92bedb6a940.png">

blocked by: https://github.com/provectus/kafka-ui/issues/7

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParams.tsx b/kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParams.tsx
index 8fe22db0368..64bb6866052 100644
--- a/kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParams.tsx
+++ b/kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParams.tsx
@@ -26,7 +26,7 @@ const CustomParams: React.FC<Props> = ({
   const onAdd = (event: React.MouseEvent<HTMLButtonElement>) => {
     event.preventDefault();
 
-    const newIndex = `${INDEX_PREFIX}.${new Date().getTime()}`;
+    const newIndex = `${INDEX_PREFIX}.${new Date().getTime()}ts`;
 
     setFormCustomParams({
       ...formCustomParams,
diff --git a/kafka-ui-react-app/src/redux/api/topics.ts b/kafka-ui-react-app/src/redux/api/topics.ts
index 160c392c9b5..544d41136c0 100644
--- a/kafka-ui-react-app/src/redux/api/topics.ts
+++ b/kafka-ui-react-app/src/redux/api/topics.ts
@@ -1,3 +1,4 @@
+import { reduce } from 'lodash';
 import {
   TopicName,
   Topic,
@@ -5,6 +6,7 @@ import {
   TopicDetails,
   TopicConfig,
   TopicFormData,
+  TopicFormCustomParam,
 } from 'redux/interfaces';
 import {
   BASE_URL,
@@ -23,6 +25,10 @@ export const getTopics = (clusterName: ClusterName): Promise<Topic[]> =>
   fetch(`${BASE_URL}/clusters/${clusterName}/topics`, { ...BASE_PARAMS })
     .then(res => res.json());
 
+interface Result {
+  [index: string]: string,
+}
+
 export const postTopic = (clusterName: ClusterName, form: TopicFormData): Promise<Topic> => {
   const {
     name,
@@ -34,6 +40,12 @@ export const postTopic = (clusterName: ClusterName, form: TopicFormData): Promis
     maxMessageBytes,
     minInSyncReplicas,
   } = form;
+
+  const customParams = reduce(Object.values(form.customParams), (result: Result, customParam: TopicFormCustomParam) => {
+    result[customParam.name] = customParam.value;
+    return result;
+  }, {});
+
   const body = JSON.stringify({
     name,
     partitions,
@@ -44,8 +56,10 @@ export const postTopic = (clusterName: ClusterName, form: TopicFormData): Promis
       'retention.bytes': retentionBytes,
       'max.message.bytes': maxMessageBytes,
       'min.insync.replicas': minInSyncReplicas,
+      ...customParams,
     }
   });
+
   return fetch(`${BASE_URL}/clusters/${clusterName}/topics`, {
     ...BASE_PARAMS,
     method: 'POST',


Test patch:
Repository: provectus/kafka-ui
Issue: Consumer groups screen (ui/clusters/xxx/consumer-groups) stays empty

running as container on K8s version 0.0.8

JS stack trace:
```
react-dom.production.min.js:216 TypeError: Cannot read property 'consumerGroupId' of undefined
    at List.tsx:56
    at Array.map (<anonymous>)
    at ar (List.tsx:54)
    at oi (react-dom.production.min.js:157)
    at qu (react-dom.production.min.js:267)
    at Cc (react-dom.production.min.js:250)
    at xc (react-dom.production.min.js:250)
    at Sc (react-dom.production.min.js:250)
    at bc (react-dom.production.min.js:243)
    at react-dom.production.min.js:123
```

I checked the web-service response and it is fine:
```
[{clusterId: null, consumerGroupId: "audit-log-service", numConsumers: 1, numTopics: 1},…]
0: {clusterId: null, consumerGroupId: "audit-log-service", numConsumers: 1, numTopics: 1}
clusterId: null
consumerGroupId: "audit-log-service"
numConsumers: 1
numTopics: 1
1: {clusterId: null, consumerGroupId: "KMOffsetCache-cmak-588949fcf5-5hplf", numConsumers: 1,…}
clusterId: null
consumerGroupId: "KMOffsetCache-cmak-588949fcf5-5hplf"
numConsumers: 1
numTopics: 1
```

Issue comments:

Pull request review comments:
It's not a good idea to put it here. I think we can run it separate if needed 

Patch that resolved the issue:
diff --git a/kafka-ui-react-app/src/redux/reducers/consumerGroups/reducer.ts b/kafka-ui-react-app/src/redux/reducers/consumerGroups/reducer.ts
index 7973d600b72..6776dbcc586 100644
--- a/kafka-ui-react-app/src/redux/reducers/consumerGroups/reducer.ts
+++ b/kafka-ui-react-app/src/redux/reducers/consumerGroups/reducer.ts
@@ -19,7 +19,7 @@ const updateConsumerGroupsList = (
   return payload.reduce(
     (memo: ConsumerGroupsState, consumerGroup) => ({
       ...memo,
-      byId: {
+      byID: {
         ...memo.byID,
         [consumerGroup.consumerGroupId]: {
           ...memo.byID[consumerGroup.consumerGroupId],


Test patch:
Repository: provectus/kafka-ui
Issue: Update node version of react app to the latest LTS version (v14)
Labels: good first issue
scope/frontend

- Add engine filed to package.json https://docs.npmjs.com/cli/v6/configuring-npm/package-json#engines
- update .nvmrc
- update pom.xml 


Issue comments:

Pull request review comments:
Please remove these extra spaces.
I'm not sure we need to update pom files manually. @soffest could you please take a look?

Patch that resolved the issue:
diff --git a/kafka-ui-react-app/.nvmrc b/kafka-ui-react-app/.nvmrc
index 28193ca74f5..9a0c3d3f455 100644
--- a/kafka-ui-react-app/.nvmrc
+++ b/kafka-ui-react-app/.nvmrc
@@ -1,1 +1,1 @@
-v12.13.1
+v14.15.4
diff --git a/kafka-ui-react-app/package.json b/kafka-ui-react-app/package.json
index bd301d8f2d9..417cf021764 100644
--- a/kafka-ui-react-app/package.json
+++ b/kafka-ui-react-app/package.json
@@ -100,5 +100,8 @@
     "react-scripts": "4.0.1",
     "typescript": "~4.1.2"
   },
+  "engines": {
+    "node": ">=14.15.4"
+  },
   "proxy": "http://localhost:8080"
 }
diff --git a/pom.xml b/pom.xml
index 5ac9ab77b2c..2e145672735 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
 		<git.revision>latest</git.revision>
 		<zkclient.version>0.11</zkclient.version>
 		<kafka-clients.version>2.4.0</kafka-clients.version>
-		<node.version>v12.13.1</node.version>
+		<node.version>v14.15.4</node.version>
 		<dockerfile-maven-plugin.version>1.4.10</dockerfile-maven-plugin.version>
 		<frontend-maven-plugin.version>1.8.0</frontend-maven-plugin.version>
 		<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>


Test patch:
Repository: provectus/kafka-ui
Issue: _schemas topic show as external
Labels: type/enhancement
scope/backend

Conventionally all internal topics start with underscore "_", that is the only difference between external and internal topics. If this UI want to provide different functionality based on topic being internal or external, then it should follow this convention.

However now only `__consumer_offsets` shows up as internal topic.

If it were to follow this convention then `_schemas` should also be considered internal topic.

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/ClusterUtil.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/ClusterUtil.java
index 7abd4b64dde..889079eaefa 100644
--- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/ClusterUtil.java
+++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/ClusterUtil.java
@@ -139,7 +139,9 @@ public static InternalTopicConfig mapToInternalTopicConfig(ConfigEntry configEnt
 
   public static InternalTopic mapToInternalTopic(TopicDescription topicDescription) {
     var topic = InternalTopic.builder();
-    topic.internal(topicDescription.isInternal());
+    topic.internal(
+        topicDescription.isInternal() || topicDescription.name().startsWith("_")
+    );
     topic.name(topicDescription.name());
 
     List<InternalPartition> partitions = topicDescription.partitions().stream().map(


Test patch:
Repository: provectus/kafka-ui
Issue: Topic messages: Newest first
Labels: type/enhancement
scope/backend
scope/frontend

Change sorting of topic messages - sort by offset in descending order (latest messages first).

Issue comments:
Current state of this task:
Need to figure out a way to read a set of topic messages from newer ones to older ones on BE, and then update existing FE request to properly work with new API.
Waiting fronted...

Pull request review comments:

Patch that resolved the issue:
diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/emitter/BackwardRecordEmitter.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/emitter/BackwardRecordEmitter.java
index 088366c238e..8bf2bab547f 100644
--- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/emitter/BackwardRecordEmitter.java
+++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/emitter/BackwardRecordEmitter.java
@@ -64,6 +64,13 @@ public void accept(FluxSink<ConsumerRecord<Bytes, Bytes>> sink) {
 
               log.debug("{} records polled", records.count());
               log.debug("{} records sent", partitionRecords.size());
+
+              // This is workaround for case when partition begin offset is less than
+              // real minimal offset, usually appear in compcated topics
+              if (records.count() > 0  && partitionRecords.isEmpty()) {
+                waitingOffsets.markPolled(entry.getKey().partition());
+              }
+
               for (ConsumerRecord<Bytes, Bytes> msg : partitionRecords) {
                 if (!sink.isCancelled() && !waitingOffsets.beginReached()) {
                   sink.next(msg);
diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/OffsetsSeek.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/OffsetsSeek.java
index 17a496d53bb..6cc275c4c81 100644
--- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/OffsetsSeek.java
+++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/OffsetsSeek.java
@@ -110,6 +110,11 @@ public List<TopicPartition> topicPartitions() {
           .collect(Collectors.toList());
     }
 
+    public void markPolled(int partition) {
+      endOffsets.remove(partition);
+      beginOffsets.remove(partition);
+    }
+
     public void markPolled(ConsumerRecord<?, ?> rec) {
       Long endWaiting = endOffsets.get(rec.partition());
       if (endWaiting != null && endWaiting <= rec.offset()) {


Test patch: