Repository navigation
Library cleanup: sibling Keys, key writes, closed DnsZone, service agent - #11
Merged
Merged
Conversation
The file is Keys/grok-bot-$infraProjectId.json beside the project directory
pulumi runs from. Path.of("").toAbsolutePath is that directory under Besom's
gradlew run. grokBotKeysDirectoryName and its domain match are gone.
A missing Keys directory fails and names the path; it is not created.
Co-authored-by: Leonid Dubinsky <dub@podval.org>
Drop the cloud-infrastructure hostname skip. The guest copy is redundant; the copy script and .envrc are what Pulumi authenticates with. Co-authored-by: Leonid Dubinsky <dub@podval.org>
Leave an existing file untouched when it already holds the decoded JSON. Co-authored-by: Leonid Dubinsky <dub@podval.org>
PodvalOrgZone is leaving podval-infra. The subclassing scaladoc goes with open. Co-authored-by: Leonid Dubinsky <dub@podval.org>
ServiceAgent is the gcp-sa-<service> principal. Its Pulumi name segment is the member string, so AlterRebbe's logical name stays the same with no alias. The Gcp.scala comment about the unpinned binding is removed. Co-authored-by: Leonid Dubinsky <dub@podval.org>
Drop the sample's grokBotKeysDirectoryName override. That comment misstated when the domain match threw. Co-authored-by: Leonid Dubinsky <dub@podval.org>
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.
Behavior-preserving for the three stacks: same resources and logical names, and the same
grokBotKeyFilepath for~/Podval/infra,~/OpenTorah/infra, and~/CognoMath/infra. Version stays0.6.0. The"9.0.0"and"6.20.0"literals stay inline. No newOutputbind on the DNS path.Do not merge. opentorah/infra is not changed here.
Working directory
Besom 0.5.2's Scala language host runs
./gradlew run --console=plainwith the process directory set to the Gradle root. For these projects that directory contains bothsettings.gradleandPulumi.yaml.Gradle 9.9's
applicationruntask is aJavaExecwhoseworkingDirdefaults toproject.projectDir.org.podval.conventionsdoes not change it. A probe of that task printed the forked JVM'suser.dirandPath.of("").toAbsolutePathas the project directory, both when the client cwd was that directory and when the daemon's own cwd was somewhere else (gradle -p). SoPath.of("")is the project directory underpulumi, and the key file is its parent'sKeysdirectory.Commits
165a93b— the grok-bot key file isKeys/grok-bot-$infraProjectId.jsonbeside the project directory.grokBotKeysDirectoryNameand its domain match are gone. A missingKeysdirectory fails and names the path; it is not created.1591ba5— write the key on every machine. The/etc/hostnameskip andisCloudInfrastructureGuestare gone. The guest file is a redundant owner-only copy; the copy script and.envrc'sGOOGLE_CREDENTIALSare what Pulumi uses. This library does not read the file it writes.414765a— write (tmp,rw-------, atomic move) only when the file is missing or its contents differ from the decoded JSON. Otherwise leave it untouched. The decision isKeyFile.shouldWriteCredentials, which the unit test calls without Besom.750e633—DnsZoneis no longeropen, and the scaladoc that existed only for subclassing is gone.e47dc29—ServiceAgentis aPrincipalfor a Google-managedgcp-sa-<service>agent. TheGcp.scalaAlterRebbe comment is removed.1b04fba— the sample drops thegrokBotKeysDirectoryNameoverride (and the comment that misstated when the domain match threw). Setup documents the siblingKeysdirectory.DnsZone and podval-infra
This commit does not compile against podval-infra until dubinsky/podval-infra PR #1 merges and
PodvalOrgZoneis gone. This PR does not edit that repo.Service agent, no alias
opentorah/infra at
e6bfee2registers the artifact-registry agent with logical nameproject:$projectId/$member/role:storage.objectViewer, memberserviceAccount:service-$projectNumber@gcp-sa-artifactregistry.iam.gserviceaccount.com, roleroles/storage.objectViewer, andgcpResourceOptions().ProjectIamalready buildsproject:$projectId/$principalResourceName/role:$role, passesprincipalMember, prependsroles/once, and usesgcpResourceOptions().ServiceAgent's name segment and member are that same member string, including.iam.gserviceaccount.com.Account's Pulumi name drops that suffix; this one does not, which is why the logical name matches and no alias is required. Pass the role unprefixed.Follow-up call site in
AlterRebbe(not in this PR):Drop the direct
IamMemberand its imports. Noaliasesoption.Verification
./gradlew buildand./gradlew -p domain-infra/besom compileScalapassed on JDK 25.