Skip to content

Conversation

@denisonbarbosa
Copy link
Member

We need to compile the proto files, which means we need the tools used for the compilation.

@codecov
Copy link

codecov bot commented Jan 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@b3bb0c6). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1212   +/-   ##
=======================================
  Coverage        ?   87.64%           
=======================================
  Files           ?       91           
  Lines           ?     6231           
  Branches        ?      111           
=======================================
  Hits            ?     5461           
  Misses          ?      714           
  Partials        ?       56           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines 18 to 19
protoc-gen-go
protoc-gen-go-grpc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do those exist as debian packages? I thought we install those via go

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They do, but you're correct... it's probably better to install those using Go to make sure we have the right versions

We need to compile the proto files, which means we need the tools used
for the compilation.
sudo apt-get install -y ${{ env.build_dependencies }}

go install honnef.co/go/tools/cmd/staticcheck@latest
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should run go install in the tools directory and without the trailing @latest, so that it will install the exact version that's configured in tools/go.mod, similar to how it's done in https://github.com/canonical/desktop-engineering/blob/0466f1f6e2ab7044a030731193af9ecabd2c7281/gh-actions/go/generate/action.yaml#L30-L47

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I think it's easier if we just use the action from the desktop-engineering repo then. I'll also update the commands to also build the brokers now that we have the code in the repo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. if we use the generate action, we also don't have to call go generate -C pam -x ourselves, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll also update the commands to also build the brokers now that we have the code in the repo.

That's already done by 2e60734, you just have to rebase on main

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's already done by 2e60734, you just have to rebase on main

Since we're touching the code here again, we could fix the name of the authd-oidc broker binary, in this file it's currently built as authd-vanilla

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's already done by 2e60734, you just have to rebase on main

Nice! However, I feel like it might not be that simple... Since authd and authd-oidc-brokers were created as separate projects in the TICS dashboard, I think running the analysis when the code is under the authd project will affect authd's report (and I'm not even sure we can still get the oidc report). I was trying to do some investigation running it locally, but the tool keeps hanging. I'll probably have to contact them directly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since authd and authd-oidc-brokers were created as separate projects in the TICS dashboard, I think running the analysis when the code is under the authd project will affect authd's report

now that they are not separate repos anymore, it only makes sense to have one single TiCS report which includes both authd and authd-oidc-brokers, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I agree. I'll reach out to them to ask for merging the "excluded files" list in a single project

sudo apt-get install -y ${{ env.build_dependencies }}

go install honnef.co/go/tools/cmd/staticcheck@latest
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this also install protoc-gen-go-grpc? I see that tools/go.mod only lists google.golang.org/grpc/cmd/protoc-gen-go-grpc while tools/tools.go has both google.golang.org/grpc/cmd/protoc-gen-go-grpc and github.com/golang/protobuf/protoc-gen-go as dependencies.

In https://github.com/canonical/desktop-engineering/blob/0466f1f6e2ab7044a030731193af9ecabd2c7281/gh-actions/go/generate/action.yaml#L30-L47 we install all the the dependencies from tools/tools.go.

sudo apt-get install -y ${{ env.build_dependencies }}

go install honnef.co/go/tools/cmd/staticcheck@latest
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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