-
Notifications
You must be signed in to change notification settings - Fork 43
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
Tiobe Integration #420
base: main
Are you sure you want to change the base?
Tiobe Integration #420
Conversation
3c9ee1a
to
b78a357
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know when you need secrets.TICS_AUTH_TOKEN setup
For the system tests using the MicroCloud snap, it looks like the only requirements to generate the coverage files are:
@tomponline, once I've got it working here, we can utilize a similar approach for LXD. |
5f8676c
to
9a0ecdf
Compare
This PR creates a GOCOVERDIR in the snap confinement space when using debug binaries. Note: required for canonical/microcloud#420.
9a0ecdf
to
606db39
Compare
There appears to be a problem with the MicroCloud CI tests because of a regression in upstream Ceph versioning. As a result, I haven’t tested this yet. |
608198c
to
519061b
Compare
ced5879
to
d038f14
Compare
Should be good to go, just waiting on https://github.com/kadinsayani/microcloud/actions/runs/11413516898/job/31763088034 |
d038f14
to
25f8594
Compare
Good to go on this, here's an example successful run on my fork: https://github.com/kadinsayani/microcloud/actions/runs/11413516898/job/31763088034. |
We recently started using the
These errors are what caused the downtick in TQI scores across various Tiobe quality metrics. The analyzer runs are erroring out, so data isn't being sent to Tics for the coding standards runs. For the security checks, I'm seeing the following error on every run:
Tics uses Coverity for security scanning, here's something I found from their docs:
Exit code 256 typically indicates that the system can't locate the binary to run the command, so I think this is also a dependency issue. I propose that we bump the Go version in the Tics job to ensure we capture the right dependencies for Tics at the |
Yeah we should switch to go 1.23 |
25f8594
to
d9073dd
Compare
Good to go - all of the Tiobe runs are operational and the quality metrics are accurate. https://github.com/kadinsayani/microcloud/actions/runs/11432414984/job/31830683250 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! A few comments from my side, mostly for clarification.
@@ -271,8 +271,8 @@ set_debug_binaries() { | |||
lxc exec "${name}" -- rm -f /var/snap/microcloud/common/microcloudd.debug | |||
lxc exec "${name}" -- rm -f /var/snap/microcloud/common/microcloud.debug | |||
|
|||
lxc file push --quiet "${MICROCLOUDD_DEBUG_PATH}" "${name}"/var/snap/microcloud/common/microcloudd.debug | |||
lxc file push --quiet "${MICROCLOUD_DEBUG_PATH}" "${name}"/var/snap/microcloud/common/microcloud.debug | |||
lxc file push --quiet "${MICROCLOUDD_DEBUG_PATH}" "${name}"/var/snap/microcloud/common/microcloudd.debug --mode 0755 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of interest what is the reason for changing the permission for the debug binaries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lxc file push
sets the file mode to 0644
by default - we want to make sure the binaries are executable and maintain the file mode set by the Go compiler. We also check for the presence of these executables in commands/daemon.start
and commands/microcloud
in the MicroCloud snap. When they are present and executable, the GOCOVERDIR
is created. Here's the relevant PR: canonical/microcloud-pkg-snap#15.
@@ -0,0 +1,3 @@ | |||
# Checks being ignored: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We wanted to see if adding a staticcheck.conf
with this rule would silence the Coding standards violations, but it looks like Tics isn't picking this up so our Coding standards TQI score remains the same. See https://github.com/kadinsayani/microcloud/actions/runs/11446739960/job/31905615699.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can still keep this staticcheck rule since the violation doesn't apply to us.
@@ -192,6 +192,8 @@ run_test() { | |||
${TEST_CURRENT} | |||
END_TIME="$(date +%s)" | |||
|
|||
collect_go_cover_files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it not sufficient to do the collection here but also in reset_systems
and restore_systems
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few of the test suites use reset_systems
during test cases. reset_systems
may call restore_systems
when SNAPSHOT_RESTORE
is set to 1
.
7b37e0f
to
61a0ec4
Compare
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
61a0ec4
to
9270c6d
Compare
I've rebased and resolved a naming issue with the coverage file directories. Test run: https://github.com/kadinsayani/microcloud/actions/runs/11493847667/job/31990262151. |
Looks like there's still an issue with the naming. I'll try and fix this some time today. Just need a unique identifier to append so there aren't naming conflicts. |
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
9270c6d
to
ed6d74c
Compare
This PR adds code coverage for unit tests and snap system tests.