Skip to content

Commit 6df75bd

Browse files
authored
Merge pull request ActiveState#3349 from ActiveState/version/0-46-0-RC1
Version 0.46.0-RC1
2 parents 3a96eae + a09880c commit 6df75bd

File tree

504 files changed

+12831
-26556
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

504 files changed

+12831
-26556
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
runs-on: ${{ matrix.sys.os }}
4646
env:
4747
ACTIVESTATE_CI: true
48-
ACTIVESTATE_CLI_DISABLE_RUNTIME: true
4948
SHELL: bash
5049
GITHUB_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5150
GITHUB_SHA_OVERRIDE: ${{ github.event.pull_request.head.sha || github.sha }}
@@ -69,7 +68,7 @@ jobs:
6968

7069
- # === Install Go ===
7170
name: Install Go
72-
uses: actions/setup-go@v3
71+
uses: actions/setup-go@v5
7372
with:
7473
go-version: ${{ matrix.go-version }}
7574

@@ -393,20 +392,42 @@ jobs:
393392

394393
- # === Upload Session Artifacts ===
395394
name: Upload Session Artifacts
396-
uses: actions/upload-artifact@v2
395+
uses: actions/upload-artifact@v4
397396
with:
398397
name: session-build-${{ matrix.sys.os }}
399398
path: build/
400399

400+
scan:
401+
name: Scan
402+
needs:
403+
- os_specific
404+
runs-on: ubuntu-latest
405+
steps:
406+
- name: Download All Build Session Artifacts
407+
uses: actions/download-artifact@v4
408+
with:
409+
path: build/
410+
merge-multiple: true
411+
412+
- name: Scan for CVEs
413+
if: runner.os == 'Linux'
414+
uses: aquasecurity/[email protected]
415+
with:
416+
scan-type: rootfs
417+
scan-ref: build
418+
list-all-pkgs: true
419+
ignore-unfixed: true
420+
format: table
421+
exit-code: 1
422+
401423
# === Deploy job (runs once with combined artifacts from OS specific job) ===
402424
deploy:
403425
name: Deploy
404426
needs:
405-
- os_specific
427+
- scan
406428
runs-on: ubuntu-20.04
407429
env:
408430
ACTIVESTATE_CI: true
409-
ACTIVESTATE_CLI_DISABLE_RUNTIME: true
410431
SHELL: bash
411432
GITHUB_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
412433
GITHUB_SHA_OVERRIDE: ${{ github.event.pull_request.head.sha || github.sha }}
@@ -424,19 +445,20 @@ jobs:
424445

425446
- # === Install Go ===
426447
name: Install Go
427-
uses: actions/setup-go@v3
448+
uses: actions/setup-go@v5
428449
with:
429-
go-version: ${{ matrix.go-version }}
450+
go-version: 1.22.x
430451

431452
- # === Install State Tool ===
432453
name: Install State Tool
433454
uses: ActiveState/setup-state-tool@v1
434455

435456
- # === Download All Build Session Artifacts ===
436457
name: Download All Build Session Artifacts
437-
uses: actions/download-artifact@v2
458+
uses: actions/download-artifact@v4
438459
with:
439460
path: build/
461+
merge-multiple: true
440462

441463
- # === Sanitize All Session Artifacts ===
442464
name: Sanitize All Session Artifacts
@@ -481,7 +503,7 @@ jobs:
481503
482504
- # === Cleanup Session Artifacts ===
483505
name: Cleanup Session Artifacts
484-
uses: geekyeggo/delete-artifact@v1
506+
uses: geekyeggo/delete-artifact@v5
485507
with:
486508
name: |
487509
session-build-ubuntu-20.04
@@ -490,7 +512,7 @@ jobs:
490512
491513
- # === Upload Artifacts ===
492514
name: Upload Artifacts
493-
uses: actions/upload-artifact@v2
515+
uses: actions/upload-artifact@v4
494516
with:
495517
name: build
496518
path: build/

.github/workflows/propagate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ jobs:
2525

2626
- # === Checkout code ===
2727
name: Checkout code
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929
with:
3030
fetch-depth: 0
3131
token: ${{ secrets.GH_AUTOMATION_TOKEN }}
3232

3333
- # === Install Go ===
3434
name: Install Go
35-
uses: actions/setup-go@v3
35+
uses: actions/setup-go@v5
3636
with:
3737
go-version: '1.22.x'
3838

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626
- # Checkout Code
2727
name: Checkout code
28-
uses: actions/checkout@v2
28+
uses: actions/checkout@v5
2929

3030
- # === Install Go ===
3131
name: Install Go

.github/workflows/verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
- # === Install Go ===
3636
name: Install Go
37-
uses: actions/setup-go@v3
37+
uses: actions/setup-go@v5
3838
with:
3939
go-version: '1.22.x'
4040

.golangci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ linters-settings:
3232
- (*github.com/ActiveState/cli/internal/testhelpers/e2e.SpawnedCmd).Wait
3333
- (*github.com/ActiveState/cli/internal/testhelpers/e2e.Session).ClearCache
3434
- (*github.com/ActiveState/cli/internal/testhelpers/e2e.Dirs).Close
35-
- (*github.com/ActiveState/cli/pkg/platform/runtime/artifactcache.testArtifactCache).Store
3635
- github.com/ActiveState/cli/internal/testhelpers/osutil.RemoveConfigFile
3736
- (*github.com/ActiveState/cli/internal/logging.standardHandler).Emit
3837
- (*github.com/ActiveState/cli/internal/logging.fileHandler).Emit

activestate.generators.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ scripts:
8484
language: bash
8585
description: Generates graph server and client files
8686
value: |
87-
go install github.com/99designs/[email protected].24
87+
go install github.com/99designs/[email protected].46
8888
cd ./cmd/state-svc && gqlgen --verbose
8989
- name: generate-test-update
9090
language: bash

activestate.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,20 @@ scripts:
5555
exit 1
5656
fi
5757
if ! type "golangci-lint" &> /dev/null; then
58-
echo "golangci-lint was not found on your PATH, installing .."
58+
echo "golangci-lint was not found on your PATH. Installing .."
5959
go install github.com/golangci/golangci-lint/cmd/[email protected]
6060
fi
6161
git config core.hooksPath .githooks
6262
if ! type "swagger" &> /dev/null; then
63-
echo "swagger was not found on your PATH, installing .."
63+
echo "swagger was not found on your PATH. Installing .."
6464
go install github.com/go-swagger/go-swagger/cmd/[email protected]
6565
fi
6666
if ! type "actionlint" &> /dev/null; then
67-
echo "actionlint was not found on your PATH, installing .."
67+
echo "actionlint was not found on your PATH. Installing .."
6868
go install github.com/rhysd/actionlint/cmd/[email protected]
6969
fi
7070
if { [[ "$GOOS" == "windows" ]] || [[ "$OS" == "Windows_NT" ]]; } && ! type "goversioninfo" &> /dev/null; then
71-
echo "goversioninfo was not found on your PATH, installing .."
71+
echo "goversioninfo was not found on your PATH. Installing .."
7272
GOFLAGS="" go install github.com/josephspurrier/goversioninfo/cmd/[email protected]
7373
fi
7474
- name: install-deps-os
@@ -81,7 +81,7 @@ scripts:
8181
if: ne .Shell "cmd"
8282
value: |
8383
if { [[ "$GOOS" == "windows" ]] || [[ "$OS" == "Windows_NT" ]]; } && ! type "goversioninfo" &> /dev/null; then
84-
echo "goversioninfo was not found on your PATH, installing .."
84+
echo "goversioninfo was not found on your PATH. Installing .."
8585
GOFLAGS="" go install github.com/josephspurrier/goversioninfo/cmd/[email protected]
8686
fi
8787
- name: preprocess
@@ -319,7 +319,7 @@ scripts:
319319
build/state --help
320320
- name: debug
321321
language: bash
322-
description: "Runs a remote debugger, that can be hooked into from your IDE, example usage: `state run debug activate` (will debug `state activate`)"
322+
description: "Runs a remote debugger that can be hooked into from your IDE. Example usage: `state run debug activate` (will debug `state activate`)"
323323
standalone: true
324324
value: dlv debug --headless --listen=:2346 --api-version=2 github.com/ActiveState/cli/cmd/state -- $@
325325
- name: scripted

changelog.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,44 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to
77
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## 0.46.0
10+
11+
### Added
12+
13+
* Added the `state export buildplan` command, which as the name implies exports the buildplan for a project commit.
14+
* We now show dependency and CVE information when running `state commit` and `state import`, just like we do for
15+
`state install`.
16+
* We now show CVE information when running `state checkout`.
17+
* When working with complex buildscripts that use ingredient revisions or more complex build rules we will now report
18+
on these in `state manifest`.
19+
* We now support CycloneDX and SPDX SBOMs for `state import`.
20+
* We now provide unstable support for powershell when running `state shell` and other commands that interact with the
21+
shell.
22+
23+
### Changed
24+
25+
* Runtime installations will now use a central artifact depot, and will use symlinks on mac/linux and hardlinks on
26+
windows to deploy them for your various runtime. Reducing disk usage, and increasing installation speeds.
27+
* We may still copy instead of link artifacts if the artifact in question requires runtime specific modifications.
28+
* Streamlined the UI for sourcing runtimes, it should now be consistent across commands.
29+
* We now also show dependency information when updating requirements.
30+
* When running `state export log` with the `-i` (index) flag we no longer consider logs for the current command.
31+
32+
### Fixed
33+
34+
* Running `state init` with a language version specific to the minor version would sometimes not resolve the language.
35+
* `state manifest` would sometimes not show the resolved version.
36+
* Missing CVE information for languages in `state manifest`.
37+
* Uninstalling state tool would leave you in a broken state that required manual intervention if and when the uninstall
38+
failed halfway through.
39+
* We would sometimes redundantly show available update information.
40+
* Uninstalling State Tool on Windows would leave behind start menu shortcuts.
41+
* Progress indication when solving and creating a commit (eg. when running `state install`) would sometimes overlap.
42+
* Made several improvements to dependency calculations, which should give user a more accurate picture of what
43+
dependencies were brought in by a given change.
44+
* This only affects UI/UX. It does not imply any build or runtime functionality.
45+
* Many localization and error message improvements and additions to help guide users to solutions.
46+
947
## 0.45.1
1048

1149
### Fixed

cmd/state-exec/meta.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"path/filepath"
77
"strings"
88

9-
"github.com/ActiveState/cli/pkg/platform/runtime/executors/execmeta"
9+
"github.com/ActiveState/cli/pkg/executors/execmeta"
1010
)
1111

1212
const (

cmd/state-installer/cmd.go

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func main() {
9393
var err error
9494
cfg, err = config.New()
9595
if err != nil {
96-
multilog.Error("Could not set up configuration handler: " + errs.JoinMessage(err))
96+
multilog.Critical("Could not set up configuration handler: " + errs.JoinMessage(err))
9797
fmt.Fprintln(os.Stderr, err.Error())
9898
exitCode = 1
9999
}
@@ -108,7 +108,7 @@ func main() {
108108
Interactive: false,
109109
})
110110
if err != nil {
111-
multilog.Error("Could not set up output handler: " + errs.JoinMessage(err))
111+
multilog.Critical("Could not set up output handler: " + errs.JoinMessage(err))
112112
fmt.Fprintln(os.Stderr, err.Error())
113113
exitCode = 1
114114
return
@@ -148,7 +148,7 @@ func main() {
148148
"state-installer",
149149
"",
150150
"Installs or updates the State Tool",
151-
primer.New(nil, out, nil, nil, nil, nil, cfg, nil, nil, an),
151+
primer.New(out, cfg, an),
152152
[]*captain.Flag{ // The naming of these flags is slightly inconsistent due to backwards compatibility requirements
153153
{
154154
Name: "command",
@@ -251,6 +251,8 @@ func execute(out output.Outputer, cfg *config.Instance, an analytics.Dispatcher,
251251

252252
an.Event(anaConst.CatInstallerFunnel, "exec")
253253

254+
usingDefaultInstallPath := params.path == ""
255+
254256
if params.path == "" {
255257
var err error
256258
params.path, err = installation.InstallPathForChannel(constants.ChannelName)
@@ -296,6 +298,17 @@ func execute(out output.Outputer, cfg *config.Instance, an analytics.Dispatcher,
296298
return errs.Wrap(err, "Could not check if install path is empty")
297299
}
298300
if !empty {
301+
if usingDefaultInstallPath {
302+
// We're having trouble pinning down why these errors are occurring, so report the list of
303+
// existing files to Rollbar to help diagnose.
304+
if files, err := os.ReadDir(params.path); err == nil {
305+
fileList := []string{}
306+
for _, file := range files {
307+
fileList = append(fileList, filepath.Join(params.path, file.Name()))
308+
}
309+
rollbar.Critical("Installation path must be an empty directory: %s\nExisting files:\n%s", params.path, strings.Join(fileList, "\n"))
310+
}
311+
}
299312
return locale.NewInputError("err_install_nonempty_dir", "Installation path must be an empty directory: {{.V0}}", params.path)
300313
}
301314
}

0 commit comments

Comments
 (0)