Skip to content

Commit

Permalink
fix(cloud): do not fetch secrets on community tier (#5291)
Browse files Browse the repository at this point in the history
Before this fix, we'd log a warning about secrets not existing for users
on the community tier when in fact we shouldn't be attempting to fetch
them in the first place.
  • Loading branch information
eysi09 committed Oct 24, 2023
1 parent e79fc54 commit 5eae8ba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/src/garden.ts
Expand Up @@ -1852,11 +1852,11 @@ export const resolveGardenParams = profileAsync(async function _resolveGardenPar
}
}

if (cloudProject) {
// Fetch Secrets. Not supported on the community tier (i.e. when config.domain is not set).
if (cloudProject && config.domain) {
// ensure we use the fetched/created project ID
cloudProjectId = cloudProject.id

// Only fetch secrets if the projectId exists in the cloud API instance
try {
secrets = await wrapActiveSpan(
"getSecrets",
Expand All @@ -1872,7 +1872,8 @@ export const resolveGardenParams = profileAsync(async function _resolveGardenPar
} catch (err) {
cloudLog.debug(`Fetching secrets failed with error: ${err}`)
}
} else {
// User is on enterprise domain but project could not be found
} else if (config.domain) {
cloudLog.info(
chalk.yellow(
wordWrap(
Expand Down

0 comments on commit 5eae8ba

Please sign in to comment.