Skip to content
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

Remove indirect build dependency on go-license-detector. #457

Merged
merged 3 commits into from
Jun 14, 2021

Conversation

scunningham
Copy link

What does this PR do?

Tweaks the dependencies-report script to explicitly download required version of the go-license-detector tool and invoke it directly. Previous version expected the dependencies to be included in the go module files that it was analyzing. This broke when newer version of 'go tidy' more aggressively strips modules that are not part of the targeted program's dependency tree.

Why is it important?

The release build process invokes the 'dependencies-report' script, which is currently broken.

Checklist

  • [x ] My code follows the style guidelines of this project
  • [x ] I have commented my code, particularly in hard-to-understand areas
  • [x ] I have made corresponding changes to the documentation
  • [x ] I have made corresponding change to the default configuration files
  • [x ] I have added tests that prove my fix is effective or that my feature works
  • [x ] I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

The 'go tidy' command in go1.16.5 stripped the hash from go.sum breaking the dependencies-report script.
Explictly install the [email protected] script and invoke directly.
@scunningham scunningham added bug Something isn't working v7.14.0 labels Jun 14, 2021
@elasticmachine
Copy link
Contributor

elasticmachine commented Jun 14, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #457 updated

  • Start Time: 2021-06-14T18:48:24.632+0000

  • Duration: 7 min 7 sec

  • Commit: 311c72a

Test stats 🧪

Test Results
Failed 0
Passed 178
Skipped 0
Total 178

Trends 🧪

Image of Build Times

Image of Tests

@michel-laterman
Copy link
Contributor

If we want to take this approach we'll also need the go-licenser installed in a similar manner.
Maybe we should have a make command that will install both tools?

@scunningham
Copy link
Author

Open to suggestions. I am having similar issues with the licenser.

@scunningham scunningham requested a review from ruflin June 14, 2021 19:37
@@ -42,9 +45,9 @@ clean: ## - Clean up build artifacts
.PHONY: generate
generate: ## - Generate schema models
@printf "${CMD_COLOR_ON} Installing module for go generate\n${CMD_COLOR_OFF}"
go install github.com/aleksmaus/generate/...
env GOBIN=${GOBIN} go install github.com/aleksmaus/generate/cmd/schema-generate@latest
Copy link
Contributor

@EricDavisX EricDavisX Jun 14, 2021

Choose a reason for hiding this comment

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

is it in the plan prior to 7.14 to remove alexmaus personal git directory as part of source? @aleksmaus @scunningham ?

Copy link
Author

Choose a reason for hiding this comment

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

That would be wise. @aleksmaus can handle that when he returns. Also noticed a tool in Andrew Kroh's personal space. Not sure where that came from.

Copy link
Contributor

Choose a reason for hiding this comment

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

This was a fork and heavily customized schema code generator for our specific needs.
FWIW, we pull bunch of third party dependencies from other people personal spaces ;-)

Can move it at some point into elastic org sure.

@EricDavisX
Copy link
Contributor

Open to suggestions. I am having similar issues with the licenser.

If it works as is, I prefer to merge and iterate since it is blocking the build for all erryone

@scunningham
Copy link
Author

If it works as is, I prefer to merge and iterate since it is blocking the build for all erryone

Just waiting for a review. Anybody? Beuller?

Copy link
Contributor

@aleksmaus aleksmaus left a comment

Choose a reason for hiding this comment

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

LGTM

@scunningham scunningham merged commit 6f636f7 into elastic:master Jun 14, 2021
@scunningham scunningham deleted the fixbuild branch June 14, 2021 23:36
mergify bot pushed a commit that referenced this pull request Jun 14, 2021
* Remove indirect build dependency on go-license-detector.
The 'go tidy' command in go1.16.5 stripped the hash from go.sum breaking the dependencies-report script.
Explictly install the [email protected] script and invoke directly.

* Fix paths for schema generator and license as well.

* Properly version URL for schema-generate.

(cherry picked from commit 6f636f7)
cachedout pushed a commit that referenced this pull request Jun 15, 2021
* Remove indirect build dependency on go-license-detector.
The 'go tidy' command in go1.16.5 stripped the hash from go.sum breaking the dependencies-report script.
Explictly install the [email protected] script and invoke directly.

* Fix paths for schema generator and license as well.

* Properly version URL for schema-generate.

(cherry picked from commit 6f636f7)
mergify bot added a commit that referenced this pull request Jun 15, 2021
* Remove indirect build dependency on go-license-detector.
The 'go tidy' command in go1.16.5 stripped the hash from go.sum breaking the dependencies-report script.
Explictly install the [email protected] script and invoke directly.

* Fix paths for schema generator and license as well.

* Properly version URL for schema-generate.

(cherry picked from commit 6f636f7)

Co-authored-by: Sean Cunningham <[email protected]>
@v1v v1v added the v7.13.0 label Jul 8, 2021
mergify bot pushed a commit that referenced this pull request Jul 8, 2021
* Remove indirect build dependency on go-license-detector.
The 'go tidy' command in go1.16.5 stripped the hash from go.sum breaking the dependencies-report script.
Explictly install the [email protected] script and invoke directly.

* Fix paths for schema generator and license as well.

* Properly version URL for schema-generate.

(cherry picked from commit 6f636f7)

# Conflicts:
#	Makefile
mergify bot pushed a commit that referenced this pull request Jul 8, 2021
* Remove indirect build dependency on go-license-detector.
The 'go tidy' command in go1.16.5 stripped the hash from go.sum breaking the dependencies-report script.
Explictly install the [email protected] script and invoke directly.

* Fix paths for schema generator and license as well.

* Properly version URL for schema-generate.

(cherry picked from commit 6f636f7)

# Conflicts:
#	Makefile
#	NOTICE.txt
#	go.mod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v7.13.0 v7.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants