Skip to content

fix(deploy): [INFRA-673] guard sibling-POM metadata against inherited fields - #288

Closed
arrowplum wants to merge 1 commit into
mainfrom
fix/INFRA-673-jar-metadata-inherited-pom
Closed

fix(deploy): [INFRA-673] guard sibling-POM metadata against inherited fields#288
arrowplum wants to merge 1 commit into
mainfrom
fix/INFRA-673-jar-metadata-inherited-pom

Conversation

@arrowplum

@arrowplum arrowplum commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

get_jar_metadata reads a sibling POM when a JAR has no pom.properties inside it. It reads artifactId, version and groupId as direct children of <project>, so a POM that inherits any of them from <parent> resolves to an empty string and overwrites the value already derived from the filename. A child module JAR in a flat layout then structures and uploads with an empty version or package name.

Inheriting groupId and version from a parent is the normal multi-module shape, so this hits any flat layout. Each field is now assigned only when the POM actually supplies it.

INFRA-673

Guards the sibling-POM branch added by #287, now merged.

Test plan: the new inherited-POM test fails without the guard and passes with it.

alexs-aero
alexs-aero previously approved these changes Aug 7, 2026
Base automatically changed from fix/INFRA-670-artifacts-cicd-actions-permission to main August 7, 2026 16:50
@arrowplum
arrowplum dismissed alexs-aero’s stale review August 7, 2026 16:50

The base branch was changed.

- A POM inheriting fields from <parent> resolved empty and clobbered good values.
- Adds a regression test; it fails without the guard.
- The test sets -e locally because setup() disables errexit, making bare assertions inert.
@arrowplum
arrowplum force-pushed the fix/INFRA-673-jar-metadata-inherited-pom branch from 4600934 to d833abb Compare August 7, 2026 17:00
@arrowplum
arrowplum marked this pull request as draft August 11, 2026 18:43
@arrowplum

Copy link
Copy Markdown
Contributor Author

I distrust the changes I made here https://github.com/aerospike/shared-workflows/pull/288/changes#diff-bf06e3077646d14359ffbdb572db33ac4049f3108af3c8857864a1f5baf87b69 since I was copying the code above outside of the loop.

@alexs-aero That is why I assigned the ticket over to you.

@alexs-aero
alexs-aero self-requested a review August 11, 2026 20:10
@alexs-aero

Copy link
Copy Markdown
Contributor

Superseded by #293 . That branch extracts _maven_read_pom_coordinates (parent fallbacks + shared with type_detection.sh / entrypoint.sh), adopts the non-empty guard from this PR, and adds full GAV test coverage. Keeping only the guard here leaves inherited child modules uploading without groupId.

@alexs-aero alexs-aero closed this Aug 11, 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.

2 participants