Skip to content

Conversation

teresaromero
Copy link
Contributor

@teresaromero teresaromero commented Oct 16, 2025

What does this PR do?

Adds a new property into the integration and input spec to add the minimum agent version a package is compatible with.

The new field is required after 3.6

Why is it important?

The Elastic Agent running at Kibana, might not be compatible with the integration. This helps Fleet read the agent version an integration is compatible with and is able to warn the user if is not compatible.

Checklist

  • Added unit tests

  • Updated test packages for 3.6 version to include the now required field

  • I have added test packages to test/packages that prove my change is effective.

  • I have added an entry in spec/changelog.yml.

Related issues

Resolves #970

@teresaromero teresaromero requested a review from a team as a code owner October 16, 2025 08:13
@teresaromero
Copy link
Contributor Author

test-integrations

@elastic-vault-github-plugin-prod

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

Copy link
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.

Is agent.version intended to be supported in all types of packages? In principle only input and integration packages contain agent configuration.

Copy link
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.

If this doesn't cause any issue on old versions of Fleet, I think we could allow this on any version of the spec.

- Refactor error handling in ValidateMinimumAgentVersion to check for valid semver constraints.
- Adjust test cases to reflect changes in agent.version validation logic.
- Modify integration manifest specifications to require agent.version as a constraint.
- Update example manifests to use new versioning format.
@teresaromero teresaromero changed the title Add conditions.agent.version into integration manifest spec with validation Add conditions.agent.version into integration and input manifest spec with validation Oct 17, 2025
jsoriano
jsoriano previously approved these changes Oct 23, 2025
Copy link
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.

Sorry for the delay, I thought tests were failing 🙈

LGTM!

jsoriano
jsoriano previously approved these changes Oct 23, 2025
mrodm
mrodm previously approved these changes Oct 23, 2025
Copy link
Contributor

@mrodm mrodm left a comment

Choose a reason for hiding this comment

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

Would it be possible to add a test package with format_version: 3.6.0 failing ?
Package manifest for that package could be like :

conditions:
  agent: {}

@teresaromero teresaromero dismissed stale reviews from mrodm and jsoriano via d35f37d October 23, 2025 13:53
mrodm
mrodm previously approved these changes Oct 23, 2025
Copy link
Contributor

@mrodm mrodm left a comment

Choose a reason for hiding this comment

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

Thanks!

@elasticmachine
Copy link

💚 Build Succeeded

History

@teresaromero teresaromero merged commit e205165 into elastic:main Oct 23, 2025
3 checks passed
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.

Add a new agent.version condition in manifests

4 participants