etcd icon indicating copy to clipboard operation
etcd copied to clipboard

Minimal changes to enable a Go workspace

Open ivanvc opened this issue 11 months ago • 25 comments

This pull request is a follow-up on #19314.

It introduces minimal changes to enable a workspace in the project. We can iterate on it later to remove the script nuances of looping over the modules to execute commands, as they can now be executed from the top level of the repository.

Part of #18409.

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

ivanvc avatar Feb 15 '25 06:02 ivanvc

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

k8s-ci-robot avatar Feb 15 '25 06:02 k8s-ci-robot

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 69.23%. Comparing base (da267f1) to head (8b02416). :warning: Report is 10 commits behind head on main.

Additional details and impacted files

see 32 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #19423      +/-   ##
==========================================
+ Coverage   68.61%   69.23%   +0.61%     
==========================================
  Files         422      422              
  Lines       34819    34819              
==========================================
+ Hits        23891    24106     +215     
+ Misses       9516     9322     -194     
+ Partials     1412     1391      -21     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update da267f1...8b02416. Read the comment docs.

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

codecov[bot] avatar Feb 15 '25 07:02 codecov[bot]

/test all

ivanvc avatar Feb 15 '25 07:02 ivanvc

/cc @ahrtr @serathius

ivanvc avatar Feb 18 '25 07:02 ivanvc

I will review this PR after we officially release v3.6.0, thx

ahrtr avatar Feb 21 '25 10:02 ahrtr

/test all

ivanvc avatar Mar 13 '25 06:03 ivanvc

/test all

ivanvc avatar Mar 13 '25 19:03 ivanvc

/test all

ivanvc avatar Apr 04 '25 08:04 ivanvc

/test pull-etcd-release-tests pull-etcd-verify

ivanvc avatar Apr 04 '25 08:04 ivanvc

/test all

ivanvc avatar Apr 04 '25 08:04 ivanvc

/test pull-etcd-release-tests pull-etcd-verify

ivanvc avatar Apr 05 '25 06:04 ivanvc

/test all

ivanvc avatar May 20 '25 21:05 ivanvc

/test pull-etcd-release-tests

ivanvc avatar May 22 '25 05:05 ivanvc

/test all

ivanvc avatar May 22 '25 06:05 ivanvc

@ahrtr, with 3.6.0 out the door, can we revisit this pull request now?

ivanvc avatar May 22 '25 16:05 ivanvc

/test pull-etcd-integration-4-cpu-amd64

ivanvc avatar May 22 '25 18:05 ivanvc

Will take a look at this PR next week, thx @ivanvc

ahrtr avatar May 22 '25 19:05 ahrtr

I assume that you will remove all permitted replace directive in a followup PR, see one example below, correct?

https://github.com/etcd-io/etcd/blob/ae01ad849a1bd9deb2ca282220b7d98e13900dfc/etcdctl/go.mod#L49-L54

ahrtr avatar May 27 '25 14:05 ahrtr

I assume that you will remove all permitted replace directive in a followup PR, see one example below, correct?

@ahrtr, after I received the suggestion to make minimal changes to enable the Go workspace, I closed my previous pull request, and this one does precisely that. It enables the workspace and allows it to coexist with our previous build system; I made only the minimal changes necessary to achieve this.

Long story short, to keep the changes minimal and reduce friction when merging the pull request, I'll address more changes later on.

ivanvc avatar May 27 '25 19:05 ivanvc

@ahrtr, after I received the suggestion to make minimal changes to enable the Go workspace

I am aware of it, and have no any comment on that. I am just double confirming the next step. Even in your previous PR https://github.com/etcd-io/etcd/pull/19314, I do not see you made the change as mentioned in https://github.com/etcd-io/etcd/pull/19423#issuecomment-2912641428

ahrtr avatar May 27 '25 19:05 ahrtr

I am aware of it, and have no any comment on that. I am just double confirming the next step. Even in your previous PR #19314, I do not see you made the change as mentioned in #19423 (comment)

If I remember correctly, we can't remove the replaces from the top-level go.mod, but we can from the submodules (but my memory may not be serving me well). I'll work on that after, and will get a definitive answer on what we need to do moving forward.

ivanvc avatar May 28 '25 17:05 ivanvc

Rebased/force pushed due to #20039.

ivanvc avatar May 28 '25 17:05 ivanvc

pull-etcd-verify is failing due to the bom check. Before I managed to make it fail consistently in a just cloned repository. I have a workaround for this. I think it may be a combination of Go 1.25 and the workspace that is making it fail. I'll address it soon.

ivanvc avatar Sep 24 '25 07:09 ivanvc

Using depguard looks great. Could we separate PR to migrate to depguard? That would allow us to make smaller, more intentional steps and main PR smaller.

serathius avatar Sep 24 '25 07:09 serathius

Using depguard looks great. Could we separate PR to migrate to depguard? That would allow us to make smaller, more intentional steps and main PR smaller.

Great idea! I'll open a PR shortly :)

ivanvc avatar Sep 24 '25 16:09 ivanvc

@ivanvc: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci-etcd-robustness-release36-amd64 2cab586d753e6406e327c4130a196ab57fb96eff link true /test ci-etcd-robustness-release36-amd64
pull-etcd-govulncheck-main aba141c0c16792d5993a44cd4a7fed0c25e6f4e8 link true /test pull-etcd-govulncheck-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

k8s-ci-robot avatar Oct 03 '25 22:10 k8s-ci-robot

The @k8s-ci-robot reports that pull-etcd-govulncheck-main failed. But this is an old test that we don't have anymore. We replaced it with pull-etcd-govulncheck, and the run is successful: https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/etcd-io_etcd/19423/pull-etcd-govulncheck/1974246855806029824.

ivanvc avatar Oct 04 '25 23:10 ivanvc

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, fuweid, ivanvc, serathius

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • ~~OWNERS~~ [ahrtr,fuweid,ivanvc,serathius]

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Oct 05 '25 13:10 k8s-ci-robot

This is awesome!

serathius avatar Oct 11 '25 09:10 serathius