Skip to content

Adjust property names for package dependencies to original proposal#1102

Merged
jsoriano merged 4 commits intoelastic:mainfrom
jsoriano:review-test-dependencies
Mar 3, 2026
Merged

Adjust property names for package dependencies to original proposal#1102
jsoriano merged 4 commits intoelastic:mainfrom
jsoriano:review-test-dependencies

Conversation

@jsoriano
Copy link
Copy Markdown
Member

@jsoriano jsoriano commented Mar 3, 2026

What does this PR do?

When declaring package dependencies, use "package" in all cases for the package name, so all declarations are consistent. This is also coherent with the original proposal.

Also, add "source" in test dependencies, as a way to indicate the source of the package to install or reuse, instead of retrieving it form the package registry. This is useful for development of packages that live in the same repository.

Thanks @teresaromero for reporting!

Why is it important?

For consistency and coherence with the original proposal.

Checklist

  • I have added test packages to test/packages that prove my change is effective.
  • I have added an entry in spec/changelog.yml. No need as this modifies a feature not released yet.

Related issues

@jsoriano jsoriano self-assigned this Mar 3, 2026
@jsoriano jsoriano requested a review from a team as a code owner March 3, 2026 12:06
@jsoriano jsoriano changed the title Adjust property names to original proposal Adjust property names for package dependencies to original proposal Mar 3, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e0b0460 and f94d5eb.

📒 Files selected for processing (3)
  • code/go/internal/validator/semantic/validate_test_package_requirements.go
  • code/go/internal/validator/semantic/validate_test_package_requirements_test.go
  • spec/integration/data_stream/_dev/test/config.spec.yml

📝 Walkthrough

Walkthrough

Parsing of manifest requirements was changed from the name field to package across semantic validators and tests. Validators now read package (and version when present), added a helper to validate source paths, and broadened data-stream test-config patterns. Integration test schema was updated to allow either a package+version object or a source object (oneOf). Test fixtures, manifests, and specs were updated and new test files for source-based requirements were added.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@code/go/internal/validator/semantic/validate_test_package_requirements.go`:
- Around line 245-251: In validateTestRequirementSource, reject absolute source
paths instead of relying on filepath.Join (which skips the config dir for
absolute inputs); add an explicit check using filepath.IsAbs(source) and return
a specerrors.NewStructuredErrorf indicating the source must be a relative path
before computing targetPath and calling os.Stat. Ensure you reference
validateTestRequirementSource and use filepath.IsAbs(source) to guard against
absolute paths.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2444365 and e0b0460.

📒 Files selected for processing (3)
  • code/go/internal/validator/semantic/validate_test_package_requirements.go
  • code/go/internal/validator/semantic/validate_test_package_requirements_test.go
  • test/packages/good_requires/_dev/test/config.yml

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

cc @jsoriano

teresaromero
teresaromero previously approved these changes Mar 3, 2026
@teresaromero teresaromero self-requested a review March 3, 2026 14:18
@teresaromero teresaromero dismissed their stale review March 3, 2026 14:40

had some thoughts after approval, left couple comments

teresaromero
teresaromero previously approved these changes Mar 3, 2026
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