Skip to content

New changelog versions validation check#808

Merged
mrodm merged 9 commits intoelastic:mainfrom
mrodm:new-changelog-validation-check
Oct 3, 2024
Merged

New changelog versions validation check#808
mrodm merged 9 commits intoelastic:mainfrom
mrodm:new-changelog-validation-check

Conversation

@mrodm
Copy link
Copy Markdown
Contributor

@mrodm mrodm commented Oct 1, 2024

What does this PR do?

Add a new validation check to ensure that the first (newer) changelog entry defined in the changelog file is not lower than the other versions.

Example of PR releasing an old version: elastic/integrations#10800

Why is it important?

Ensure that it is not released a older version. Releasing an older version should be performed through another mechanism.

Checklist

Related issues

@mrodm mrodm self-assigned this Oct 1, 2024
@mrodm
Copy link
Copy Markdown
Contributor Author

mrodm commented Oct 1, 2024

test integrations

@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

Created or updated PR in integrations repository to test this version. Check elastic/integrations#11304

@mrodm mrodm force-pushed the new-changelog-validation-check branch from 40766d1 to 7650b1d Compare October 1, 2024 17:44
Comment on lines +86 to +93
"changelog next version manifest older version",
"1.0.0",
[]string{
"1.1.0-next",
"1.0.1",
"1.0.0",
},
false,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This test case shows the current behaviour when using next versions in changelog (but not in manifest).
Here, the manifest version 1.0.0 is not the latest stable 1.0.1.
Should this be allowed? Or, should it be revisited this code? @jsoriano

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this would be a different change, and not sure if we want to be strict on that. We can keep it as is now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok, let's keep it as is 👍

@mrodm mrodm marked this pull request as ready for review October 2, 2024 10:17
@mrodm mrodm requested a review from a team as a code owner October 2, 2024 10:17
@mrodm mrodm changed the title New changelog validation check New changelog versions validation check Oct 2, 2024
jsoriano
jsoriano previously approved these changes Oct 2, 2024
Copy link
Copy Markdown
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

LGTM, only a couple of nits

Comment on lines +86 to +93
"changelog next version manifest older version",
"1.0.0",
[]string{
"1.1.0-next",
"1.0.1",
"1.0.0",
},
false,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this would be a different change, and not sure if we want to be strict on that. We can keep it as is now.

@mrodm
Copy link
Copy Markdown
Contributor Author

mrodm commented Oct 3, 2024

Just as a note, this new validation rule will affect all packages independently of their
package spec version or package type @jsoriano

With the latest execution of "test integrations" , there were two packages that would fail "aws" and "network_traffic".

I'll check which packages running "test integrations" once more.

@mrodm
Copy link
Copy Markdown
Contributor Author

mrodm commented Oct 3, 2024

test integrations

@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

Created or updated PR in integrations repository to test this version. Check elastic/integrations#11304

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

cc @mrodm

@mrodm
Copy link
Copy Markdown
Contributor Author

mrodm commented Oct 3, 2024

Currently these are the packages failing due to package-spec related errors:

  • aws: new version check
  • network_traffic: new version check
  • elastic_connectors: missing new fields

Build: https://buildkite.com/elastic/integrations/builds/16755

@jsoriano
Copy link
Copy Markdown
Member

jsoriano commented Oct 3, 2024

  • aws: new version check
  • network_traffic: new version check

I guess these can be solved by fixing the order in the changelog? I think it would be fine to do that when we update elastic-package in integrations.

  • elastic_connectors: missing new fields

Not related to this PR (but to #801), and this is known by the package owners, to be fixed when updating elastic-package.

I think we can go on with this change.

@jsoriano
Copy link
Copy Markdown
Member

jsoriano commented Oct 3, 2024

There is already a PR open to fix AWS changelog elastic/integrations#11307

@mrodm
Copy link
Copy Markdown
Contributor Author

mrodm commented Oct 3, 2024

  • aws: new version check
  • network_traffic: new version check

I guess these can be solved by fixing the order in the changelog? I think it would be fine to do that when we update elastic-package in integrations.

In case for instance of network_traffic, it has this version as the least 1.31.1, and the second one is 1.32.0. If it is re-ordered, 1.32.0 would have less changes/"code" than 1.31.1 version.

Another option would be to release a new version 1.32.1 with the same contents as 1.31.1. Not sure what it could be set in the changelog entry for this. Probably the same data as in 1.31.1?

@jsoriano
Copy link
Copy Markdown
Member

jsoriano commented Oct 3, 2024

Another option would be to release a new version 1.32.1 with the same contents as 1.31.1. Not sure what it could be set in the changelog entry for this. Probably the same data as in 1.31.1?

Yes, actually 1.32.0 will be "reverting" the change in 1.31.1.
This was actually asked after merging. elastic/integrations#10800 (comment)

The changelog could be fixed to something like this:

- version: "1.32.1"
  changes:
    - description: Add `event.module` to datastreams
      type: bugfix
      link: https://github.com/elastic/integrations/pull/10800
- version: "1.32.0"
  changes:
    - description: `event.module` is not included in datastreams, this is an unexpected regression.
      type: breaking-change
      link: https://github.com/elastic/integrations/pull/10800
- version: "1.31.1"
  changes:
    - description: Add `event.module` to datastreams
      type: bugfix
      link: https://github.com/elastic/integrations/pull/10800
    - description: Set `map_to_ecs` to enabled by default
      type: enhancement
      link: https://github.com/elastic/integrations/pull/10785

@jsoriano
Copy link
Copy Markdown
Member

jsoriano commented Oct 3, 2024

PR open with the change I am propossing for network traffic: elastic/integrations#11322

@mrodm mrodm merged commit 75d27d8 into elastic:main Oct 3, 2024
@mrodm mrodm deleted the new-changelog-validation-check branch October 3, 2024 15:37
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