[ 
https://issues.apache.org/jira/browse/BEAM-14029?focusedWorklogId=735564&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-735564
 ]

ASF GitHub Bot logged work on BEAM-14029:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Mar/22 20:36
            Start Date: 02/Mar/22 20:36
    Worklog Time Spent: 10m 
      Work Description: jrmccluskey commented on a change in pull request 
#16995:
URL: https://github.com/apache/beam/pull/16995#discussion_r818081267



##########
File path: sdks/go/pkg/beam/core/runtime/xlangx/expansionx/download.go
##########
@@ -50,13 +50,49 @@ func newJarGetter() *jarGetter {
        return &jarGetter{repository: apacheRepository, groupID: beamGroupID, 
jarCache: cacheDir}
 }
 
+// GetRepositoryURL returns the current target URL for the defaultJarGetter,
+// indicating what repository will be connected to when getting a Beam JAR.
+func GetDefaultRepositoryURL() string {
+       return defaultJarGetter.GetRepositoryURL()
+}
+
+// SetRepositoryURL updates the target URL for the defaultJarGetter, changing
+// which Maven repository will be connected to when getting a Beam JAR. Also
+// validates that it has been passed a URL and returns an error if not.
+//
+// When changing the target repository, make sure that the value is the prefix
+// up to "org/apache/beam" and that the organization of the repository matches
+// that of the default from that point on to ensure that the conversion of the
+// Gradle target to the JAR name is correct.
+func SetDefaultRepositoryURL(repoURL string) error {
+       return defaultJarGetter.SetRepositoryURL(repoURL)
+}
+
 // GetBeamJar checks a temporary directory for the desired Beam JAR, downloads 
the
 // appropriate JAR from Maven if not present, then returns the file path to the
 // JAR.
 func GetBeamJar(gradleTarget, version string) (string, error) {
        return defaultJarGetter.getJar(gradleTarget, version)
 }
 
+// GetRepositoryURL returns the current target URL for the jarGetter,
+// indicating what repository will be connected to when getting a Beam JAR.
+func (j *jarGetter) GetRepositoryURL() string {

Review comment:
       You're absolutely right, these don't need to be exported. Let me fix 
that (it also means I can de-duplicate these comment strings)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 735564)
    Time Spent: 1h 10m  (was: 1h)

> [Go SDK] Support setting maven repo in automated expansion service code 
> ------------------------------------------------------------------------
>
>                 Key: BEAM-14029
>                 URL: https://issues.apache.org/jira/browse/BEAM-14029
>             Project: Beam
>          Issue Type: Bug
>          Components: cross-language, sdk-go
>    Affects Versions: 2.37.0
>            Reporter: Jack McCluskey
>            Assignee: Jack McCluskey
>            Priority: P2
>             Fix For: 2.38.0
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Update the automated expansion service JAR fetching code to include an option 
> to set the base URL of the Maven repo, allowing users to point to RC repos or 
> other locations. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to