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

fix: downgrade karma-spec-reporter to fix JS test logging #35954

Merged

Conversation

kdmccormick
Copy link
Member

@kdmccormick kdmccormick commented Dec 3, 2024

Description

The karma-spec-reporter npm package is a Karma plugin which tells Karma to print the name of each spec (e.g. test case). This is extremely useful as a maintainer to be able to visually inspect the CI logs and confirm that we are actually running JS tests and not just giving false-positives.

We are stuck on an ancient Karma version (0.13.22, lastest is 6.x), which seems to be incompatible with the latest karma-spec-reporter version (0.0.36). Since upgrading karma-spec-reporter, spec name printing has failed with:

02 12 2024 20:59:28.164:WARN [plugin]: Error during loading "karma-spec-reporter" plugin:
  Cannot read properties of undefined (reading 'LOG_PRIORITIES')

Downgrading to [email protected] eliminates this error and restoring spec name printing to our JS CI logs.

Context

This is one of the several existing CI issues we have encountered while removing paver from edx-platform CI.

Testing

Just compare the logs of "Javascript tests / JS / Run JS Tests" CI step with those on master.

this pr

image

master

image

Merge Considerations

Open Q for reviewers: How do we prevent renovate from repeating the same upgrade in the future?

@kdmccormick kdmccormick changed the title fix: downgrade karma-spec-runner to fix JS test logging fix: downgrade karma-spec-reporter to fix JS test logging Dec 3, 2024
Copy link
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

To prevent this from happening in the future, we should add it to ignoreDeps here: https://github.com/openedx/edx-platform/blob/master/.github/renovate.json5#L35 along with a link to fix the issue by upgrading the underlying Karma version.

@kdmccormick kdmccormick force-pushed the kdmccormick/karma-spec-runner branch from f4413cb to bf4740d Compare December 3, 2024 18:03
@kdmccormick
Copy link
Member Author

@feanil Thanks, I added to ignoreDeps but declined to link an issue, as I'm not sure that upgrading Karma is worth our time. This pin would just exist until we finish removing legacy frontends. Do you have any objection to that?

@feanil
Copy link
Contributor

feanil commented Dec 3, 2024

Sounds good.

The karma-spec-reporter npm package is a Karma plugin which tells Karma to
print the name of each spec (e.g. test case). This is extremely useful
as a maintainer to be able to visually inspect the CI logs and confirm
that we are actually running JS tests and not just giving
false-positives.

We are stuck on an ancient Karma version (0.13.22, lastest is 6.x),
which seems to be incompatible with the latest karma-spec-reporter version
(0.0.36). Since upgrading karma-spec-reporter, spec name printing has
failed with:

    02 12 2024 20:59:28.164:WARN [plugin]: Error during loading "karma-spec-reporter" plugin:
      Cannot read properties of undefined (reading 'LOG_PRIORITIES')

Downgrading to [email protected] eliminates this error and
restoring spec name printing to our JS CI logs.
@kdmccormick kdmccormick force-pushed the kdmccormick/karma-spec-runner branch from bf4740d to 389c4a8 Compare December 3, 2024 18:38
@kdmccormick kdmccormick enabled auto-merge (squash) December 3, 2024 18:38
@kdmccormick kdmccormick merged commit 25536bb into openedx:master Dec 3, 2024
50 of 51 checks passed
@kdmccormick kdmccormick deleted the kdmccormick/karma-spec-runner branch December 3, 2024 19:05
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

irtazaakram pushed a commit that referenced this pull request Dec 5, 2024
The karma-spec-reporter npm package is a Karma plugin which tells Karma to
print the name of each spec (e.g. test case). This is extremely useful
as a maintainer to be able to visually inspect the CI logs and confirm
that we are actually running JS tests and not just giving
false-positives.

We are stuck on an ancient Karma version (0.13.22, lastest is 6.x),
which seems to be incompatible with the latest karma-spec-reporter version
(0.0.36). Since upgrading karma-spec-reporter, spec name printing has
failed with:

    02 12 2024 20:59:28.164:WARN [plugin]: Error during loading "karma-spec-reporter" plugin:
      Cannot read properties of undefined (reading 'LOG_PRIORITIES')

Downgrading to [email protected] eliminates this error and
restoring spec name printing to our JS CI logs.
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been rolled back from the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been rolled back from the edX production environment.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants