Removing x namespace from go/python/nodejs automation packages (#6518)

This commit is contained in:
Paul Stack 2021-03-17 11:58:46 +00:00 committed by stack72
parent fd3ec6b86f
commit 3fad2e5329
103 changed files with 56 additions and 94 deletions

View file

@ -1,7 +1,7 @@
PROJECT_NAME := Pulumi Go SDK PROJECT_NAME := Pulumi Go SDK
LANGHOST_PKG := github.com/pulumi/pulumi/sdk/v2/go/pulumi-language-go LANGHOST_PKG := github.com/pulumi/pulumi/sdk/v2/go/pulumi-language-go
VERSION := $(shell cd ../../ && pulumictl get version) VERSION := $(shell cd ../../ && pulumictl get version)
PROJECT_PKGS := $(shell go list ./pulumi/... ./pulumi-language-go/... ./common/... ./x/...| grep -v /vendor/ | grep -v templates) PROJECT_PKGS := $(shell go list ./pulumi/... ./pulumi-language-go/... ./common/... ./auto/...| grep -v /vendor/ | grep -v templates)
TESTPARALLELISM := 10 TESTPARALLELISM := 10

View file

@ -5,7 +5,7 @@ Programmatic infrastructure. Currently in Alpha.
## Godocs ## Godocs
See the full godocs for the most extensive and up to date information including full examples coverage: See the full godocs for the most extensive and up to date information including full examples coverage:
https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v2/go/x/auto?tab=doc https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v2/go/auto?tab=doc
## Examples ## Examples
@ -107,7 +107,7 @@ This repo has extensive examples and godoc content. To test out your changes loc
1. enlist in the appropriate pulumi branch: 1. enlist in the appropriate pulumi branch:
2. cd $GOPATH/src/github.com/pulumi/pulumi/sdk/go/x/auto 2. cd $GOPATH/src/github.com/pulumi/pulumi/sdk/go/x/auto
3. godoc -http=:6060 3. godoc -http=:6060
4. Navigate to http://localhost:6060/pkg/github.com/pulumi/pulumi/sdk/v2/go/x/auto/ 4. Navigate to http://localhost:6060/pkg/github.com/pulumi/pulumi/sdk/v2/go/auto/
## Known Issues ## Known Issues

View file

@ -25,14 +25,14 @@ import (
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"github.com/pulumi/pulumi/sdk/v2/go/auto/optdestroy"
"github.com/pulumi/pulumi/sdk/v2/go/auto/optpreview"
"github.com/pulumi/pulumi/sdk/v2/go/auto/optrefresh"
"github.com/pulumi/pulumi/sdk/v2/go/auto/optup"
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype" "github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens" "github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace" "github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/optdestroy"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/optpreview"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/optrefresh"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/optup"
) )
func Example() { func Example() {

View file

@ -29,16 +29,16 @@ import (
"github.com/blang/semver" "github.com/blang/semver"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/pulumi/pulumi/sdk/v2/go/auto/events"
"github.com/pulumi/pulumi/sdk/v2/go/auto/optdestroy"
"github.com/pulumi/pulumi/sdk/v2/go/auto/optpreview"
"github.com/pulumi/pulumi/sdk/v2/go/auto/optrefresh"
"github.com/pulumi/pulumi/sdk/v2/go/auto/optup"
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype" "github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens" "github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace" "github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi/config" "github.com/pulumi/pulumi/sdk/v2/go/pulumi/config"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/events"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/optdestroy"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/optpreview"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/optrefresh"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/optup"
) )
var pulumiOrg = getTestOrg() var pulumiOrg = getTestOrg()

View file

@ -19,8 +19,8 @@ package optdestroy
import ( import (
"io" "io"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/debug" "github.com/pulumi/pulumi/sdk/v2/go/auto/debug"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/events" "github.com/pulumi/pulumi/sdk/v2/go/auto/events"
) )
// Parallel is the number of resource operations to run in parallel at once during the destroy // Parallel is the number of resource operations to run in parallel at once during the destroy

View file

@ -19,8 +19,8 @@ package optpreview
import ( import (
"io" "io"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/debug" "github.com/pulumi/pulumi/sdk/v2/go/auto/debug"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/events" "github.com/pulumi/pulumi/sdk/v2/go/auto/events"
) )
// Parallel is the number of resource operations to run in parallel at once during the update // Parallel is the number of resource operations to run in parallel at once during the update

View file

@ -19,8 +19,8 @@ package optrefresh
import ( import (
"io" "io"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/debug" "github.com/pulumi/pulumi/sdk/v2/go/auto/debug"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/events" "github.com/pulumi/pulumi/sdk/v2/go/auto/events"
) )
// Parallel is the number of resource operations to run in parallel at once during the refresh // Parallel is the number of resource operations to run in parallel at once during the refresh

View file

@ -19,8 +19,8 @@ package optup
import ( import (
"io" "io"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/debug" "github.com/pulumi/pulumi/sdk/v2/go/auto/debug"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/events" "github.com/pulumi/pulumi/sdk/v2/go/auto/events"
) )
// Parallel is the number of resource operations to run in parallel at once during the update // Parallel is the number of resource operations to run in parallel at once during the update

View file

@ -105,18 +105,18 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"google.golang.org/grpc" "google.golang.org/grpc"
"github.com/pulumi/pulumi/sdk/v2/go/auto/debug"
"github.com/pulumi/pulumi/sdk/v2/go/auto/events"
"github.com/pulumi/pulumi/sdk/v2/go/auto/optdestroy"
"github.com/pulumi/pulumi/sdk/v2/go/auto/optpreview"
"github.com/pulumi/pulumi/sdk/v2/go/auto/optrefresh"
"github.com/pulumi/pulumi/sdk/v2/go/auto/optup"
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype" "github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
"github.com/pulumi/pulumi/sdk/v2/go/common/constant" "github.com/pulumi/pulumi/sdk/v2/go/common/constant"
"github.com/pulumi/pulumi/sdk/v2/go/common/resource" "github.com/pulumi/pulumi/sdk/v2/go/common/resource"
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract" "github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
"github.com/pulumi/pulumi/sdk/v2/go/common/util/rpcutil" "github.com/pulumi/pulumi/sdk/v2/go/common/util/rpcutil"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/debug"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/events"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/optdestroy"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/optpreview"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/optrefresh"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/optup"
pulumirpc "github.com/pulumi/pulumi/sdk/v2/proto/go" pulumirpc "github.com/pulumi/pulumi/sdk/v2/proto/go"
) )

View file

@ -17,8 +17,8 @@ import (
"encoding/json" "encoding/json"
"github.com/nxadm/tail" "github.com/nxadm/tail"
"github.com/pulumi/pulumi/sdk/v2/go/auto/events"
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype" "github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
"github.com/pulumi/pulumi/sdk/v2/go/x/auto/events"
) )
func watchFile(path string, receivers []chan<- events.EngineEvent) (*tail.Tail, error) { func watchFile(path string, receivers []chan<- events.EngineEvent) (*tail.Tail, error) {

View file

@ -1,3 +0,0 @@
# X (experimental)
This package and subpackages contain experimental software with limited documentation. APIs are subject to change.

View file

@ -1,3 +0,0 @@
// Package x contains experimental functionality with no guarantees of stable APIs.
// Breaking changes should be expected.
package x

View file

@ -13,12 +13,12 @@
// limitations under the License. // limitations under the License.
import * as grpc from "@grpc/grpc-js"; import * as grpc from "@grpc/grpc-js";
import { isGrpcError, ResourceError, RunError } from "../../errors"; import { isGrpcError, ResourceError, RunError } from "../errors";
import * as log from "../../log"; import * as log from "../log";
import * as runtime from "../../runtime"; import * as runtime from "../runtime";
const langproto = require("../../proto/language_pb.js"); const langproto = require("../proto/language_pb.js");
const plugproto = require("../../proto/plugin_pb.js"); const plugproto = require("../proto/plugin_pb.js");
// maxRPCMessageSize raises the gRPC Max Message size from `4194304` (4mb) to `419430400` (400mb) // maxRPCMessageSize raises the gRPC Max Message size from `4194304` (4mb) to `419430400` (400mb)
/** @internal */ /** @internal */

View file

@ -28,7 +28,7 @@ import { EngineEvent, SummaryEvent } from "./events";
import { LanguageServer, maxRPCMessageSize } from "./server"; import { LanguageServer, maxRPCMessageSize } from "./server";
import { Deployment, PulumiFn, Workspace } from "./workspace"; import { Deployment, PulumiFn, Workspace } from "./workspace";
const langrpc = require("../../proto/language_grpc_pb.js"); const langrpc = require("../proto/language_grpc_pb.js");
const secretSentinel = "[secret]"; const secretSentinel = "[secret]";

View file

@ -26,13 +26,14 @@ export * from "./stackReference";
// Export submodules individually. // Export submodules individually.
import * as asset from "./asset"; import * as asset from "./asset";
import * as automation from "./automation";
import * as dynamic from "./dynamic"; import * as dynamic from "./dynamic";
import * as iterable from "./iterable"; import * as iterable from "./iterable";
import * as log from "./log"; import * as log from "./log";
import * as provider from "./provider"; import * as provider from "./provider";
import * as runtime from "./runtime"; import * as runtime from "./runtime";
import * as utils from "./utils"; import * as utils from "./utils";
export { asset, dynamic, iterable, log, provider, runtime, utils }; export { asset, automation, dynamic, iterable, log, provider, runtime, utils };
// @pulumi is a deployment-only module. If someone tries to capture it, and we fail for some reason // @pulumi is a deployment-only module. If someone tries to capture it, and we fail for some reason
// we want to give a good message about what the problem likely is. Note that capturing a // we want to give a good message about what the problem likely is. Note that capturing a

View file

@ -26,7 +26,7 @@ import {
ProjectSettings, ProjectSettings,
Stack, Stack,
validatePulumiVersion, validatePulumiVersion,
} from "../../x/automation"; } from "../../automation";
import { asyncTest } from "../util"; import { asyncTest } from "../util";
const versionRegex = /(\d+\.)(\d+\.)(\d+)(-.*)?/; const versionRegex = /(\d+\.)(\d+\.)(\d+)(-.*)?/;

View file

@ -67,17 +67,16 @@
"cmd/run-policy-pack/index.ts", "cmd/run-policy-pack/index.ts",
"cmd/run-policy-pack/run.ts", "cmd/run-policy-pack/run.ts",
"x/index.ts", "automation/index.ts",
"x/automation/index.ts", "automation/cmd.ts",
"x/automation/cmd.ts", "automation/config.ts",
"x/automation/config.ts", "automation/localWorkspace.ts",
"x/automation/localWorkspace.ts", "automation/minimumVersion.ts",
"x/automation/minimumVersion.ts", "automation/projectSettings.ts",
"x/automation/projectSettings.ts", "automation/stackSettings.ts",
"x/automation/stackSettings.ts", "automation/server.ts",
"x/automation/server.ts", "automation/stack.ts",
"x/automation/stack.ts", "automation/workspace.ts",
"x/automation/workspace.ts",
"tests/config.spec.ts", "tests/config.spec.ts",
"tests/init.spec.ts", "tests/init.spec.ts",

View file

@ -1,17 +0,0 @@
// Copyright 2016-2020, Pulumi Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import * as automation from "./automation";
export { automation };

View file

@ -96,7 +96,7 @@ from ._types import (
set, set,
) )
from . import runtime, dynamic, policy, x from . import runtime, dynamic, policy, automation
__all__ = [ __all__ = [
# asset # asset
@ -169,5 +169,5 @@ __all__ = [
"runtime", "runtime",
"dynamic", "dynamic",
"policy", "policy",
"x" "automation"
] ]

View file

@ -19,10 +19,10 @@ from contextlib import suppress
import grpc import grpc
from ._workspace import PulumiFn from ._workspace import PulumiFn
from ... import log from .. import log
from ...runtime.proto import language_pb2, plugin_pb2, LanguageRuntimeServicer from ..runtime.proto import language_pb2, plugin_pb2, LanguageRuntimeServicer
from ...runtime import run_in_stack, reset_options, set_all_config from ..runtime import run_in_stack, reset_options, set_all_config
from ...errors import RunError from ..errors import RunError
_py_version_less_than_3_7 = sys.version_info[0] == 3 and sys.version_info[1] < 7 _py_version_less_than_3_7 = sys.version_info[0] == 3 and sys.version_info[1] < 7

View file

@ -29,8 +29,8 @@ from .errors import StackAlreadyExistsError
from .events import OpMap, EngineEvent, SummaryEvent from .events import OpMap, EngineEvent, SummaryEvent
from ._server import LanguageServer from ._server import LanguageServer
from ._workspace import Workspace, PulumiFn, Deployment from ._workspace import Workspace, PulumiFn, Deployment
from ...runtime.settings import _GRPC_CHANNEL_OPTIONS from ..runtime.settings import _GRPC_CHANNEL_OPTIONS
from ...runtime.proto import language_pb2_grpc from ..runtime.proto import language_pb2_grpc
_DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ' _DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'

Some files were not shown because too many files have changed in this diff Show more