Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish Docker images to GitHub Container Registry #5032

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

bestbeforetoday
Copy link
Member

In addition to publishing Docker images to Docker Hub, also publish to GitHub Container Registry.

Contributes to #4998

In addition to publishing Docker images to Docker Hub, also publish to
GitHub Container Registry.

Signed-off-by: Mark S. Lewis <[email protected]>
@bestbeforetoday bestbeforetoday requested a review from a team as a code owner October 16, 2024 18:31
@bestbeforetoday
Copy link
Member Author

Note that when running this on my own fork, I observed the following failures on the Docker build and publish steps. I don't believe these failures are related to this change; just indicate a possible existing problem in the codebase.

Peer

 > [linux/arm64 builder 5/6] RUN make peer GO_TAGS= FABRIC_VER=v3.0.1-test.1:
2.430 Building build/bin/peer
2.457 GOBIN=/build/bin go install -tags "" -ldflags "-X github.com/hyperledger/fabric/common/metadata.Version=v3.0.1-test.1 -X github.com/hyperledger/fabric/common/metadata.CommitSHA=afdb998 -X github.com/hyperledger/fabric/common/metadata.BaseDockerLabel=org.hyperledger.fabric -X github.com/hyperledger/fabric/common/metadata.DockerNamespace=hyperledger" -buildvcs=false github.com/hyperledger/fabric/cmd/peer
452.7 # github.com/prometheus/client_golang/prometheus
452.7 vendor/github.com/prometheus/client_golang/prometheus/registry.go:62:15: undefined: NewGoCollector
460.0 make: *** [Makefile:236: build/bin/peer] Error 1
------
Dockerfile:43
--------------------
  41 |     ADD . .
  42 |     
  43 | >>> RUN make peer GO_TAGS=${GO_TAGS} FABRIC_VER=${FABRIC_VER}
  44 |     RUN make ccaasbuilder
  45 |     

Orderer

 > [linux/amd64 builder 5/5] RUN make orderer GO_TAGS= FABRIC_VER=v3.0.1-test.1:
0.161 Building build/bin/orderer
0.163 GOBIN=/build/bin go install -tags "" -ldflags "-X github.com/hyperledger/fabric/common/metadata.Version=v3.0.1-test.1 -X github.com/hyperledger/fabric/common/metadata.CommitSHA=afdb998 -X github.com/hyperledger/fabric/common/metadata.BaseDockerLabel=org.hyperledger.fabric -X github.com/hyperledger/fabric/common/metadata.DockerNamespace=hyperledger" -buildvcs=false github.com/hyperledger/fabric/cmd/orderer
21.84 # github.com/prometheus/client_golang/prometheus
21.84 vendor/github.com/prometheus/client_golang/prometheus/registry.go:62:15: undefined: NewGoCollector
26.31 make: *** [Makefile:236: build/bin/orderer] Error 1
------
Dockerfile:43
--------------------
  41 |     ADD . .
  42 |     
  43 | >>> RUN make orderer GO_TAGS=${GO_TAGS} FABRIC_VER=${FABRIC_VER}
  44 |     
  45 |     

@denyeart
Copy link
Contributor

Thanks @bestbeforetoday

github.com/prometheus/client_golang was updated last week to v1.20.4.
I see that in v1.20.4 NewGoCollector was moved to a file with build tag for go1.17 onward:
https://github.com/prometheus/client_golang/blob/v1.20.4/prometheus/go_collector_latest.go#L14-L15
Maybe that build tag is not getting picked up in the image environment (it compiles on my local, but not when building the image).
We'll investigate and either fix or revert.
FYI @pfi79

I'll go ahead and merge this PR (and backport to release-2.5) since this is not related to the above problem.

@denyeart denyeart merged commit 32d6a92 into hyperledger:main Oct 16, 2024
15 checks passed
@pfi79
Copy link
Contributor

pfi79 commented Oct 16, 2024

Thanks @bestbeforetoday

github.com/prometheus/client_golang was updated last week to v1.20.4. I see that in v1.20.4 NewGoCollector was moved to a file with build tag for go1.17 onward: https://github.com/prometheus/client_golang/blob/v1.20.4/prometheus/go_collector_latest.go#L14-L15 Maybe that build tag is not getting picked up in the image environment (it compiles on my local, but not when building the image). We'll investigate and either fix or revert. FYI @pfi79

I'll go ahead and merge this PR (and backport to release-2.5) since this is not related to the above problem.

how much time do I have to figure it out before rolling back the change to github.com/prometheus/client_golang?

@denyeart
Copy link
Contributor

Thanks @bestbeforetoday
github.com/prometheus/client_golang was updated last week to v1.20.4. I see that in v1.20.4 NewGoCollector was moved to a file with build tag for go1.17 onward: https://github.com/prometheus/client_golang/blob/v1.20.4/prometheus/go_collector_latest.go#L14-L15 Maybe that build tag is not getting picked up in the image environment (it compiles on my local, but not when building the image). We'll investigate and either fix or revert. FYI @pfi79
I'll go ahead and merge this PR (and backport to release-2.5) since this is not related to the above problem.

how much time do I have to figure it out before rolling back the change to github.com/prometheus/client_golang?

@pfi79 Not urgent since we are not planning a release in the short term... maybe a week?

@pfi79
Copy link
Contributor

pfi79 commented Oct 17, 2024

Thanks @bestbeforetoday
github.com/prometheus/client_golang was updated last week to v1.20.4. I see that in v1.20.4 NewGoCollector was moved to a file with build tag for go1.17 onward: https://github.com/prometheus/client_golang/blob/v1.20.4/prometheus/go_collector_latest.go#L14-L15 Maybe that build tag is not getting picked up in the image environment (it compiles on my local, but not when building the image). We'll investigate and either fix or revert. FYI @pfi79
I'll go ahead and merge this PR (and backport to release-2.5) since this is not related to the above problem.

how much time do I have to figure it out before rolling back the change to github.com/prometheus/client_golang?

@pfi79 Not urgent since we are not planning a release in the short term... maybe a week?

I'm afraid I won't make it.

So now I will send a pr that will roll back the prometheus/client_golang changes. The working branch is more important in my opinion.

I will continue the research. So far I found that docker builds if you delete the vendor folder. But it doesn't build with the vendor folder.

I also asked the developers of the library. I had a very interesting conversation with the bot. But the conversation went in circles.

@pfi79 pfi79 mentioned this pull request Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants