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

[chore] added a new chloggen to track changes to the contrib #125

Merged
merged 9 commits into from
Oct 24, 2023

Conversation

bhanuba
Copy link

@bhanuba bhanuba commented Oct 19, 2023

Description:
OTel has a way to enforce https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/.chloggen and essentially convert those into https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CHANGELOG.md and https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CHANGELOG-API.md as part of their releases.

We need a similar way of ensuring that every PR going to aws-cwa-dev branch will enforce a changelog entry file that will use a new template relevant to us. This template should ask the author of the PR additional details. The end goal is to create a similar CHANGELOG-AWS.md file that we will update with every release.

Link to tracking Issue:

Testing:
Did manual testing with the commands
make chlog-new-aws. ---> To create yaml file in .chloggen-aws with branch name.
make chlog-validate-aws. ---> To validate the format of the content added to the yaml file
make chlog-preview-aws. ---> To see the preview of chloggen-aws.md file
make chlog-update-aws --->To update the content to chloggen-aws.md file
Tested the changelog workflow checks for manual chnages in the CHANGELOG_AWS.md and checks for the file changes in the directory.
Screenshot 2023-10-19 at 12 00 12 PM

It is going to update in CHANGELOG-AWS.md this way
Screenshot 2023-10-23 at 4 45 07 PM

Documentation:
Added a new CONTRIBUTING-AWS.md that helps us in guiding the creation of changelog yaml files and update in the CHANGELOG-AWS.md file.

@bhanuba bhanuba changed the title [changelog] added a new chloggen to track changes to the contrib [chore] added a new chloggen to track changes to the contrib Oct 19, 2023
@@ -288,6 +288,22 @@ chlog-preview: $(CHLOGGEN)
chlog-update: $(CHLOGGEN)
Copy link

Choose a reason for hiding this comment

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

nit: do we still need the original chlog commands if we have our own version that is just for aws-cwa-dev branch?

Copy link
Author

@bhanuba bhanuba Oct 19, 2023

Choose a reason for hiding this comment

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

That can used to update the changelog for any API changes. If we can update in one file then we can remove it.


git push origin "${BRANCH}"

gh pr create --title "[chore] Prepare release ${CANDIDATE_BETA}" --body "
Copy link

Choose a reason for hiding this comment

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

Do we need this file? We are never "releasing" the OTEL agent, but just updating the component so we can reference it in CWAgent code.

Copy link
Author

Choose a reason for hiding this comment

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

We can update with the command as well "make chlog-update-aws --version v1.1.1" . We can discuss the best way and we can work on it. For now we can store chnages in yaml files.

@@ -0,0 +1,93 @@
# This action requires that any PR targeting the main branch should add a
Copy link

Choose a reason for hiding this comment

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

nit: This action requires that any PR targeting the aws-cwa-dev branch

Copy link
Author

Choose a reason for hiding this comment

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

changed.

Copy link

Choose a reason for hiding this comment

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

Do we need this file? We are never "releasing" the OTEL agent, but just updating the component so we can reference it in CWAgent code.

Copy link
Author

Choose a reason for hiding this comment

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

We can update with the command as well "make chlog-update-aws --version v1.1.1" . We can discuss the best way and we can work on it. For now we can store chnages in yaml files.


The name of your file must be unique since the last release.

During the collector release process, all `./chloggen-aws/*.yaml` files are transcribed into `CHANGELOG-aws.md` and then deleted.
Copy link

Choose a reason for hiding this comment

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

Confused about this part. Do we have to run a release workflow to convert the yaml file into the Changelog or does the yaml file get converted after PR is merged?

Copy link
Author

Choose a reason for hiding this comment

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

In general we will run the release for updating the changelog.md file. As we dont do the releases here mostly. We either have to run the command manually or we have to run the release only for the changelog update.

@bhanuba bhanuba requested a review from zhihonl October 19, 2023 22:50
Copy link

Choose a reason for hiding this comment

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

This is an empty file, can we remove this?

CHANGELOG-AWS.md Outdated
# GO AWS cloudwatch agent Changelog

This changelog includes only clodwatch agent developer-facing changes.
Please checkout contributing file [CONTRIBUTING.md](./CONTRIBUTING.md)
Copy link

Choose a reason for hiding this comment

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

We should be referencing CONTRIBUTING-AWS.md right?


on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
Copy link

Choose a reason for hiding this comment

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

Based on previous conversations, I think the agreement is to render change log entry into CHANGELOG-AWS.md when a PR is merged.

Looks like this workflow checks if a changelog entry is added on PR creation, but is there a workflow to automatically convert the entry post-merge or am I missing something?

@bhanuba bhanuba requested a review from zhihonl October 23, 2023 20:43

on:
pull_request_review:
types: [ submitted ]
Copy link

Choose a reason for hiding this comment

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

@bhanuba bhanuba requested a review from zhihonl October 23, 2023 21:11
Copy link

@zhihonl zhihonl left a comment

Choose a reason for hiding this comment

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

LGTM.

I think it would be nice if we have a doc with screenshot that walks through the entire process of how we initiate the PR, add the template change log entry, then how the entry gets converted into change log. Or maybe even just add those details to the testing section would be great as well.

@bhanuba bhanuba merged commit fd01cc6 into aws-cwa-dev Oct 24, 2023
80 of 88 checks passed
@jefchien jefchien deleted the changelog-aws branch October 27, 2023 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants