Skip to content

Conversation

@RedbackThomson
Copy link
Contributor

Description of changes:
Adds a go.local.mod, and make targets using the new file, to more easily reference the local runtime package. Developers are now able to run make local-build-ack-generate to build and test changes to code-generator when updating runtime.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@vijtrip2 vijtrip2 left a comment

Choose a reason for hiding this comment

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

Good improvement.

Any means of keeping the dependencies in go.local.mod and go.local.sum consistent with dependency updates in go.mod and go.sum.

Currently for code-generation, I just need to add a "replace" line in go.mod and just use existing make targets. With the new approach do you think there can be hidden surprises if go.local.mod and go.local.sum are not kept consistent.

@RedbackThomson
Copy link
Contributor Author

RedbackThomson commented Feb 23, 2022

With the new approach due you think there can be hidden surprises if go.local.mod and go.local.sum are not kept consistent

Hmm yeah if any of the other direct dependencies are not updated in the go.local.mod file, then it won't know to update those to be inline with go.mod. Not really sure how to reference the modules from go.mod, though. It's hard to google this stuff. So for now you would need to update dependencies in both places :/

@vijtrip2
Copy link
Contributor

/approve

@brycahta brycahta self-requested a review February 28, 2022 17:07
@go build ${GO_TAGS} ${GO_LDFLAGS} -o bin/ack-generate cmd/ack-generate/main.go
@echo "ok."

local-build-ack-generate: ## Build ack-generate binary using the local go.mod
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: using the file name is clearer, Build ack-generate binary using go.local.mod

@brycahta
Copy link
Contributor

I agree that keeping these 2 go.mod in sync will be a pain. One idea is could the make target be a bash script that edits go.mod file directly to make it "localized"? And running make build-controller would undo the edits

@RedbackThomson
Copy link
Contributor Author

One idea is could the make target be a bash script that edits go.mod file directly to make it "localized"

No doubt someone will commit this change and include it in a PR. I don't think our go.mod changes too much that this will legitimately be too annoying. I just checked the file history and we essentially haven't changed anything apart from the runtime version since v0.4.0 or even before then.

@vijtrip2
Copy link
Contributor

vijtrip2 commented Mar 7, 2022

/lgtm

@ack-bot ack-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 7, 2022
@ack-bot
Copy link
Collaborator

ack-bot commented Mar 7, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RedbackThomson, vijtrip2

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 [RedbackThomson,vijtrip2]

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

@ack-bot ack-bot merged commit a0a7fbd into aws-controllers-k8s:main Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants