Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

build: commit generated code files #449

Merged
merged 5 commits into from Feb 8, 2019

Conversation

mboersma
Copy link
Member

@mboersma mboersma commented Feb 6, 2019

Reason for Change:

Keeping these generated files in the repository will help with vendoring and should make aks-engine "go get"-able. Since make build already calls make generate as a subtask, I don't think keeping them up to date will be onerous.

Issue Fixed:

Fixes #286

Requirements:

Notes:

@mboersma mboersma added this to In progress in backlog Feb 6, 2019
@acs-bot
Copy link

acs-bot commented Feb 6, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mboersma

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:

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

@tariq1890
Copy link
Contributor

If we are doing this, we need to add a CI check to make sure the CI-runtime generated code doesn't differ from the committed generated code.

@mboersma
Copy link
Member Author

mboersma commented Feb 6, 2019

need to add a CI check to make sure the CI-runtime generated code doesn't differ...

Good point--I'll work on adding that.

@mboersma
Copy link
Member Author

mboersma commented Feb 6, 2019

/hold

@codecov
Copy link

codecov bot commented Feb 6, 2019

Codecov Report

Merging #449 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #449   +/-   ##
=======================================
  Coverage   53.43%   53.43%           
=======================================
  Files          95       95           
  Lines       14391    14391           
=======================================
  Hits         7690     7690           
  Misses       6038     6038           
  Partials      663      663

@tariq1890
Copy link
Contributor

@CecileRobertMichon Is there a way to exclude the autogenerated files from the codecov check ?

@CecileRobertMichon
Copy link
Contributor

CecileRobertMichon commented Feb 7, 2019

@CecileRobertMichon Is there a way to exclude the autogenerated files from the codecov check ?

Yes, we can add any pkg we want skipped in https://github.com/Azure/aks-engine/blob/master/scripts/ginkgo.coverage.sh#L28-L29

@mboersma
Copy link
Member Author

mboersma commented Feb 7, 2019

You can only skip entire packages with go cover tools, so I took the approach of giving the generated files a naming pattern and then stripping their results from the coverage file based on that. Seemed less disruptive than putting them in separate packages or working with +build flags.

Edit: nevermind, that didn't seem to work--codecov counted those files anyway. I added an ignore: directive to codecov.yml instead. This worked as expected--the codecov comment above shows "coverage will not change" now.

@mboersma mboersma force-pushed the commit-the-generated branch 2 times, most recently from f5d7a9e to 0c02bb3 Compare February 7, 2019 21:54
Keeping these files in the repository will help with vendoring
and should make the package "go get"-able.
This should ensure go-bindata files are kept up to date.
Makefile Show resolved Hide resolved
@mboersma
Copy link
Member Author

mboersma commented Feb 8, 2019

/hold cancel

@mboersma mboersma added size/M and removed size/XXL labels Feb 8, 2019
@tariq1890 tariq1890 merged commit 2591593 into Azure:master Feb 8, 2019
backlog automation moved this from In progress to Done Feb 8, 2019
@mboersma mboersma deleted the commit-the-generated branch February 8, 2019 20:35
juhacket pushed a commit to juhacket/aks-engine that referenced this pull request Mar 14, 2019
* build: commit generated code files

Keeping these files in the repository will help with vendoring
and should make the package "go get"-able.

* build: ignore generated files in code coverage

* build: add "make validate-generated" target

This should ensure go-bindata files are kept up to date.

* fix: replace script with simpler git commands

* fix: revise git diff command for generated file check
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
backlog
  
Done
Development

Successfully merging this pull request may close these issues.

Check In Code Generation Files to Allow for Vendoring
4 participants