Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nonononono #2895

Closed
wants to merge 113 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
8a4ad8f
Turn off terminal echo while progressbar is present.
mitchell-as Sep 20, 2023
29624e7
Merge branch version/0-42-0-RC1 to adopt changes from PR #2828
as-builds Oct 18, 2023
53389be
Merge branch version/0-42-0-RC1 to adopt changes from PR #2824
as-builds Oct 18, 2023
5d83759
Merge branch version/0-42-0-RC1 to adopt changes from PR #2816
as-builds Oct 18, 2023
da5a32d
Merge branch version/0-42-0-RC1 to adopt changes from PR #2830
as-builds Oct 18, 2023
e04270f
Merge branch version/0-42-0-RC1 to adopt changes from PR #2831
as-builds Oct 19, 2023
5ab91a1
Merge branch version/0-42-0-RC1 to adopt changes from PR #2833
as-builds Oct 20, 2023
741e32c
Merge branch version/0-42-0-RC1 to adopt changes from PR #2834
as-builds Oct 20, 2023
b54d960
Merge branch version/0-42-0-RC1 to adopt changes from PR #2829
as-builds Oct 20, 2023
ae590d5
Merge branch version/0-42-0-RC1 to adopt changes from PR #2836
as-builds Oct 20, 2023
dddd8f4
Merge branch version/0-42-0-RC1 to adopt changes from PR #2837
as-builds Oct 20, 2023
68c5afb
Merge branch version/0-42-0-RC1 to adopt changes from PR #2838
as-builds Oct 20, 2023
b58f739
Merge branch version/0-42-0-RC1 to adopt changes from PR #2840
as-builds Oct 23, 2023
c7f61e3
Merge branch version/0-42-0-RC1 to adopt changes from PR #2772
as-builds Oct 24, 2023
3b593cc
Merge branch version/0-42-0-RC1 to adopt changes from PR #2845
as-builds Oct 24, 2023
4f2adc4
Merge branch version/0-42-0-RC1 to adopt changes from PR #2844
as-builds Oct 25, 2023
3f032ba
`state import` should append, not replace all existing packages.
mitchell-as Oct 26, 2023
fd3bb8e
Silence network timeout errors when checking for updates.
mitchell-as Oct 26, 2023
aa94fd0
Merge pull request #2848 from ActiveState/mitchell/dx-2288
mitchell-as Oct 26, 2023
a155123
Merge pull request #2847 from ActiveState/mitchell/dx-2275
mitchell-as Oct 26, 2023
f9d84ee
Fixed `state import` test failure and moved that test into the correc…
mitchell-as Oct 27, 2023
49b76f9
Merge pull request #2851 from ActiveState/mitchell/dx-2304
mitchell-as Oct 27, 2023
4dcb93d
Merge branch version/0-42-0-RC1 to adopt changes from PR #2849
as-builds Oct 27, 2023
d42e4e2
Removed offline installer from the repo.
mitchell-as Oct 30, 2023
6be6751
Make structured/json output opt-in instead of opt-out.
mitchell-as Oct 30, 2023
5bb3853
Use constants for environment variable names in integration tests.
mitchell-as Oct 30, 2023
1c1269c
Drop VSCode-specific flag.
mitchell-as Oct 30, 2023
c0c8703
Merge pull request #2855 from ActiveState/mitchell/dx-1957
mitchell-as Oct 30, 2023
b4b8e23
Merge pull request #2856 from ActiveState/mitchell/dx-2159
mitchell-as Oct 30, 2023
5da4d8d
Merge pull request #2857 from ActiveState/mitchell/dx-2262
mitchell-as Oct 30, 2023
a855228
Merge branch version/0-42-0-RC1 to adopt changes from PR #2852
as-builds Oct 30, 2023
6b70818
Merge pull request #2854 from ActiveState/mitchell/dx-2160
mitchell-as Oct 30, 2023
e0e00f1
Merge branch 'version/0-42-0-RC1' into v43-merge-fix
MDrakos Oct 31, 2023
f8c4bcf
Merge pull request #2859 from ActiveState/v43-merge-fix
MDrakos Oct 31, 2023
3f7b83a
Merge branch version/0-42-0-RC1 to adopt changes from PR #2841
as-builds Oct 31, 2023
a8a60fe
Merge branch version/0-42-0-RC1 to adopt changes from PR #2842
as-builds Oct 31, 2023
de8e4f3
Remove test accidentally restored during a merge.
mitchell-as Nov 1, 2023
1632168
Added commitID for activation tests that immediately run `state pull`…
mitchell-as Nov 1, 2023
80cdf48
Merge pull request #2861 from ActiveState/mitchell/dx-2310
mitchell-as Nov 1, 2023
2706daf
Merge branch version/0-42-0-RC1 to adopt changes from PR #2860
as-builds Nov 1, 2023
fe4bfa2
Merge branch version/0-42-0-RC1 to adopt changes from PR #2846
as-builds Nov 2, 2023
4fbc1e3
Merge branch version/0-42-0-RC1 to adopt changes from PR #2853
as-builds Nov 2, 2023
ae0395a
Add error tips to structured/JSON output.
mitchell-as Nov 2, 2023
301fe30
Moved cmdlets into runbits.
mitchell-as Nov 2, 2023
0123be8
Use httpretry client for update fetcher.
mitchell-as Nov 2, 2023
4b4b5f1
Merge pull request #2862 from ActiveState/mitchell/dx-2308
mitchell-as Nov 2, 2023
e199e19
Reduce nesting.
mitchell-as Nov 2, 2023
cf0d784
Merge pull request #2865 from ActiveState/mitchell/dx-2284
mitchell-as Nov 2, 2023
ef12da9
Merge pull request #2867 from ActiveState/mitchell/dx-2132
mitchell-as Nov 2, 2023
0034f49
Merge branch 'version/0-43-0-RC1' into mitchell/dx-2213
mitchell-as Nov 2, 2023
4ee06e2
Merge branch version/0-42-0-RC1 to adopt changes from PR #2858
as-builds Nov 3, 2023
dd57061
`state` supports JSON output for `--verbose`.
mitchell-as Nov 3, 2023
3038849
Merge branch version/0-42-0-RC1 to adopt changes from PR #2850
as-builds Nov 3, 2023
4f98e76
Integration tests now fail if there are log errors unless the test op…
mitchell-as Nov 6, 2023
5c9734a
Make DNS errors input errors to inform the user something is wrong wi…
mitchell-as Nov 7, 2023
ea868af
Restore virtual environment notification.
mitchell-as Nov 8, 2023
545f0e1
Fixed tcsh activation message.
mitchell-as Nov 8, 2023
cfee491
Merge branch version/0-42-0-RC1 to adopt changes from PR #2863
as-builds Nov 8, 2023
9fa5e83
Merge pull request #2868 from ActiveState/mitchell/dx-2311
mitchell-as Nov 8, 2023
8104ce8
Merge branch 'version/0-43-0-RC1' into mitchell/dx-2213
mitchell-as Nov 8, 2023
b783202
Merge pull request #2866 from ActiveState/mitchell/dx-2213
mitchell-as Nov 8, 2023
78a2f9b
Merge branch version/0-42-0-RC1 to adopt changes from PR #2872
as-builds Nov 8, 2023
14e05b5
Fixed integration test failure.
mitchell-as Nov 9, 2023
f66597c
Merge pull request #2873 from ActiveState/mitchell/dx-2318
mitchell-as Nov 9, 2023
12da63c
Merge branch version/0-42-0-RC1 to adopt changes from PR #2875
as-builds Nov 9, 2023
ad0ad49
Merge pull request #2869 from ActiveState/mitchell/dx-1813
mitchell-as Nov 9, 2023
24ecbdc
Merge branch version/0-42-0-RC1 to adopt changes from PR #2876
as-builds Nov 10, 2023
ccae35b
Implement user-facing error when runtime artifacts fail to download.
mitchell-as Nov 10, 2023
52dc826
Initial implementation of user-facing errors for `state install` and …
mitchell-as Nov 10, 2023
b4dcffc
Replace `os.Getwd()` usage with `osutils.Getwd()`.
mitchell-as Nov 13, 2023
dc8f54e
Remove `httpreq` in favor of `retryhttp`.
mitchell-as Nov 13, 2023
e693344
Merge branch 'mitchell/dx-2050' into mitchell/dx-2214-2
mitchell-as Nov 13, 2023
7c45563
Disable terminal echo while State Tool is running.
mitchell-as Nov 13, 2023
28f0ab8
Use zsh as shell for macOS integration tests.
mitchell-as Nov 13, 2023
ae5bfd4
Merge pull request #2878 from ActiveState/mitchell/dx-2269
mitchell-as Nov 14, 2023
1db3fc8
Merge pull request #2880 from ActiveState/mitchell/dx-2312
mitchell-as Nov 14, 2023
d73bc02
Merge pull request #2879 from ActiveState/mitchell/dx-2273
mitchell-as Nov 14, 2023
303cdaf
Added another user-facing error for staged commits and a fallback.
mitchell-as Nov 14, 2023
750654a
Fixed typo.
mitchell-as Nov 14, 2023
84e2f28
Merge pull request #2883 from ActiveState/mitchell/dx-2142
mitchell-as Nov 14, 2023
94b8811
Merge pull request #2877 from ActiveState/mitchell/dx-2232
mitchell-as Nov 15, 2023
0ad534a
Added "preserve.ps1" config option for not changing PS1 in activated …
mitchell-as Nov 15, 2023
137a5d7
Merge pull request #2882 from ActiveState/mitchell/dx-2214-2
mitchell-as Nov 15, 2023
1b63b12
Fixed comment.
mitchell-as Nov 16, 2023
7fd6c94
Merge pull request #2871 from ActiveState/mitchell/dx-2240
mitchell-as Nov 20, 2023
6152a3a
Rename `preserve.ps1` config option to `preserve.prompt`.
mitchell-as Nov 20, 2023
dd86f2b
Merge branch 'version/0-43-0-RC1' into mitchell/dx-2152
mitchell-as Nov 20, 2023
5d799a6
Raise an error when updating a runtime currently in use.
mitchell-as Nov 20, 2023
f1da34b
Merge pull request #2884 from ActiveState/mitchell/dx-2152
mitchell-as Nov 20, 2023
ebf0a4b
Initial implementation of `state export log`.
mitchell-as Nov 20, 2023
4dec8a3
Consistently use single quotes in actionable commands in user-facing …
mitchell-as Nov 21, 2023
f44bf56
Only append shell notice in default RC file block.
mitchell-as Nov 21, 2023
7abc92f
Test importing more complex requirements.txt.
mitchell-as Nov 21, 2023
6eb6562
Reduce log spam.
mitchell-as Nov 21, 2023
7aba119
Merge branch version/0-42-0-RC2 to adopt changes from PR #2892
as-builds Nov 21, 2023
415a0e9
Moved process-in-use fetching to osutils package.
mitchell-as Nov 21, 2023
880d41b
Merge pull request #2885 from ActiveState/mitchell/dx-2091
mitchell-as Nov 22, 2023
6f37e92
Merge pull request #2889 from ActiveState/mitchell/dx-2240-2
mitchell-as Nov 22, 2023
dec7939
Merge pull request #2893 from ActiveState/mitchell/dx-2313
mitchell-as Nov 22, 2023
ff76fd3
Verify complex requirements were added.
mitchell-as Nov 22, 2023
f1b3545
Merge pull request #2886 from ActiveState/mitchell/dx-1593
mitchell-as Nov 22, 2023
0c4da0c
Merge pull request #2890 from ActiveState/mitchell/dx-2276
mitchell-as Nov 22, 2023
d144331
Move quotes outside of [ACTIONABLE] and [/RESET] tags.
mitchell-as Nov 22, 2023
548e5cf
Merge pull request #2887 from ActiveState/mitchell/dx-2006
mitchell-as Nov 22, 2023
ee0531f
Fixed failing test.
mitchell-as Nov 22, 2023
df4d2b2
Merge pull request #2894 from ActiveState/mitchell/dx-2333
mitchell-as Nov 22, 2023
7a9ae7a
Update version.txt
Nov 22, 2023
e299468
Do not attempt to create or update a runtime for a headless project.
mitchell-as Nov 27, 2023
eb64159
Merge pull request #2898 from ActiveState/mitchell/dx-2321
mitchell-as Nov 27, 2023
c027197
Merge branch version/0-43-0-RC1 to adopt changes from PR #2898
as-builds Nov 27, 2023
7668ce5
Give less confusing error message if a command without arguments rece…
mitchell-as Nov 28, 2023
eccb361
Merge pull request #2902 from ActiveState/mitchell/dx-2316
mitchell-as Nov 28, 2023
733457b
Merge branch version/0-43-0-RC1 to adopt changes from PR #2902
as-builds Nov 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,25 @@ jobs:

# === OS Specific Job (runs on each OS) ===
os_specific:
name: ${{ matrix.platform }}
name: ${{ matrix.sys.os }}
timeout-minutes: 90
strategy:
matrix:
go-version:
- 1.20.x
platform:
- ubuntu-20.04
- macos-11
- windows-2019
sys:
- {os: ubuntu-20.04}
- {os: macos-11, shell: zsh}
- {os: windows-2019}
fail-fast: false
runs-on: ${{ matrix.platform }}
runs-on: ${{ matrix.sys.os }}
env:
ACTIVESTATE_CI: true
ACTIVESTATE_CLI_DISABLE_RUNTIME: true
SHELL: bash
GITHUB_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
concurrency:
group: ${{ github.ref }}-${{ github.event_name }}-${{ matrix.platform }}
group: ${{ github.ref }}-${{ github.event_name }}-${{ matrix.sys.os }}
cancel-in-progress: true

# === OS Specific Steps ===
Expand Down Expand Up @@ -326,7 +326,7 @@ jobs:
if [[ "$TEST_SUITE_TAGS" == "all" ]]; then
TIMEOUT=60m
fi
SHELL='' go test -timeout $TIMEOUT -v `go list ./... | grep "integration"` -json 2>&1 | gotestfmt -hide empty-packages
SHELL='${{ matrix.sys.shell }}' go test -timeout $TIMEOUT -v `go list ./... | grep "integration"` -json 2>&1 | gotestfmt -hide empty-packages
continue-on-error: ${{ github.event_name == 'schedule' }}
env:
INTEGRATION_TEST_USERNAME: ${{ secrets.INTEGRATION_TEST_USERNAME }}
Expand Down Expand Up @@ -367,7 +367,7 @@ jobs:
"type": "section",
"text": {
"type": "plain_text",
"text": "Select the '${{ matrix.platform }}' job and expand 'Integration Tests' to inspect the failures."
"text": "Select the '${{ matrix.sys.os }}' job and expand 'Integration Tests' to inspect the failures."
}
}
]
Expand All @@ -386,7 +386,7 @@ jobs:
name: Upload Session Artifacts
uses: actions/upload-artifact@v2
with:
name: session-build-${{ matrix.platform }}
name: session-build-${{ matrix.sys.os }}
path: build/

# === Deploy job (runs once with combined artifacts from OS specific job) ===
Expand Down
37 changes: 0 additions & 37 deletions activestate.offlineinstall.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ from use by external code.
#### internal/runbits/

Packages that are made available for use by "runner" packages. In essence,
`internal/runners/internal/runbits`. A synonymous and deprecated directory
exists at `pkg/cmdlets/`.
`internal/runners/internal/runbits`.

#### internal/runners/

Expand Down
8 changes: 4 additions & 4 deletions cmd/state-installer/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import (
"github.com/ActiveState/cli/internal/output"
"github.com/ActiveState/cli/internal/primer"
"github.com/ActiveState/cli/internal/rollbar"
"github.com/ActiveState/cli/internal/runbits/errors"
"github.com/ActiveState/cli/internal/runbits/panics"
"github.com/ActiveState/cli/internal/subshell"
"github.com/ActiveState/cli/internal/subshell/bash"
"github.com/ActiveState/cli/pkg/cmdlets/errors"
"github.com/ActiveState/cli/pkg/project"
"github.com/ActiveState/cli/pkg/sysinfo"
"golang.org/x/crypto/ssh/terminal"
Expand Down Expand Up @@ -381,7 +381,7 @@ func postInstallEvents(out output.Outputer, cfg *config.Instance, an analytics.D
case params.command != "":
an.Event(anaConst.CatInstallerFunnel, "forward-command")

out.Print(fmt.Sprintf("\nRunning `[ACTIONABLE]%s[/RESET]`\n", params.command))
out.Print(fmt.Sprintf("\nRunning '[ACTIONABLE]%s[/RESET]'\n", params.command))
cmd, args := exeutils.DecodeCmd(params.command)
if _, _, err := exeutils.ExecuteAndPipeStd(cmd, args, envSlice(binPath)); err != nil {
an.EventWithLabel(anaConst.CatInstallerFunnel, "forward-command-err", err.Error())
Expand All @@ -391,7 +391,7 @@ func postInstallEvents(out output.Outputer, cfg *config.Instance, an analytics.D
case params.activate.IsValid():
an.Event(anaConst.CatInstallerFunnel, "forward-activate")

out.Print(fmt.Sprintf("\nRunning `[ACTIONABLE]state activate %s[/RESET]`\n", params.activate.String()))
out.Print(fmt.Sprintf("\nRunning '[ACTIONABLE]state activate %s[/RESET]'\n", params.activate.String()))
if _, _, err := exeutils.ExecuteAndPipeStd(stateExe, []string{"activate", params.activate.String()}, envSlice(binPath)); err != nil {
an.EventWithLabel(anaConst.CatInstallerFunnel, "forward-activate-err", err.Error())
return errs.Silence(errs.Wrap(err, "Could not activate %s, error returned: %s", params.activate.String(), errs.JoinMessage(err)))
Expand All @@ -400,7 +400,7 @@ func postInstallEvents(out output.Outputer, cfg *config.Instance, an analytics.D
case params.activateDefault.IsValid():
an.Event(anaConst.CatInstallerFunnel, "forward-activate-default")

out.Print(fmt.Sprintf("\nRunning `[ACTIONABLE]state activate --default %s[/RESET]`\n", params.activateDefault.String()))
out.Print(fmt.Sprintf("\nRunning '[ACTIONABLE]state activate --default %s[/RESET]'\n", params.activateDefault.String()))
if _, _, err := exeutils.ExecuteAndPipeStd(stateExe, []string{"activate", params.activateDefault.String(), "--default"}, envSlice(binPath)); err != nil {
an.EventWithLabel(anaConst.CatInstallerFunnel, "forward-activate-default-err", err.Error())
return errs.Silence(errs.Wrap(err, "Could not activate %s, error returned: %s", params.activateDefault.String(), errs.JoinMessage(err)))
Expand Down
10 changes: 4 additions & 6 deletions cmd/state-installer/test/integration/installer_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

"github.com/stretchr/testify/suite"

"github.com/ActiveState/cli/internal/condition"
"github.com/ActiveState/cli/internal/config"
"github.com/ActiveState/cli/internal/constants"
"github.com/ActiveState/cli/internal/environment"
Expand Down Expand Up @@ -52,9 +51,6 @@ func (suite *InstallerIntegrationTestSuite) TestInstallFromLocalSource() {
cp.Expect("Installing State Tool")
cp.Expect("Done")
cp.Expect("successfully installed")
if runtime.GOOS == "darwin" && condition.OnCI() {
cp.Expect("You are running bash on macOS")
}
suite.NotContains(cp.Output(), "Downloading State Tool")
cp.ExpectInput()
cp.SendLine("exit")
Expand Down Expand Up @@ -145,6 +141,7 @@ func (suite *InstallerIntegrationTestSuite) TestInstallIncompatible() {
// Assert output
cp.Expect("not compatible")
cp.ExpectExitCode(1)
ts.IgnoreLogErrors()
}

func (suite *InstallerIntegrationTestSuite) TestInstallNoErrorTips() {
Expand All @@ -164,6 +161,7 @@ func (suite *InstallerIntegrationTestSuite) TestInstallNoErrorTips() {

cp.ExpectExitCode(1)
suite.Assert().NotContains(cp.Output(), "Need More Help?", "error tips should not be displayed when invoking installer")
ts.IgnoreLogErrors()
}

func (suite *InstallerIntegrationTestSuite) TestInstallErrorTips() {
Expand Down Expand Up @@ -210,7 +208,7 @@ func (suite *InstallerIntegrationTestSuite) TestInstallerOverwriteServiceApp() {
)
cp.Expect("Done")
cp.SendLine("exit")
cp.ExpectExitCode(0)
cp.ExpectExit() // the return code can vary depending on shell (e.g. zsh vs. bash); just assert the installer shell exited

// State Service.app should be overwritten cleanly without error.
cp = ts.SpawnCmdWithOpts(
Expand All @@ -220,7 +218,7 @@ func (suite *InstallerIntegrationTestSuite) TestInstallerOverwriteServiceApp() {
)
cp.Expect("Done")
cp.SendLine("exit")
cp.ExpectExitCode(0)
cp.ExpectExit() // the return code can vary depending on shell (e.g. zsh vs. bash); just assert the installer shell exited
}

func (suite *InstallerIntegrationTestSuite) AssertConfig(ts *e2e.Session) {
Expand Down
Loading
Loading