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

Third Party Publishers not supported #1118

Closed
muhlba91 opened this issue Jun 5, 2023 · 3 comments · Fixed by #1120
Closed

Third Party Publishers not supported #1118

muhlba91 opened this issue Jun 5, 2023 · 3 comments · Fixed by #1120
Assignees
Labels
area/build kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Milestone

Comments

@muhlba91
Copy link

muhlba91 commented Jun 5, 2023

What happened?

not using Pulumi as the publisher in resources.go leads to an incomplete build.gradle file.

specifically the publishing configuration:

publishing {
    publications {
        mainPublication(MavenPublication) {
            groupId = ""
            artifactId = ""
            version = resolvedVersion
            from components.java
            artifact sourcesJar
            artifact javadocJar

            pom {
                inceptionYear = ""
                name = ""
                packaging = "jar"
                description = ""

                url = "https://github.com/muhlba91/pulumi-proxmoxve"

                scm {
                    connection = "git@github.com/muhlba91/pulumi-proxmoxve.git"
                    developerConnection = "git@github.com/muhlba91/pulumi-proxmoxve.git"
                    url = "https://github.com/muhlba91/pulumi-proxmoxve"
                }

                licenses {
                    license {
                        name = "The Apache License, Version 2.0"
                        url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
                    }
                }

                developers {
                    developer {
                        id = ""
                        name = ""
                        email = ""
                    }
                }
            }
        }
    }
}

in comparison the GCP provider sets Pulumi as publisher and ends up with correct parameters: https://github.com/pulumi/pulumi-gcp/blob/master/sdk/java/build.gradle#LL79C1-L120C2

the reason is a hard-coded check for Pulumi publishers in https://github.com/pulumi/pulumi-java/blob/main/pkg/codegen/java/templates_gradle.go#L119-L130.

Expected Behavior

auto-generation of java code and build.gradle supports using a third-party publisher, e.g. by setting the required parameters in the JavaBridge in resources.go. (= parameters in https://github.com/pulumi/pulumi-java/blob/main/pkg/codegen/java/templates_gradle.go#L119-L130 can be sourced from the config)

Steps to reproduce

  1. set the Publisher property in resources.go to something else than Pulumi
  2. trigger code-generation

Output of pulumi about

N/A

Additional context

example of a current WIP third-party provider supporting Java is muhlba91/pulumi-proxmoxve#65

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@muhlba91 muhlba91 added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jun 5, 2023
@dixler dixler added p0 Bugs severe enough to interrupt existing work area/build and removed needs-triage Needs attention from the triage team labels Jun 5, 2023
@dixler dixler self-assigned this Jun 5, 2023
@dixler
Copy link
Contributor

dixler commented Jun 5, 2023

Thanks for filing this and providing a lot of detail. Taking a look!

@dixler dixler removed the p0 Bugs severe enough to interrupt existing work label Jun 5, 2023
dixler pushed a commit that referenced this issue Jun 6, 2023
<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description

This PR adds `groupId`, `artifactId`, and `description` to Gradle
publications section for non-pulumi (3rd-party) publishers.

<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->

Fixes #1118 

## Checklist

<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] I have updated the
[CHANGELOG-PENDING](https://github.com/pulumi/pulumi/blob/master/CHANGELOG_PENDING.md)
file with my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Service,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Service API version
<!-- @pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Jun 6, 2023
@dixler
Copy link
Contributor

dixler commented Jun 6, 2023

We'll be cutting a release of pulumi-java tomorrow which will contain the fix for this issue. We greatly appreciate your feedback! Let us know if you run into any other issues!

@muhlba91
Copy link
Author

muhlba91 commented Jun 7, 2023

@dixler thank you for the quick fix!

checking open issues in the repository and verifying some other auto-generated files, i can confirm that these issues also prevent third-party publishers from successfully generating and publishing their packages:

any progress on these before cutting a new release?
i do believe that without these fixes there's no possibility for a third-party publisher to publish successfully.

@dixler dixler added this to the 0.90 milestone Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants