question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistent performance between GitHub CI and local

See original GitHub issue

Hi there! We’re using black for snakemake (I love it so far!) but I’m running into an issue where, despite having the same version of black installed via conda in GitHub CI versus locally, the local version reports that all is well, the GitHub CI version reports that one file needs to be reformatted. Locally:

$ black --check snakemake tests/*.py
All done! ✨ 🍰 ✨
51 files would be left unchanged.
$ black --version
black, version 19.3b0

and in GitHub CI

Check formatting6s
##[error]Process completed with exit code 1.
Run export PATH="/usr/share/miniconda/bin:$PATH"
  export PATH="/usr/share/miniconda/bin:$PATH"
  source activate black
  black --check snakemake tests/*.py
  shell: /bin/bash -e {0}
would reformat /home/runner/work/snakemake/snakemake/snakemake/dag.py
All done! 💥 💔 💥
1 file would be reformatted, 50 files would be left unchanged.
##[error]Process completed with exit code 1.

The version of black there is also the same

 black              pkgs/main/noarch::black-19.3b0-py_0

Further, locally it tells me I need to reformat other files (which the remote doesn’t suggest)

would reformat /home/vanessa/Documents/Dropbox/Code/Python/snakemake/snakemake/remote/FTP.py
would reformat /home/vanessa/Documents/Dropbox/Code/Python/snakemake/snakemake/remote/HTTP.py
Oh no! 💥 💔 💥
2 files would be reformatted, 49 files would be left unchanged.

Do you have suggestions for what we might further try, or ideas for why it’s inconsistent? The testing step is here (not sure if you can see it) and the PR in question is here. Thanks!

Expected behavior A clear and concise description of what you expected to happen.

The local and remote black formatting commands would produce the same result.

Environment (please complete the following information):

  • Version: black, version 19.3b0
  • OS and Python version: Linux/Python 3.7.3 locally, Linux/Python 3.7.5 remote.

Does this bug also happen on master? To answer this, you have two options:

Yes I tried this, same result locally. Thanks for your help!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:13
  • Comments:29

github_iconTop GitHub Comments

3reactions
ichard26commented, Nov 14, 2022

I said I’d change this, but I never even opened an issue. I’ll fix that.

2reactions
JunranYcommented, Feb 1, 2022

I ran into the same issue because I thought I was using the same version. It turns out that stating the version in tag is not enough. Without specifying it using version, it defaults to the latest release. check out their doc for ci.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Github actions result is inconsistent with local · Issue #2852
Describe the bug We're seeing inconsistencies between local version calculation and in github actions. Here's some info: gitversion config ...
Read more >
[CI] Unit tests are failing in GitHub Action for all PRs and Pushes
Just re-ran the PR for 1229, seems to be just the inconsistency issue since a new set of tests failed with the echo...
Read more >
Inconsistency when running Container Locally and in Github ...
When I run sfdx plugins --core locally this is the output I see ... #1 [internal] load build definition from Dockerfile #1 ...
Read more >
TraceIdentifier performance is inconsistent #41651 - GitHub
I have searched the existing issues Describe the bug My situation: TraceIdentifier performance is inconsistent Local environment ...
Read more >
Too much variance in results of chrome's lighthouse ... - GitHub
In general, it will be incredibly difficult to match low quality, variable hardware in cloud CI environments to numbers from your local ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found