Giter Club home page Giter Club logo

Comments (8)

harshad16 avatar harshad16 commented on August 17, 2024 10

Try updating the link in .pre-commit-config.yaml
instead of https://gitlab.com/PyCQA/flake8 use https://github.com/PyCQA/flake8

from aicoe-ci.

AlcibiadesCleinias avatar AlcibiadesCleinias commented on August 17, 2024 2

Try updating the link in .pre-commit-config.yaml instead of https://gitlab.com/PyCQA/flake8 use https://github.com/PyCQA/flake8

wow, thank you, that was the issue.
And my excuse, I really forgot to notice the content of .pre-commit-config.yaml in the question. So, thank you for your insight into the issue

from aicoe-ci.

goern avatar goern commented on August 17, 2024

might that be a problem with PSI? can we install all that stuff into the container image that runs pre-commit?

from aicoe-ci.

goern avatar goern commented on August 17, 2024

/priority important-soon

from aicoe-ci.

harshad16 avatar harshad16 commented on August 17, 2024

This issue was not observed anymore.

from aicoe-ci.

AlcibiadesCleinias avatar AlcibiadesCleinias commented on August 17, 2024

I faced with an issue recently in GitHub runner:

Initialized empty Git repository in /opt/.git/
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://gitlab.com/pycqa/flake8.
An unexpected error has occurred: CalledProcessError: command: ('/usr/bin/git', 'fetch', 'origin', '--tags')
return code: 12[8](https://github.com/ALMAServicesCompany/kandym-service/actions/runs/3471185214/jobs/5800347257#step:5:9)
expected return code: 0
stdout: (none)
stderr:
    fatal: could not read Username for 'https://gitlab.com/': No such device or address
    
Check the log at /root/.cache/pre-commit/pre-commit.log
Error: Process completed with exit code 1.

with command in .github/workflows/ci.yaml

    - name: Run linters in the container
      run:
        docker run
        --entrypoint=""
        ${{ github.event.repository.name }}:0.0
        /bin/sh -c 'git init . && git add . && pre-commit run --all-files'

Dockerfile for the flow above (so with it you can reproduce an issue):

FROM python:3.8.8-slim

WORKDIR /opt

ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

RUN apt-get update \
     && apt-get -y install gcc libpq-dev python3-dev netcat git

RUN pip install --upgrade pip
#I commented string below for #53 issue
#COPY requirements.test.txt /opt/.
#I commented string below for #53 issue
#RUN pip install -r /opt/requirements.test.txt

#I commented string below for #53 issue
#COPY entrypoint.sh /opt/.

COPY . /opt/

Reproduce

docker build -f Dockerfile . --tag rm_test:0.0
docker run rm_test:0.0 /bin/sh -c 'git init . && git add . && pre-commit run --all-files'

from aicoe-ci.

harshad16 avatar harshad16 commented on August 17, 2024

@AlcibiadesCleinias which repository are you facing this issue in ?

from aicoe-ci.

harshad16 avatar harshad16 commented on August 17, 2024

Glad to help.
Thanks for the question.

from aicoe-ci.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.