mirror of
https://github.com/nektos/act.git
synced 2026-04-25 17:05:50 +03:00
[PR #2075] [MERGED] fix: network-scoped alias is supported only for containers in user defined networks #2259
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#2259
Loading…
Add table
Add a link
Reference in a new issue
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?
📋 Pull Request Information
Original PR: https://github.com/nektos/act/pull/2075
Author: @ChristopherHX
Created: 11/2/2023
Status: ✅ Merged
Merged: 11/12/2023
Merged by: @mergify[bot]
Base:
master← Head:fix-network-scoped-alias-regression📝 Commits (2)
0cd4b67fix:a006b92Merge branch 'master' into fix-network-scoped-alias-regression📊 Changes
1 file changed (+3 additions, -1 deletions)
View changed files
📝
pkg/container/docker_run.go(+3 -1)📄 Description
This Windows only issue is caused by the missing
!n.IsHost()in then.IsUserDefined()function for windows. Act sends the network alias for the host network on windows, linux sees that and calls the sameIsUserDefined(but uses the unix definition on the server side), which detects thehostnetwork as non user defined network.On linux and macOS it is impossible to reproduce at the time of creating this change. I don't get why windows has it's own definition, but bad maintained.
The actual code uses
IsUserDefinedto detect if network aliases are supported, which didn't work on windows due to the mess in the docker client go library.Thank you docker client.
go\pkg\mod\github.com\docker\docker@v24.0.7+incompatible\api\types\container\hostconfig_unix.go
go\pkg\mod\github.com\docker\docker@v24.0.7+incompatible\api\types\container\hostconfig_windows.go
Why did docker this?
Seems like we have to replace the convenience function with it's unix definition
Important bug fix, I don't have the power
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.