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

Flake8 Linting Issues Not Detected in check code format (Pull Request) Workflow #1122

Closed
rajithkrishnegowda opened this issue Nov 6, 2024 · 2 comments
Assignees

Comments

@rajithkrishnegowda
Copy link
Collaborator

Describe the bug
Discrepancy in Flake8 linting results between workflows triggered on pull requests(check code format) workflow and workflows triggered on daily basis (Ubuntu (latest) workflow).

Expected Behavior:

Flake8 linting issues should be detected and reported in the pull request workflow, avoiding linting mistakes while committing to the development branch.

Actual Behavior:

Flake8 linting issues are detected only after the PR is merged. When a PR is raised, no Flake8 issues are shown, even if the code contains linting issues.
This issue is causing daily workflow to fail i.e Ubuntu (latest) workflow.

To Reproduce
Steps to reproduce the behavior:

  1. Create a New Pull Request with code changes that intentionally introduce Flake8 linting issues (e.g., extra whitespace, undefined variables).
  2. Observe the Pull Request (check code format) Workflow Execution:
  3. The Check code format workflow runs but does not detect the introduced Flake8 linting issues.
  4. Merge the PR into the develop branch.
  5. Observe the daily(Ubuntu (latest)) Workflow Execution:
  6. Flake8 linting issues are deteceted.

Expected behavior
The Flake8 linting issues should be detected and reported in the pull request workflow to prevent the merge of code with formatting issues.

Environment:
OS: Ubuntu (latest)

Screenshots
check code format Workflow
Screenshot 2024-11-06 at 11 09 49 AM

Ubuntu (latest) workflow
Screenshot 2024-11-06 at 11 10 23 AM

@MasterSkepticista
Copy link
Collaborator

MasterSkepticista commented Nov 7, 2024

@rajithkrishnegowda We run formatter and linter checks in CI using ./shell/lint.sh, which internally uses flake8 configuration from setup.cfg. The discrepancy appears here because it does not know what warnings to ignore from the lack of a config file. Regardless, I recommend flake8-related checks be removed from all other CI tests, since we do it once during PR anyway.

@rajithkrishnegowda
Copy link
Collaborator Author

Issue was fixed in #1130

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

No branches or pull requests

4 participants