Local and CI/CD isort with different behaviour
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7k
- Forks
- 687
- Avg merge
- 4h 56m
- Merged PRs (30d)
- 2
Description
Hello,
have these lines in my .pre-commit.yaml:
- repo: https://github.com/timothycrosley/isort
rev: 5.9.3 # should be the same as in dev.in
hooks:
- id: isort
and locally I have version 5.9.3 of isort. When I run pre-commit run --all-files locally, the isort is passed succesfully, but when the pre-commit is performed in git, there are some differences:
$ pre-commit run --all-files
Check hooks apply to the repository......................................Passed
Check for useless excludes...............................................Passed
Check Yaml...............................................................Passed
Check for merge conflicts................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
prettier.................................................................Passed
isort....................................................................Failed
- hook id: isort
- files were modified by this hook
Locally I am in a venv, while remotely this is performed inside a docker image:
Running with gitlab-runner 14.6.0 (5316d4ac)
on gitlab_runner_2 UfyZYyEg
Resolving secrets
00:00
Preparing the "docker" executor
00:03
Using Docker executor with image python:3.9 ...
Pulling docker image python:3.9 ...
Using docker image sha256:f88f0508dc467046a760e8ea0bb5c5861ff4e0ade96226ca4700abd1bd28b696 for python:3.9 with digest python@sha256:bf6f8b201ffac79a1b9fded783e7f0547ad2c2e3e48e96a7a23855c3de14df4b ...
Any idea why this inconsistency?
Thank you.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the .pre-commit.yaml and dev.in references with the local virtualenv and the GitLab Docker job using python:3.9. Run pre-commit run --all-files in both environments and inspect why isort 5.9.3 produces different changes. Done means the cause is identified and the local and CI runs agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- ci-cd, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100