Skip to content

fix(retail): add region tag for Python - Update import user events from big query #13493

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

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# [START retail_import_user_events_from_big_query]

import argparse

Expand Down Expand Up @@ -97,6 +99,8 @@ def import_user_events_from_big_query():

import_user_events_from_big_query()

# [END retail_import_user_events_from_big_query]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

While this change only adds a region tag, the code being tagged appears to have a critical issue. Based on the surrounding context provided in the diff, the function import_user_events_from_big_query seems to call itself unconditionally. This will result in infinite recursion and a RecursionError when the code is executed.

The diff context suggests this problem:

@@ -97,6 +99,7 @@ def import_user_events_from_big_query():
 
     import_user_events_from_big_query()

The call to import_user_events_from_big_query() on line 100 is inside the function with the same name, creating a recursive loop without a base case.

Please ensure the code within the region tags is correct and does not contain this bug before the tags are added.



if __name__ == "__main__":
parser = argparse.ArgumentParser()
Expand Down