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

"Comments cannot be longer than 65535 characters" when trying to update aom #374

Closed
sentry-io bot opened this issue Sep 3, 2024 · 3 comments · Fixed by #379
Closed

"Comments cannot be longer than 65535 characters" when trying to update aom #374

sentry-io bot opened this issue Sep 3, 2024 · 3 comments · Fixed by #379
Labels
Bug Something isn't working

Comments

@sentry-io
Copy link

sentry-io bot commented Sep 3, 2024

Sentry Issue: UPDATEBOT-PROD-1E

Exception: Handled a Job with unexpected CREATED status in _process_existing_job
  File "automation.py", line 233, in run
    taskRunner.process_task(lib, task)
  File "/builds/worker/updatebot/tasktypes/vendoring.py", line 46, in process_task
    self._process_existing_job(library, task, j)
  File "components/logging.py", line 38, in func_wrapper
    ret = func(*args, **kwargs)
  File "/builds/worker/updatebot/tasktypes/vendoring.py", line 257, in _process_existing_job
    raise Exception("Handled a Job with unexpected CREATED status in _process_existing_job")
@sentry-io sentry-io bot added the Bug Something isn't working label Sep 3, 2024
@mozfreddyb
Copy link
Collaborator

This is caused by #375. We should fix it elsewhere, i.e., by setting the status to something else than CREATED

@maltejur
Copy link
Collaborator

maltejur commented Sep 5, 2024

This does not seem to be related to #375. That one affected xsimd and libvpx, and was likely just caused by a phabricator outage.

Instead, this "unexpected CREATED status" is related to aom and seems to have been caused by this error: https://firefox-ci-tc.services.mozilla.com/tasks/ep6ylDJpSQi31KyRNASO9Q/runs/0/logs/public/logs/live.log#L34103-34125:

[task 2024-09-02T18:27:05.706Z] [Error]  (None aom job_id=552) Caught an exception while processing library aom task type vendoring
[task 2024-09-02T18:27:05.707Z] Traceback (most recent call last):
[task 2024-09-02T18:27:05.707Z]   File "/builds/worker/updatebot/./automation.py", line 233, in run
[task 2024-09-02T18:27:05.707Z]     taskRunner.process_task(lib, task)
[task 2024-09-02T18:27:05.707Z]   File "/builds/worker/updatebot/tasktypes/vendoring.py", line 77, in process_task
[task 2024-09-02T18:27:05.707Z]     self._process_new_job(library, task, new_version, timestamp, most_recent_job)
[task 2024-09-02T18:27:05.707Z]   File "/builds/worker/updatebot/components/logging.py", line 38, in func_wrapper
[task 2024-09-02T18:27:05.707Z]     ret = func(*args, **kwargs)
[task 2024-09-02T18:27:05.707Z]           ^^^^^^^^^^^^^^^^^^^^^
[task 2024-09-02T18:27:05.707Z]   File "/builds/worker/updatebot/tasktypes/vendoring.py", line 135, in _process_new_job
[task 2024-09-02T18:27:05.707Z]     created_job.bugzilla_id = self.bugzillaProvider.file_bug(library, CommentTemplates.UPDATE_SUMMARY(library, new_version, timestamp), CommentTemplates.UPDATE_DETAILS(len(all_upstream_commits), len(unseen_upstream_commits), commit_stats, commit_details), task.cc, blocks=task.blocking)
[task 2024-09-02T18:27:05.707Z]                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2024-09-02T18:27:05.707Z]   File "/builds/worker/updatebot/components/logging.py", line 38, in func_wrapper
[task 2024-09-02T18:27:05.707Z]     ret = func(*args, **kwargs)
[task 2024-09-02T18:27:05.707Z]           ^^^^^^^^^^^^^^^^^^^^^
[task 2024-09-02T18:27:05.707Z]   File "/builds/worker/updatebot/components/bugzilla.py", line 206, in file_bug
[task 2024-09-02T18:27:05.707Z]     raise e
[task 2024-09-02T18:27:05.707Z]   File "/builds/worker/updatebot/components/bugzilla.py", line 198, in file_bug
[task 2024-09-02T18:27:05.707Z]     bugID = fileBug(self.config['url'], self.config['apikey'], self.config['General']['ff-version'],
[task 2024-09-02T18:27:05.707Z]             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2024-09-02T18:27:05.707Z]   File "/builds/worker/updatebot/apis/bugzilla_api.py", line 83, in fileBug
[task 2024-09-02T18:27:05.707Z]     raise Exception(j)
[task 2024-09-02T18:27:05.707Z] Exception: {'documentation': 'https://bmo.readthedocs.io/en/latest/api/', 'message': 'Comments cannot be longer than 65535 characters.', 'error': True, 'code': 114}

I feel like we already have an issue open for this "Comments cannot be longer than 65535 characters", but I couldn't find one. It also is very strange to me that sentry didn't create an entry for this error.

@maltejur maltejur changed the title Exception: Handled a Job with unexpected CREATED status in _process_existing_job "Comments cannot be longer than 65535 characters" Sep 5, 2024
@maltejur maltejur changed the title "Comments cannot be longer than 65535 characters" "Comments cannot be longer than 65535 characters" when trying to update aom Sep 5, 2024
@tomrittervg
Copy link
Collaborator

We catch that for comments; but not for the initial bug filing.

if len(comment) > 65535:
self.logger.log("Comment on Bug %s is too long: %s characters; truncating." % (bug_id, len(comment)), level=LogLevel.Warning)
suffix = "\n\nOops - the above comment was too long. I was unable to shrink it nicely, so I had to truncate it to fit Bugzilla's limits."
comment = comment[0:65534 - len(suffix)] + suffix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants