Skip to content

Resolve default package managers in config worker#4776

Merged
sschuberth merged 2 commits intomainfrom
default-package-managers
Apr 29, 2026
Merged

Resolve default package managers in config worker#4776
sschuberth merged 2 commits intomainfrom
default-package-managers

Conversation

@mnonnenmacher
Copy link
Copy Markdown
Contributor

@mnonnenmacher mnonnenmacher commented Mar 31, 2026

Move the getDefaultPackageManagers logic from the analyzer worker to
the config worker so that the default package managers are resolved
before the validation script runs. This makes the resolution transparent
to the script, which can now see and potentially override the defaults.

The resolved defaults are stored in resolvedJobConfigs, keeping all
job config resolution in one place. The analyzer worker no longer needs
to inject default package managers at runtime.

This is also a preparation for applying plugin templates in the config
worker which requires that the actually used package managers are
already known.

@mnonnenmacher mnonnenmacher force-pushed the default-package-managers branch 2 times, most recently from c947e1e to eda7cc6 Compare April 28, 2026 15:44
@mnonnenmacher mnonnenmacher marked this pull request as ready for review April 28, 2026 15:48
* template is assigned to the organization, or `null` if no template exists for the organization.
*/
internal fun getTemplateForOrganization(
fun getTemplateForOrganization(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Commit message nit: "plugin templated" -> "plugin template"

@mnonnenmacher mnonnenmacher force-pushed the default-package-managers branch from eda7cc6 to ccbf83a Compare April 28, 2026 16:52
@mnonnenmacher mnonnenmacher marked this pull request as draft April 28, 2026 17:06
mnonnenmacher and others added 2 commits April 28, 2026 22:13
Move the `getDefaultPackageManagers` logic from the analyzer worker to
the config worker so that the default package managers are resolved
before the validation script runs. This makes the resolution transparent
to the script, which can now see and potentially override the defaults.

The resolved defaults are stored in `resolvedJobConfigs`, keeping all
job config resolution in one place. The analyzer worker no longer needs
to inject default package managers at runtime.

This is also a preparation for applying plugin templates in the config
worker which requires that the actually used package managers are
already known.

Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.org>
If a plugin is set to `RESTRICTED`, it is only available in
organizations where a plugin template is configured for the plugin.
Respect that when determining the default list of enabled package
managers in the config worker.

Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.io>
@mnonnenmacher mnonnenmacher force-pushed the default-package-managers branch from ccbf83a to d98e0a1 Compare April 28, 2026 20:14
@mnonnenmacher mnonnenmacher marked this pull request as ready for review April 28, 2026 20:14
@sschuberth sschuberth added this pull request to the merge queue Apr 29, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Apr 29, 2026
@sschuberth sschuberth added this pull request to the merge queue Apr 29, 2026
Merged via the queue into main with commit 0823f60 Apr 29, 2026
34 checks passed
@sschuberth sschuberth deleted the default-package-managers branch April 29, 2026 07:19
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