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

build(eslint): Ignore Symlinks and Reduce Violation Limit #36010

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

kdmccormick
Copy link
Member

@kdmccormick kdmccormick commented Dec 11, 2024

Description

Background: We have a large number of standing eslint violations in our
legacy frontends. Rather than fixing or amnesty-ing all of them, we've
opted to use a simple integer limit of violations. Exceeding this
limit causes the quality check to fail.
Before we moved eslint off of Paver [1], the limit was unreasonably
high (probably due to deprecations that removed violation-rich frontend
code). This was good, except for the fact that we essentially weren't
catching when new violations creeped into the JS code.

So, in [1], we lowered the limit down to the lowest possible value,
which we thought was 1285. However, we've found that this made the check
flaky-- turned out, we have been unintentionally double-counting various
violations due to the symlinks in edx-platform. Some of those symlinks'
existence is dependent on whether and how npm ci and npm run build
have been run. As a result, 1285 would pass in some contexts, and fail
in other contexts.

The fix is to simply add all the relevant edx-platform symlinks to
.eslintignore. This allows us to lower the violations limit to 734.

[1] #35159

Testing

Looking at the Quality Others CI logs, we see that eslint passes with a number of violations equal to the new limit (734):
image

Merge deadline

Asap, to unblock master build

@kdmccormick kdmccormick force-pushed the kdmccormick/eslint-fix branch from 81601c5 to 75d0293 Compare December 11, 2024 16:38
@kdmccormick kdmccormick changed the title build: don't eslint through symlinks build(eslint): Ignore Symlinks and Reduce Violation Limit Dec 11, 2024
@kdmccormick
Copy link
Member Author

FYI @salman2013 -- another existing issue with the CI 😛

@kdmccormick kdmccormick marked this pull request as ready for review December 11, 2024 16:40
Background: We have a large number of standing eslint violations in our
legacy frontends. Rather than fixing or amnesty-ing all of them, we've
opted to use a simple integer limit of violations. Exceeding this
limit causes the quality check to fail.

Before we moved eslint off of Paver [1], the limit was unreasonably
high (probably due to deprecations that removed violation-rich frontend
code). This was good, except for the fact that we essentially weren't
catching when new violations creeped into the JS code.

So, in [1], we lowered the limit down to the lowest possible value,
which we thought was 1285. However, we've found that this made the check
flaky-- turned out, we have been unintentionally double-counting various
violations due to the symlinks in edx-platform. Some of those symlinks'
existence is dependent on whether and how `npm ci` and `npm run build`
have been run. As a result, 1285 would pass in some contexts, and fail
in other contexts.

The fix is to simply add all the relevant edx-platform symlinks to
.eslintignore. This allows us to lower the violations limit to 734.

[1] openedx#35159
@kdmccormick kdmccormick force-pushed the kdmccormick/eslint-fix branch from 75d0293 to 61a8fa6 Compare December 11, 2024 16:45
@robrap robrap enabled auto-merge (squash) December 11, 2024 16:59
@robrap robrap merged commit 3e9158e into openedx:master Dec 11, 2024
48 checks passed
@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.

@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.

jawad-khan pushed a commit that referenced this pull request Dec 17, 2024
Background: We have a large number of standing eslint violations in our
legacy frontends. Rather than fixing or amnesty-ing all of them, we've
opted to use a simple integer limit of violations. Exceeding this
limit causes the quality check to fail.

Before we moved eslint off of Paver [1], the limit was unreasonably
high (probably due to deprecations that removed violation-rich frontend
code). This was good, except for the fact that we essentially weren't
catching when new violations creeped into the JS code.

So, in [1], we lowered the limit down to the lowest possible value,
which we thought was 1285. However, we've found that this made the check
flaky-- turned out, we have been unintentionally double-counting various
violations due to the symlinks in edx-platform. Some of those symlinks'
existence is dependent on whether and how `npm ci` and `npm run build`
have been run. As a result, 1285 would pass in some contexts, and fail
in other contexts.

The fix is to simply add all the relevant edx-platform symlinks to
.eslintignore. This allows us to lower the violations limit to 734.

[1] #35159
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