Pipfile failing for valid dependencies (six 1.12.0) - pipenv

A valid Pipfile which builds on some machines isn't building on others, and dies with a dependency error.
We see this error when running pipenv install --dev even though it looks like six version 1.12.0 should match the set of constraints:
ERROR: ERROR: Could not find a version that matches six>=1.10.0,>=1.12,>=1.2,>=1.5.2,>=1.6.1,>=1.7.0,>=1.9.0,~=1.10.0
Tried: 0.9.0, 0.9.1, 0.9.2, 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.4.1, 1.5.0, 1.5.0, 1.5.1, 1.5.1, 1.5.2, 1.5.2, 1.6.0, 1.6.0, 1.6.1, 1.6.1, 1.7.0, 1.7.0, 1.7.1, 1.7.1, 1.7.2, 1.7.2, 1.7.3, 1.7.3, 1.8.0, 1.8.0, 1.9.0, 1.9.0, 1.10.0, 1.10.0, 1.11.0, 1.11.0, 1.12.0, 1.12.0
S
The original Pipfile is:
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
[dev-packages]
pytest = "*"
ipdb = "*"
django-environ = "*"
responses = "*"
django-extensions = "*"
django = "<=1.11.7"
pytest-cov = "*"
pytest-django = "*"
"flake8" = "*"
pytest-xdist = "*"
[packages]
grpcio = "*"
pytest = "*"
requests = "*"
pytest-django = "*"
"psycopg2" = "*"
arrow = "*"
retrying = "*"
djangorestframework = "*"
"autopep8" = "*"
dj-environ = "*"
pytz = "*"
pillow = "*"
raven = "*"
colorlog = "*"
django-extensions = "*"
redis = "<3.0.0"
rq = "<0.11.0"
keen = "*"
pymongo = "*"
django-simple-history = "*"
python-stdnum = "*"
dictdiffer = "*"
shippo = "*"
shopifyapi = "*"
mypy = "*"
boto = "*"
google-cloud-vision = "*"
twilio = "*"
django-phonenumber-field = "*"
python-bcrypt = "*"
phonenumbers = "*"
core = {editable = true,path = "."}
"tinys3" = "*"
dialogflow = "*"
python-twitter = "*"
sentry-sdk = "*"
"oauth2client" = "*"
tenacity = "*"
fakeredis = "*"
[requires]
python_version = "3.6"
We've tried a number of options, such as pipenv install --ignore-pipfile to use a Pipfile.lock from a machine that appeared to work, but it didn't install anything. Running pipenv graph didn't produce any output. Running pipenv install --skip-lock failed with the original error.

Related

Flyctl deploy fails setting up Kernel: not syncing: Attempted to kill init! exitcode=0x00000100

I am getting the following errors while deploying an app on fly.io using flyctl deploy.
I have no idea how to solve them or how to troubleshoot them.
Explanation
Explanation
Explanation
fly.toml:
# fly.toml file generated for julius-goddard-full-stack-open-pokedex3 on 2022-12-22T15:06:25Z
app = "julius-goddard-full-stack-open-pokedex3"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[build]
image = "flyio/hellofly:latest"
[env]
[deploy]
release_command = "npm run build"
[processes]
app = "node app.js"
[experimental]
allowed_public_ports = []
auto_rollback = true
[[services]]
http_checks = []
internal_port = 8080
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2
s"

Error failed to fetch an image or build from source: error building: failed to solve with frontend docker

I am trying to deploy my website from heroku to fly.io
and when I did fly deploy I got this error
Error failed to fetch an image or build from source: error building: failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = quay.io/evl.ms/fullstaq-ruby:2.6.1-jemalloc-slim: not found
fly.toml file
# fly.toml file generated for ancient-tree-3915 on 2022-09-22T15:00:52-07:00
app = "ancient-tree-3915"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[build]
[build.args]
BUILD_COMMAND = "bin/rails fly:build"
SERVER_COMMAND = "bin/rails fly:server"
[deploy]
release_command = "bin/rails fly:release"
[env]
PORT = "8080"
[experimental]
allowed_public_ports = []
auto_rollback = true
[[services]]
http_checks = []
internal_port = 8080
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
[[statics]]
guest_path = "/app/public"
url_prefix = "/"
any idea how to solve it?
This quay.io/evl.ms/fullstaq-ruby:2.6.1-jemalloc-slim image (probably used in you Dockerfile's FROM clause) doesn't really exist. Check it yourself here:
So, the lowest available 2.6.x tag on quay.io is 2.6.3-jemalloc-stretch-slim. Probably, they just purged old, unsupported versions.
Try to upgrade to a newer version.

Convert http_archive to repository_rule

I'm trying to convert a binary fetching from http_archive:
def purescript_toolchain():
http_archive(
name = "purs",
urls = ["https://github.com/purescript/purescript/releases/download/v0.14.7/linux64.tar.gz"],
sha256 = "cae16a0017c63fd83e029ca5a01cb9fc02cacdbd805b1d2b248f9bb3c3ea926d",
strip_prefix = strip_"purescript",
build_file_content = """exports_files(["purs"])""",
)
To a repository rule based approach:
def _purescript_toolchain_impl(repository_ctx):
repository_ctx.download_and_extract(
url = "https://github.com/purescript/purescript/releases/download/v0.14.7/linux64.tar.gz",
sha256 = "cae16a0017c63fd83e029ca5a01cb9fc02cacdbd805b1d2b248f9bb3c3ea926d",
stripPrefix = "purescript",
)
repository_ctx.file(
"BUILD.bazel",
content = """exports_files(["purs"])""",
)
_purescript_toolchain = repository_rule(
_purescript_toolchain_impl,
configure = True,
environ = ["PATH"],
)
def purescript_toolchain():
_purescript_toolchain(name = "purs")
It seems to work, but when I try to call other functions:
run_template = """
#!/usr/bin/env bash
set -o errexit
node -e "require('./{target_path}/{entry_module}/index.js').{entry_function}({entry_params})"
"""
def _purescript_compile(ctx):
srcs = ctx.files.srcs + ctx.files.deps
target = ctx.actions.declare_file(ctx.outputs.target.basename)
purs = ctx.executable.purs
flags = " ".join(ctx.attr.compiler_flags)
bazel_ps_deps = []
for d in ctx.attr.deps:
for f in d.files.to_list():
if f.basename == "target_srcs":
bazel_ps_deps = [f.path + "/**/*.purs"] + bazel_ps_deps
compileCmd = "\n".join(
[ "set -o errexit"
, """mkdir "$2" """
, """ "$1" compile """ + flags + """ --output "$2" "${#:3}" """
]
)
ctx.actions.run_shell(
tools = srcs + [purs],
outputs = [target],
command = compileCmd,
arguments = [purs.path, target.path] +
[src.path for src in srcs if src.extension == "purs"] +
bazel_ps_deps,
)
cpSrcsCmd = "\n".join(
[ "set -o errexit"
, """mkdir -p "$1" """
, """cp "${#:2}" "$1" """
]
)
target_srcs = ctx.actions.declare_file(ctx.outputs.target_srcs.basename)
ctx.actions.run_shell(
inputs = ctx.files.srcs,
outputs = [target_srcs],
command = cpSrcsCmd,
arguments = [target_srcs.path] + [src.path for src in ctx.files.srcs],
)
return target
def _purescript_tar(ctx):
target = _purescript_compile(ctx)
tar = ctx.actions.declare_file(ctx.outputs.tar.basename)
ctx.actions.run_shell(
inputs = [target],
outputs = [tar],
command = """
set -o errexit
tar --create --file "$1" --directory "$2" .
""",
arguments = [tar.path, target.path],
)
def _purescript_app(ctx):
target = _purescript_compile(ctx)
entry_params = ",".join([
'\\"{entry}\\"'.format(entry=e) for e in ctx.attr.entry_parameters
])
script = ctx.actions.declare_file(ctx.label.name)
script_content = run_template.format(
target_path = target.short_path,
entry_module = getattr(ctx.attr, "entry_module"),
entry_function = getattr(ctx.attr, "entry_function"),
entry_params = entry_params,
)
ctx.actions.write(script, script_content, is_executable = True)
runfiles = ctx.runfiles(files = [target])
return [DefaultInfo(executable = script, runfiles = runfiles)]
purescript_app = rule(
implementation = _purescript_app,
attrs = {
"srcs": attr.label_list(
allow_files = True,
),
"deps": attr.label_list(
default = [],
),
"purs": attr.label(
allow_single_file = True,
executable = True,
cfg = "host",
default = "#purs",
),
"compiler_flags": attr.string_list(
default = []
),
"entry_module": attr.string(
default = "Main",
),
"entry_function": attr.string(
default = "main",
),
"entry_parameters": attr.string_list(
default = [],
),
},
outputs = {
"target": "target",
"target_srcs": "target_srcs",
},
executable = True,
)
Called via:
purescript_app(
name = "ui",
visibility = ["//visibility:public"],
srcs = glob(["src/**/*.purs"]),
)
However, with this new version I get this error:
DEBUG: Repository io_bazel_rules_purescript instantiated at:
.../WORKSPACE:66:13: in <toplevel>
Repository rule http_archive defined at:
~/.cache/bazel/_bazel_black/b6b6a2b95964967dc5a9c8dec827e874/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
INFO: Analyzed target //webui:ui (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: .../webui/BUILD.bazel:16:15: Action webui/target failed: (Exit 127): bash failed: error executing command /nix/store/4nmqxajzaf60yjribkgvj5j54x9yvr1r-bash-5.1-p12/bin/bash -c 'set -o errexit
mkdir "$2"
"$1" compile --output "$2" "${#:3}" ' '' external/purs/purs bazel-out/k8-fastbuild/bin/webui/target ... (remaining 98 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
: line 3: external/purs/purs: No such file or directory
Target //webui:ui failed to build
Which is surprising since the file exist in the directory (external/purs/purs).
Is their anything to add in the new version?

bazel install io_bazel_stardoc//stardoc in bazel 3.7.2

I am using bazel 3.7.2.
I am getting this error
error loading package '#maven//': Unable to find package for #io_bazel_stardoc//stardoc:stardoc.bzl: The repository '#io_bazel_stardoc' could not be resolved.
This is my workspace
load("#bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "bazel_skylib",
urls = [
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
],
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
)
load("#bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
RULES_JVM_EXTERNAL_TAG = "4.0"
RULES_JVM_EXTERNAL_SHA = "31701ad93dbfe544d597dbe62c9a1fdd76d81d8a9150c2bf1ecf928ecdf97169"
http_archive(
name = "maven",
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
sha256 = RULES_JVM_EXTERNAL_SHA,
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
)
load("#maven//:defs.bzl", "maven_install")
maven_install(
artifacts = [
"com.fasterxml.jackson.core:jackson-databind:2.12.1",
"org.apache.commons:commons-lang3:3.11"
],
repositories = [
"https://repo1.maven.org/maven2",
"https://jcenter.bintray.com/"
],
);
I found the solution
git_repository(
name = "io_bazel_stardoc",
remote = "https://github.com/bazelbuild/stardoc.git",
tag = "0.4.0",
)
load("#io_bazel_stardoc//:setup.bzl", "stardoc_repositories")
stardoc_repositories()

Unable to connect to server: Host name may not be null

I am taking the below wso2 course.
Course Link
This is the video:
In Cloud Native API Management with WSO2 API Manager - an Overview
Lab 4 - Using a microgateway (10min)
As I used this command, the docker image is not created in the local properly.
micro-gw build Petstore --deployment-config E:\wso2-CertificatonPreparation\micorgateway-projects\Petstore\deployment.toml
I am getting the below error. Please help me to resolve this issue.
Generating docker artifacts...
error [docker plugin]: module [wso2/Petstore:3.1.0] unable to connect to server:Host name may not be null
And also,
What should I configure in target of deployment.toml
source =E:/wso2-CertificatonPreparation/wso2-softwares/wso2am-micro-gw-toolkit-windows-3.1.0/resources/conf/micro-gw.conf
target = /home/ballerina/conf/micro-gw.conf
I am using version 3.1.0
This is the deployment.toml
[docker]
[docker.dockerConfig]
enable = true
name = " petstore "
registry = ' docker.wso2.com '
tag = ' v1 '
#buildImage = ''
#dockerHost = ''
#dockerCertPath = ''
baseImage = 'wso2/wso2micro-gw:3.0.2'
#enableDebug = ''
#debugPort = ''
#push = ''
[docker.dockerCopyFiles]
enable = true
[[docker.dockerCopyFiles.files]]
source ='E:/wso2-CertificatonPreparation/wso2-softwares/wso2am-micro-gw-toolkit-windows-3.1.0/resources/conf/micro-gw.conf'
target = '/home/ballerina/conf/micro-gw.conf'
isBallerinaConf = true
Can you check with this config?. This works for me without any issue.
[docker]
[docker.dockerConfig]
enable = true
name = "petstore"
registry = 'docker.wso2.com'
tag = 'v1'
#buildImage = ''
#dockerHost = ''
#dockerCertPath = ''
baseImage = 'wso2/wso2micro-gw:3.0.2'
#enableDebug = ''
#debugPort = ''
#push = ''
username = '####'
password = '####'
[docker.dockerCopyFiles]
enable = true
[[docker.dockerCopyFiles.files]]
source = '/Users/hasunie/RD/UI/wso2am-micro-gw-toolkit-macos-3.1.0/resources/conf/micro-gw.conf'
target = '/home/ballerina/conf/micro-gw.conf'
isBallerinaConf = true

Resources