options
in workflow and container.network
in config file are in confilct
#220
Labels
No Label
kind
bug
kind
build
kind/compatible
kind
dependencies
kind
docs
kind
enhancement
kind
feature
kind
help wanted
kind
proposal
kind
refactor
related
act
related
environment
related
exec
related
gitea
related
workflow
reviewed
confirmed
reviewed
duplicate
reviewed
invalid
reviewed
needs feedback
reviewed
wontfix
reviewed
workaround
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/act_runner#220
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
See: https://gitea.com/xorm/xorm/actions/runs/3
An error message (
db.Exec: dial tcp: lookup mysql on 127.0.0.11:53: no such host
) was returned at the step oftest mysql
.container.network
ofact_runner
configuration file is empty string. According to the introduction of #184, empty string means that job container and its service containers will connect to a new network which created byact_runner
. These containers can access each other by alias.Obviously, the action performed in
xorm
above was not as expected.Then, I found this in the log of the step of
Setup job
:As we can see,
networkmode
is specified asbridge
instead of a new network when service container created.the defintion of services in workflow:
So I guess it that the
--network=bridge
defiend inoptions
covers the new network which created byact_runner
.In https://gitea.com/xorm/xorm/actions/runs/6, remove
--network=bridge
,networkmode
is still specified asdefault
.Finally, remove
options
and it works as expect.Cause
In the function of mergeContainerConfigs in
act
:options
is not a empty string, and specify--network
tobridge
, the logic of the merge will be executed. That's why it's covered asbrigde
.--network
is not specified inoptions
andoptions
is not a empty, will be set todefault
.Solution
There are two possible solutions.
Be consistent with Github, just ignore the
--network
flag inoptions
(bothjobs.<job_id>.services.<service_id>.options
andjobs.<job_id>.container.options
) .Add an option to the configuration file to control whether or not
--network
inoptions
is effective.Sounds good. I think network config should not be part of a step, but part of the runner configuration.