Default BaseURL only for community / enterprise editions#51732
Merged
Default BaseURL only for community / enterprise editions#51732
Conversation
Fix progress bar for darwin platform
bc20d6e to
22ecd0f
Compare
sclevine
approved these changes
Feb 1, 2025
| // updatePackageSuffix is directory suffix used for package extraction in tools directory. | ||
| updatePackageSuffix = "-update-pkg" | ||
| // warnMessageOSSBuild is warning exposed to the user that build type without base url is disabled. | ||
| warnMessageOSSBuild = "Client tools update is disabled. Use 'TELEPORT_CDN_BASE_URL' environment variable to set CDN base URL" |
Member
There was a problem hiding this comment.
Suggested change
| warnMessageOSSBuild = "Client tools update is disabled. Use 'TELEPORT_CDN_BASE_URL' environment variable to set CDN base URL" | |
| warnMessageOSSBuild = "Client tools updates are disabled. Use the 'TELEPORT_CDN_BASE_URL' environment variable to set the CDN base URL." |
Contributor
There was a problem hiding this comment.
Can we explain why in the error message? e.g.
Suggested change
| warnMessageOSSBuild = "Client tools update is disabled. Use 'TELEPORT_CDN_BASE_URL' environment variable to set CDN base URL" | |
| warnMessageOSSBuild = "Client tools updates are disabled because the server is licensed under AGPL but Teleport-distributed binaries are licensed under Community Edition. To use Community Edition builds or custom binaries, set the 'TELEPORT_CDN_BASE_URL' environment variable." |
| // Update downloads requested version and replace it with existing one and cleanups the previous downloads | ||
| // with defined updater directory suffix. | ||
| func (u *Updater) Update(ctx context.Context, toolsVersion string) error { | ||
| // Disable update for the OSS build if custom base URL wasn't set. |
Member
There was a problem hiding this comment.
nit: you could push this logic loser to the envBaseURL parsing in teleportPackageURLs, and return a sentinel error (errNoBaseURL).
That would prevent leaking the default base URL to other consumers of teleportPackageURLs in the future.
strideynet
approved these changes
Feb 3, 2025
hugoShaka
approved these changes
Feb 3, 2025
| // updatePackageSuffix is directory suffix used for package extraction in tools directory. | ||
| updatePackageSuffix = "-update-pkg" | ||
| // warnMessageOSSBuild is warning exposed to the user that build type without base url is disabled. | ||
| warnMessageOSSBuild = "Client tools update is disabled. Use 'TELEPORT_CDN_BASE_URL' environment variable to set CDN base URL" |
Contributor
There was a problem hiding this comment.
Can we explain why in the error message? e.g.
Suggested change
| warnMessageOSSBuild = "Client tools update is disabled. Use 'TELEPORT_CDN_BASE_URL' environment variable to set CDN base URL" | |
| warnMessageOSSBuild = "Client tools updates are disabled because the server is licensed under AGPL but Teleport-distributed binaries are licensed under Community Edition. To use Community Edition builds or custom binaries, set the 'TELEPORT_CDN_BASE_URL' environment variable." |
4825395 to
ea475fe
Compare
vapopov
added a commit
that referenced
this pull request
Feb 6, 2025
* Add requirement to set base URL for OSS builds Fix progress bar for darwin platform * Show warning only before update * Move error to teleportPackageURLs * Move error to teleportPackageURLs * Fix linter
vapopov
added a commit
that referenced
this pull request
Feb 6, 2025
* Add requirement to set base URL for OSS builds Fix progress bar for darwin platform * Show warning only before update * Move error to teleportPackageURLs * Move error to teleportPackageURLs * Fix linter
This was referenced Feb 6, 2025
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Feb 11, 2025
* Default BaseURL only for community / enterprise editions (#51732) * Add requirement to set base URL for OSS builds Fix progress bar for darwin platform * Show warning only before update * Move error to teleportPackageURLs * Move error to teleportPackageURLs * Fix linter * Fix setting modules build type for tsh and tctl (#51986) * Fix setting modules for tsh and tctl * Restore IsOSSBuild() * Add different warning messages depending on whether the update is requested by the `webapi/find` response or set via an environment variable. * Check only the build type of client tools
probakowski
pushed a commit
that referenced
this pull request
Feb 12, 2025
* Default BaseURL only for community / enterprise editions (#51732) * Add requirement to set base URL for OSS builds Fix progress bar for darwin platform * Show warning only before update * Move error to teleportPackageURLs * Move error to teleportPackageURLs * Fix linter * Fix setting modules build type for tsh and tctl (#51986) * Fix setting modules for tsh and tctl * Restore IsOSSBuild() * Add different warning messages depending on whether the update is requested by the `webapi/find` response or set via an environment variable. * Check only the build type of client tools
carloscastrojumo
pushed a commit
to carloscastrojumo/teleport
that referenced
this pull request
Feb 19, 2025
…al#51732) * Add requirement to set base URL for OSS builds Fix progress bar for darwin platform * Show warning only before update * Move error to teleportPackageURLs * Move error to teleportPackageURLs * Fix linter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR prevents AGPL editions of Teleport agents from auto-updating to non-AGPL editions of Teleport via {tsh, tctl}.
Also added fix for progress bar for Darwin platform where we download two packages for version <v17, otherwise we always show empty progress bar for second package.
Changelog: Client tools managed updates requires base URL for open source build type.
Changelog: Fixed progress bar for client tools managed updates in darwin platform for not required packages.