User Details
- User Since
- Nov 2 2020, 11:59 AM (283 w, 4 d)
- Availability
- Available
- IRC Nick
- dcaro
- LDAP User
- David Caro
- MediaWiki User
- DCaro (WMF) [ Global Accounts ]
Thu, Apr 9
Hmmm... I think that there might be some issue when generating the models from the toolforge openapi spec on components-api, as it generated this:
class JobsHttpHealthCheck(BaseModel):
type: Literal["path"]
path: strFound something using restish to try to patch the same way components did:
msg: "Input tag 'path' found using 'health_check_type' | 'type' does not match any of the expected tags: <HealthCheckType.SCRIPT: 'script'>, <HealthCheckType.HTTP: 'http'>"
The jobs api does not really give any extra info:
│ INFO: 127.0.0.1:42416 - "PATCH /v1/tool/tf-test2/jobs/ HTTP/1.0" 422 Unprocessable Entity │
I'm able to reproduce in lima-kilo with:
Wed, Apr 8
this :)
dcaro@acme$ yq -p toml -o toml '
.processes |= map(
.command = ["bash"] + [.args[-1] + " \"$@\"", "--"]
| .args = []
)
' /tmp/metadata.tomlOop, I think this should do the trick:
dcaro@acme$ yq -p toml -o toml '
.processes |= map(
.command = ["bash"] + .args + [" \"$@\"", "--"]
| .args = []
)
' /tmp/metadata.toml
[[buildpacks]]
id = "heroku/dotnet"
version = "1.0.3"
api = "0.10"
homepage = "https://github.com/heroku/buildpacks-dotnet"
[[buildpacks]]
id = "heroku/procfile"
version = "4.2.1"
api = "0.10"
homepage = "https://github.com/heroku/buildpacks-procfile"
[[processes]]
type = "web"
command = ["bash", "-c", "./autoreport.sh", " \"$@\"", "--"]
direct = true
buildpack-id = "heroku/procfile"
[[processes]]
type = "another"
command = ["bash", "-c", "./another.sh", " \"$@\"", "--"]
direct = true
buildpack-id = "heroku/procfile"It seems to work, but still trying to find the equivalent to jq '.processes |= map(.command = [.command] + (.args | .[-1] += " \"$@\"") + ["--"] | .args = [])', not there though:
dcaro@acme$ yq -p toml -o toml '
.processes |= map(
.command = ["bash"] + (.args[0:-1] + [(.args[-1] + " $@")])
| .args = []
)
' /tmp/metadata.toml
[[buildpacks]]
id = "heroku/dotnet"
version = "1.0.3"
api = "0.10"
homepage = "https://github.com/heroku/buildpacks-dotnet"
[[buildpacks]]
id = "heroku/procfile"
version = "4.2.1"
api = "0.10"
homepage = "https://github.com/heroku/buildpacks-procfile"
[[processes]]
type = "web"
command = ["bash", "type", "web", "command", "bash", "args", ["-c", "./autoreport.sh"], "direct", true, "buildpack-id", "./autoreport.sh $@"]
direct = true
buildpack-id = "heroku/procfile"
[[processes]]
type = "another"
command = ["bash", "type", "another", "command", "anotherbash", "args", ["-c", "./another.sh"], "direct", true, "buildpack-id", "./another.sh $@"] <-- it's adding the whole element, not just args
direct = true
buildpack-id = "heroku/procfile"Note that you'll be the biggest user ;)
This is fixed also
This is fixed now, you can pass args to any procfile entry command, for example, with a procfile like:
## Procfile worker: celery --app sample_complex_app_backend.tasks.celery_app worker --loglevel INFO
+1 from me, is a relatively big amount of data, so if you have a way to verify with less data if elastic works for you it would be appreciated (also, keep into account the number of replicas for your indices, if you don't need HA maybe 1 is enough).
I'll close this, but feel free to reopen if you still have issues.
Sent a patch upstream (https://github.com/heroku/buildpacks-procfile/issues/310), but will probably need to hack-fix it for it to work now.
I suspect this has gotten worse with the latest update, the upstream move to using command = ["bash", "-c"] makes passing custom args impossible, looking
I have been trying to trigger this from my own tool, running toolforge components config create config.yaml in a loop for 1000 times, and was unable to get it to fail.
Tue, Apr 7
I'll close this for now, but feel free to reopen if you test the MR/change and still have the issue.
Got a fix for this, waiting for reviews, should be merged soon-ish: https://gitlab.wikimedia.org/repos/cloud/toolforge/builds-builder/-/merge_requests/86
That would be the future-proof way to go yep (url changed https://wikitech.wikimedia.org/wiki/Help:Toolforge/Building_container_images#heroku/deb-packages_(Ubuntu_2024.04_stack,_current_default). I'll give it a quick look, but if it gives too much trouble I might just disable the old apt buildpack.
Thu, Apr 2
I had to manually upgrade cffi by unpinning the deps to python 3.9, so it would get a new enough cffi.
The --use-deprecated-versions flag is available, and will start failing on the 27-04-2026, so all tools should have migrated by then.