fix: artifacts/server: properly format IP/port for listen address #135
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind
Chore
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
3 participants
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo/act!135
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch ":fix-artifact-ip"
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?
Hi!
This primarily fixes the listen address for the artifact server - currently, if an plain IPv6 address is passed (e.g.
2001:db8::1), it results in2001:db::1:3456as the formatted address.It also this changes so thatdone.artifactServerAddris represented as anet.IPandartifactServerPortasuint16, thus making the whole thing a bit more typesafe.As the latter breaks the API for
config.Runner(by changing the struct field types), I hope this is okay - otherwise, I'll just drop the commit if compatibility is more desired.The corresponding runner PR: forgejo/runner#576
Good fix 👍
The runner makes no promise regarding backward compatibility, the amount of work required to change the type of the fields is going to be a burden immediately and only brings marginal benefits.
I think it is best to keep it in another pull request, separated from the bug fix.
fix: artifacts/server: properly format IP/port for listen addressto fix: artifacts/server: properly format IP/port for listen address [skip cascade]Marking as [skip cascade] so that it does not trigger the full test suite until it is ready to succeed.
@ -120,2 +121,2 @@h.outboundIP,h.listener.Addr().(*net.TCPAddr).Port)return fmt.Sprintf("http://%s",net.JoinHostPort(h.outboundIP, strconv.FormatUint(uint64(port), 10)),Could you please find where this should be tested and add a testcase?
Done. Not really familiar with the go unit testing framework, so please do not hestitate if there are better ways to do things.
Right, I'll just drop that change. 👍
7fb03fd71174ed568cb974ed568cb99d57dc9ba19d57dc9ba13fbcc2c7ef@ -299,3 +300,3 @@// run servergo func() {logger.Infof("Start server on http://%s:%s", addr, port)logger.Infof("Start server on http://%s", server.Addr)Port is missing here.
http.Addris set to the correcthost:portstring above, so this just reuses that.But if you want I can change that.
fix: artifacts/server: properly format IP/port for listen address [skip cascade]to fix: artifacts/server: properly format IP/port for listen addressCould you please update the title to reflect the current state of the PR?
chore:...@earl-warren wrote in #135 (comment):
I mean, it still fixes original problem, no?
3fbcc2c7ef31d7feaeb0cascading-pr updated at forgejo/runner#587
Thanks for the gentle ping 😊