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

[Flake]: Error: Completed goals section is empty #20869

Open
AFZL210 opened this issue Aug 21, 2024 · 16 comments
Open

[Flake]: Error: Completed goals section is empty #20869

AFZL210 opened this issue Aug 21, 2024 · 16 comments
Assignees
Labels
bug Label to indicate an issue is a regression CI breakage This bug breaks CI workflows. Impact: High Blocks or significantly slows down a core workflow. target: Q4 2024 Plan to complete by 24 Dec 2024. Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet.

Comments

@AFZL210
Copy link
Member

AFZL210 commented Aug 21, 2024

CI Test Type

Acceptance

Stacktrace

LOG: User superAdm has the blog admin role!
LOG: User curriculumAdm has the curriculum admin role!
LOG: Creator dashboard page is opened successfully.
LOG: Tutorial pop-up closed successfully.
LOG: Card content is updated successfully.
LOG: End Exploration interaction has been added successfully.
LOG: A simple exploration is created.
LOG: Exploration is saved successfully.
/tmp/tmp73g3Co/lib/python3.8/site-packages/elasticsearch/connection/base.py:200: ElasticsearchWarning: Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-minimal-setup.html to enable security.
  warnings.warn(message, category=ElasticsearchWarning)
ERROR:root:This app cannot send emails to users.
LOG: Creator dashboard page is opened successfully.
LOG: welcome modal not found: waiting for selector `button.e2e-test-dismiss-welcome-modal` failed: timeout 5000ms exceeded
LOG: Card content is updated successfully.
LOG: End Exploration interaction has been added successfully.
LOG: A simple exploration is created.
LOG: Exploration is saved successfully.
/tmp/tmp73g3Co/lib/python3.8/site-packages/elasticsearch/connection/base.py:200: ElasticsearchWarning: Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-minimal-setup.html to enable security.
  warnings.warn(message, category=ElasticsearchWarning)
ERROR:root:This app cannot send emails to users.
LOG: Subtopic Negative Numbers is created.
LOG: Created Math classroom.
LOG: Updated Math classroom.
LOG: Added Algebra I topic to the Math classroom.
LOG: Published Math classroom.
LOG: Story Test Story 1 is created.
LOG: Chapter Test Chapter 1 is created.
LOG: Chapter Test Chapter 2 is created.

Spec started : Logged-in User should be able to replay a completed or incomplete exploration or collection, learn something new, manage goals, and see completed lesson in the respective sections.
LOG: Exploration has completed successfully
LOG: Page rendered fully.
LOG: Goal "Algebra I" added.
LOG: Page rendered fully.
LOG: Exploration has completed successfully
LOG: Page rendered fully.
LOG: Page rendered fully.
-> Failed [ Took 79.127 seconds ]


Failures:
1. Logged-in User should be able to replay a completed or incomplete exploration or collection, learn something new, manage goals, and see completed lesson in the respective sections.
Message:
Error: Completed goals section is empty
Stack:
Error: Completed goals section is empty
    at /home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/utilities/user/logged-in-user.ts:1178:15
    at BaseUser.expectCompletedGoalsToInclude (/home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/utilities/user/logged-in-user.ts:1175:5)
    at UserContext.<anonymous> (/home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/specs/logged-in-user/manage-goals-progress-and-lessons-from-learner-dashboard.spec.ts:119:7)

1 specs, 1 failures

Additional Information

Test Name: manage-goals-progress-and-lessons-from-learner-dashboard

Occurrences

I have noticed this 2 times.

https://github.com/oppia/oppia/actions/runs/10486538403/job/29046463928?pr=20853

Debugging document link

No response

@AFZL210 AFZL210 added triage needed bug Label to indicate an issue is a regression CI breakage This bug breaks CI workflows. labels Aug 21, 2024
@Akhilesh-max
Copy link
Contributor

Taking a look, will make a fix ASAP.

@AFZL210
Copy link
Member Author

AFZL210 commented Aug 22, 2024

This is kind of frequent now, happend again: https://github.com/oppia/oppia/actions/runs/10501838035/job/29093678924?pr=20857

@seanlip seanlip added Impact: High Blocks or significantly slows down a core workflow. Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet. labels Aug 27, 2024
@Vir-8
Copy link
Contributor

Vir-8 commented Aug 31, 2024

Another occurrence blocking the merge queue -
https://github.com/oppia/oppia/actions/runs/10643336159/job/29507253666

@Vir-8
Copy link
Contributor

Vir-8 commented Sep 3, 2024

@kevintab95
Copy link
Member

@AFZL210
Copy link
Member Author

AFZL210 commented Sep 4, 2024

@Akhilesh-max can you please give a date for creating a PR for this issue? If you are having some problem solving this can you please create a debugging doc for it? Thanks!

@Vir-8
Copy link
Contributor

Vir-8 commented Sep 23, 2024

@HardikGoyal2003
Copy link
Member

@seanlip
Copy link
Member

seanlip commented Oct 9, 2024

@mon4our
Copy link
Collaborator

mon4our commented Oct 14, 2024

@mon4our
Copy link
Collaborator

mon4our commented Oct 15, 2024

@seanlip
Copy link
Member

seanlip commented Oct 16, 2024

Happened again in merge queue: #21147 (comment)

@HardikGoyal2003
Copy link
Member

@seanlip
Copy link
Member

seanlip commented Oct 18, 2024

Some brief analysis:

  • The test in question is this one, and the failure happens on this line. The failure occurs because the acceptance test completes a lesson and expects to see it reflected in "completed goals" on the learner dashboard, but, for some reason, the Completed Goals section of goals-tab.component.html is not showing up.

  • We need to figure out whether the issue is that the completion doesn't get recorded, or whether it's because the goals section isn't displaying when it should be.

  • For a successful run, here is what it looks like before the goal is completed:

    Screenshot from 2024-10-18 15-06-41

    and here is what it looks like after the goal is completed:

    Screenshot from 2024-10-18 15-07-35

In terms of next steps, I would suggest any of the following:

  • Add some logging to expectCompletedGoalsToInclude in core/tests/puppeteer-acceptance-tests/. This should log the state of the "edit goals" section above the completed goals to determine what the status of each goal is (notice that the right column is a checkbox for an unfinished goal, and a book for a finished one). Since that section provides an additional check on what the database state is, we can use this info to determine whether the whole page is incorrect (which points to the issue being that the completion isn't being recorded) or whether only the "Completed Goals" section (and/or its associated test utility) is misbehaving.
  • Another approach that achieves the same outcome is to use @imchristie's screenshot functionality to take a screenshot of the page at the "expect goals" point.

If the issue is that the completion isn't being recorded, we can dig into that further and try to understand how the backend registers that a goal is completed -- maybe we are navigating away from a page too soon before the completion event is registered. If the issue is with the "Completed Goals" section, then that localizes the issue to just that section and the e2e test utility for it.

@seanlip
Copy link
Member

seanlip commented Oct 18, 2024

Failed here in the merge queue. But what's interesting about this is that it passed for desktop and failed for the mobile run that happened later (with the same error).

@HardikGoyal2003
Copy link
Member

@seanlip seanlip added the target: Q4 2024 Plan to complete by 24 Dec 2024. label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Label to indicate an issue is a regression CI breakage This bug breaks CI workflows. Impact: High Blocks or significantly slows down a core workflow. target: Q4 2024 Plan to complete by 24 Dec 2024. Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet.
Projects
Status: Todo
Development

No branches or pull requests

7 participants