spring-cloud / spring-cloud/spring-cloud-config

/features endpoint relies on metadata from manifest that might not be available

Open
#1,698 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

task
Dominant language
Java
Stars
2k
Forks
1.3k
Avg merge
2d 59m
Merged PRs (30d)
16

Description

I guess this will require a judgement call. The problem is that FeaturesEndpoint relies on this snippet:

	private void addFeature(Features features, NamedFeature feature) {
		Class<?> type = feature.getType();
		features.getEnabled()
				.add(new Feature(feature.getName(), type.getCanonicalName(),
						type.getPackage().getImplementationVersion(),
						type.getPackage().getImplementationVendor()));
	}

and the package information from the manifest is not available in general (in particular not in a GraalVM native image). It would be ideal to provide a fallback. Or just omit it if not known?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating FeaturesEndpoint and its addFeature method, then inspect how NamedFeature metadata is obtained and how the /features response is tested. Reproduce the missing manifest package information, including the GraalVM native-image case, and agree whether unknown version and vendor data should use a fallback or be omitted. Done means the chosen behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.