Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLING-12283 : changed the config Pid to separate factoryPID & PID wit… #13

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

rishabhdaim
Copy link

…h ~ before saving it

Copy link
Contributor

@rombert rombert left a comment

Choose a reason for hiding this comment

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

Hi @rishabhdaim and thanks for the PR. I am still running some tests regarding your code changes, hopefully done today or tomorrow.

I left some comments in the meantime.

@rombert
Copy link
Contributor

rombert commented May 15, 2024

@rishabhdaim - can you please merge with the latest master commit? fd459da would make our testing easier.

@rishabhdaim rishabhdaim requested a review from rombert May 17, 2024 04:41
Copy link

sonarcloud bot commented May 20, 2024

Comment on lines +95 to +97
if (config == null) {
config = ConfigUtil.getLegacyFactoryConfig(this.getConfigurationAdmin(), this.factoryPid, null, this.configPid);
}

Choose a reason for hiding this comment

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

I don't think this is a complete fix (together with apache/sling-org-apache-sling-installer-provider-jcr#9). The original.pid property is not leveraged. Installation would need to be skipped if the original.pid property is present AND a configuration with that PID exists in config admin.

Copy link
Author

Choose a reason for hiding this comment

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

I agree that I haven't checked whether the original.pid property is present or not cause I didn't need it (may be we can remove it altogether).

Regarding the checking of config, the ConfigUtil.getLegacyFactoryConfig does check it here

Choose a reason for hiding this comment

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

I think this change here is actually "good enough".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants