-
Notifications
You must be signed in to change notification settings - Fork 136
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
fix: Add release-tools subtree #28
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: animeshk08 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Followed instructions from here: https://github.com/kubernetes-csi/csi-release-tools#sharing-and-updating This PR should also get rid of the following job-failure: post-csi-driver-smb-push-images NOTE: The commits of the subtree have been squashed. |
One issue remains in this PR: |
Pull Request Test Coverage Report for Build 194508756
💛 - Coveralls |
Makefile
Outdated
@@ -12,6 +12,13 @@ | |||
# See the License for the specific language governing permissions and | |||
# limitations under the License. | |||
|
|||
# No individual commands at the moment, just packages. | |||
CMDS= | |||
all: build test |
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.
This will build as well as run the tests. I am not sure if this will be redundant(Are tests being run twice?). If it is redundant this line can be replaced with all: build
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.
I think the usual expectation is that a plain "make" will just build, i.e. use all: build
here.
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.
Thank you for the info. I will update the PR :)
Now that we have cloudbuild integration to do multi-arch image building, we no longer need travis CI and can rely entirely on prow jobs to build and test. cc @pohly |
let's keep travis for a while until github action has all the test coverage, here is the golint error reported from travis:
|
I have added a PR to fix the golint error in the source repository: kubernetes-csi/csi-release-tools#92 |
@andyzhangx what I mean is that the prow job also has coverage in terms of build, fmt, and unit tests |
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.
Squashing the commits in release-tools
breaks future updates:
$ hub checkout https://github.com/kubernetes-csi/csi-driver-smb/pull/28
...
$ git subtree pull --prefix=release-tools https://github.com/kubernetes-csi/csi-release-tools.git master
warning: no common commits
remote: Enumerating objects: 64, done.
remote: Counting objects: 100% (64/64), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 411 (delta 29), reused 37 (delta 16), pack-reused 347
Receiving objects: 100% (411/411), 200.51 KiB | 1.04 MiB/s, done.
Resolving deltas: 100% (216/216), done.
From https://github.com/kubernetes-csi/csi-release-tools
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
Please import csi-release-tools with git subtree add
as described in the README.md.
Hi, @pohly I was successfully able to pull future updates by squashing the pull as well.
Adding the subtree as mentioned in the README as such will show unnecessary commits in this repo's tree. Let me know how to move forward. Also now we have gofmt errors in |
Okay, that works.
It's debatable whether those commits are unnecessary. With squashing, it is impossible to tell which changes from csi-release-tools are in a PR and (later) in the repo. For comparison, this is what an update PR looks like when keeping history: kubernetes-csi/csi-proxy#57 IMHO consistency is important. @msau42 what do you think? One possible alternative to subtree is importing csi-release-tools as submodule. If Prow always checks out with submodules (to be checked - I don't know whether it does), then we still have the full set of files needed during the job. But then developers will have to adapt their workflow accordingly. I did not investigated that earlier because I had the impression that TravisCI always wants a .travis.yml in the repo itself; this might have been wrong. |
I am fine with squashing the commits from csi-release-tools. In the other repos, it does add a bit of noise to the commit history. The commit here says which commit we pulled from csi-release-tools so if we really needed to backtrack we could. @animeshk08 can you also update the README in csi-release-tools with your squash steps? I think we can start to adapt this in the other sidecar repos too. |
And please also adapt the script in kubernetes-csi/csi-release-tools#7 (comment) It will break once repos start to squash commits, in which case individual repo owners will have to manually update csi-release-tools. So far, I was creating PRs for them with that script. |
Squashing is IMHO worse than using a git submodule. Shall we switch to that instead? |
Hi @pohly. Your concerns are valid. The script will have to be modified in case squashing becomes popular among all the repos. Also, I understand that having a submodule will not increase the size of the repos as compared to having a subtree. If it works I also agree that submodule will be a better choice(I am not well versed with the intricies of prow). Should I create a PR specific to the current repo to see if any problems are faced? |
That's a worthwhile test. There is an image build job for it (https://github.com/kubernetes/test-infra/blob/326537faeda35c19f725d5daba46b7650317aefe/config/jobs/image-pushing/k8s-staging-sig-storage.yaml#L91) and runs for it can be found through the dashboard (https://testgrid.k8s.io/sig-storage-image-build#post-csi-driver-smb-push-images). We'll have to merge the PR first, but as that can only improve the situation, that's okay. |
@animeshk08: we discussed this today in the CSI standup meeting and the conclusion was that a) sub-modules might be too confusing because developers would have to remember to update also the sub-module b) that squashing is probably better than importing the full commit history. However, for that to work in practice we need an update for the script such that it handles squashing and still is reporting the full list of commits that are added as part of a PR, both in the commit message and the PR message. See kubernetes-csi/external-health-monitor#14 for an example how that looks at the moment. In the future, commit numbers have to become links to the csi-release-tools repo because the commit has no meaning anymore in the other repos. |
Thank you for the update @pohly! I will try to modify the script. |
Hi @pohly. Sorry for the delay. I have spent some time trying to figure out a way to squash the commits and still follow the PR format currently being used. From my understanding, there is no direct way to implement this. However, if some flexibility is adapted we can achieve something similar as described below. I understand that the script currently only pulls the changes and doesn't add a new subtree. The new adaption will also have this short coming. After pulling new changes the tree will look something like below:
As you can see the changes even though squashed are included in the commit message. If we do not rewrite the commit message anymore we can utilise something like above. The modified script will look something like below:
Please, let me know what are your views on this. \cc @andyzhangx @msau42 EDIT:
|
@animeshk08: looks like you need to update the PR to include kubernetes-csi/csi-release-tools@0345a83 |
git-subtree-dir: release-tools git-subtree-split: 0345a83
Signed-off-by: Animesh Kumar <animuz111@gmail.com>
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.
/lgtm
I have updated the PR. Thank you for all the help @pohly. \cc @andyzhangx |
@animeshk08: The following test failed, say
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/test-infra repository. I understand the commands that are listed here. |
i believe the verify test and build test are failing as there is missing boiler plate text in some of the files in release-tools like cloudbuild.sh. The boiler plate text(License) can should be of the following format:
Can I send a PR to csi-release-tools to add this @pohly? |
Sure. However, there is a more fundamental issue: csi-driver-smb seems to have additional tests that aren't used by other repos and then expects code imported from elsewhere to pass those tests. This needs to be changed, either by:
|
The concern is genuine. This is not the correct way to move forward to fix an error in the upstream repo after every update of I think the choice of the path from here should be decided after some discussion. I believe the test in If the decision is otherwise we can remove the test for specifically for |
@animeshk08 I think we can |
IMHO the header check is useful. I'm less convinced about golint. The upstream project explicitly warns against expecting code to pass golint without warnings (https://github.com/golang/lint#purpose - "In short, this tool is not, and will never be, trustworthy enough for its suggestions to be enforced automatically, for example as part of a build process."). Enforcing this via a check will put us into a position where we have to make code changes even when they don't make sense. Changing the quoting style for example (kubernetes-csi/csi-release-tools@36ea4ff) did not make much sense as far as I'm concerned. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closed this PR. In response to this:
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/test-infra repository. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds release tool subtree to the repository. This make the repository template uniform with other repositories within Kubernetes-CSI. Also
post-csi-driver-smb-push-images
fail can be fixedWhich issue(s) this PR fixes:
Fixes #
Requirements:
Special notes for your reviewer:
Release note: