-
Notifications
You must be signed in to change notification settings - Fork 463
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
Don't make unnecessary local changes in make targets #1794
Conversation
79e7137
to
92153b1
Compare
I think this partly solves the problem with temporary changes applied to the checked-in files. For instance the CSV is still modified. I would assume that if no code is changed in the repository, then the developer workflow IMG=docker.io/${USER}/opentelemetry-operator:dev-$(git rev-parse --short HEAD)-$(date +%s) make generate bundle
git status ploffay@fedora
On branch PR1794
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml
ls dist 130 ↵ ploffay@fedora
kustomization.yaml opentelemetry-operator.yaml
------------------------------------------------ On the main branch the changes look like:
That said, I like the improvement, but it's a small benefit for unnecessary more complicated workflow in the makefile. |
Yeah, I wasn't really trying to address the bundle generation, which I don't understand as well as the kustomize parts. Maybe we can generate the bundle into a temporary folder in the same way, and only check it into source control when releasing? I'd like to do that in a separate PR though. |
92153b1
to
c2177f1
Compare
I am not quite sure how to handle this, but I would like to land it in a single PR since its solving the same problem. I find the checked-in |
Why does the checked-in bundle exist? Is it just to be able to track changes to it? If so, we can change the current command to Incidentally, operator-framework/operator-sdk#6285 recommends to just not keep the bundle in source control and to not run |
@pavolloffay the way I see it, there are three different reasons to generate a bundle:
Seems like we should have different commands for these.
When we tell contributors to |
c2177f1
to
bd9b338
Compare
bb050e0
to
a8a7599
Compare
a8a7599
to
805d6b6
Compare
805d6b6
to
eb856a2
Compare
@pavolloffay mind taking another look here as well? |
eb856a2
to
7b77e45
Compare
7b77e45
to
b1b010a
Compare
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 this LGTM. Can we also update the docs to say users should run make update-bundle
if they change any manifests things?
b1b010a
to
512167e
Compare
We have a make target called I've also added a note to the contributing doc for completeness sake. |
It's been a long time since I wanted to look at this PR, sorry for too long delay. I think we can do this without increasing the complexity of the kustomize setup in the repository. We had the same issue in the tempo-oprator and it was solved without changed the kustomize. I will take a a look and submit a similar approach here as well. |
here is the alternative PR #2421 |
Kustomize works by applying successive overlays over resources. Currently, when we need to apply changes to our base, we do it directly in our manifests, modifying files which are checked into source control. This is annoying for local work, though doesn't really matter for CI.
This change uses a separate overlay for any changes we might want to make over our defaults. The kustomization.yaml file lives in the ignored
./dist
directory, and is created and modified on demand.I tested all the targets making use of this, and everything worked as expected, but I'd appreciate review from someone involved in writing this Makefile.
This is part of my effort to make running E2E tests locally nicer.