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

Publish file paths for plain text files changes in monitor

Open
#355 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I want to host SpringTemplates (thymleaf) on GitHub. The Template Engine read templates from local cloned git repo managed by spring cloud config. Therefore i configured the base path of the repo and use that path for template file lookup using local file resolution of thyme leaf.
No if someone triggers a push event into my GitHub repo i want that the /monitor event will trigger my template cache to be evicted for the files that change. Therefore in need to know exactly which files changed, that is supported by the GitHub extractor. However the Extractor does not push all types of changes made in my git repo towards the spring application event bus. Only application_._ files are passed on, all other ressouces ate stuck by PropertyPathEndpoint.notifyByPath() {...guessServiceName();..}.
According to spring cloud config http://projects.spring.io/spring-cloud/spring-cloud.html#_serving_plain_text it shall also support plain text files.

The current Event does not publish all relevant info:

this.applicationEventPublisher.publishEvent(new RefreshRemoteApplicationEvent(this,
                                    this.contextId, service));

The filepath (which is already available for github) must also be part of the event and it shall be propagated to only for application_._ files. Maybe another event (EnvironmentChangeRemoteApplicationEvent ??) shall be triggered in parallel for this file context specific information.

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 tracing the GitHub extractor output into PropertyPathEndpoint.notifyByPath() and the RefreshRemoteApplicationEvent publication. Compare the proposed EnvironmentChangeRemoteApplicationEvent behavior, then define how changed file paths reach the event bus for plain-text resources; done means relevant file changes can drive targeted cache eviction.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github, java, spring, spring-boot
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.