Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
59abd2a
Merge pull request #3744 from ActiveState/version/0-48-0-RC1
Naatan Sep 15, 2025
4bc505c
Recognize hyphenated directory names in some Rust crates.
mitchell-as Sep 17, 2025
d90dc9a
Merge pull request #3746 from ActiveState/mitchell/cp-1141
mitchell-as Sep 17, 2025
f6e2275
Recognize planning errors when evaluating a build expression.
mitchell-as Sep 22, 2025
f44123f
Merge pull request #3748 from ActiveState/mitchell/cp-1148
mitchell-as Sep 23, 2025
a7ca026
After dynamically evaluating a build plan, staging a commit needs to …
mitchell-as Sep 23, 2025
4fa93d7
Merge pull request #3749 from ActiveState/mitchell/cp-1077
mitchell-as Sep 23, 2025
996a114
loosen version verification
ucodery Sep 24, 2025
110d75d
Update readme.md
ucodery Sep 25, 2025
c18b4c8
Merge pull request #3750 from ActiveState/jeremyp/loose-version
ucodery Sep 26, 2025
1cb56a5
Create MCP branch
samueld-activator Sep 27, 2025
aa36d97
Merge pull request #3751 from ActiveState/mcp
samueld-activator Sep 29, 2025
2f6c126
Fixed failing CVE integration test.
mitchell-as Oct 14, 2025
be62ba9
Skip CVE check for commit ID.
mitchell-as Oct 15, 2025
f741ad6
Merge pull request #3752 from ActiveState/mitchell/cp-1180
mitchell-as Oct 16, 2025
bbaff61
Attach builders to artifacts.
mitchell-as Nov 3, 2025
4a942c2
Merge pull request #3753 from ActiveState/mitchell/cp-1137
mitchell-as Nov 4, 2025
57121b8
Merge pull request #3754 from ActiveState/version/0-48-1-RC1
mitchell-as Nov 19, 2025
97fbbbe
Merge pull request #3757 from ActiveState/mitchell/cp-1080
mitchell-as Nov 24, 2025
b5b06cc
Merge pull request #3761 from ActiveState/mitchell/cp-1251
mitchell-as Nov 24, 2025
08c0636
Merge pull request #3763 from ActiveState/mitchell/placate-check-format
mitchell-as Nov 24, 2025
6b7db24
Merge pull request #3765 from ActiveState/mitchell/cp-1253
mitchell-as Nov 24, 2025
b66df03
Merge pull request #3768 from ActiveState/mitchell/cp-1130
mitchell-as Nov 26, 2025
19d4909
Fix lock tests
MDrakos Nov 19, 2025
aeee917
Skip unsupported architectures
MDrakos Nov 20, 2025
58a6855
Fix more tests
MDrakos Nov 20, 2025
d79186b
Merge pull request #3769 from ActiveState/mitchell/cp-1171
mitchell-as Dec 1, 2025
88b7ed9
Merge pull request #3771 from ActiveState/mitchell/0-48-1-changelog
mitchell-as Dec 3, 2025
09da6db
Merge pull request #3774 from ActiveState/mitchell/github-actions-go-…
mitchell-as Dec 3, 2025
8a6848c
Merge pull request #3777 from ActiveState/mitchell/cp-1261
mitchell-as Dec 4, 2025
dbdf3bb
Try alternate approach for skipping ARM integration tests
MDrakos Dec 4, 2025
dc9fded
Merge branch 'master' into miked/CP-964
MDrakos Dec 4, 2025
b215dc9
Merge pull request #3755 from ActiveState/miked/CP-964
MDrakos Dec 5, 2025
a5a834e
Avoid concurrent map read/write.
mitchell-as Dec 8, 2025
9f30261
Updated changelog.
mitchell-as Dec 8, 2025
eacb0e9
Merge pull request #3783 from ActiveState/mitchell/cp-1265-2
mitchell-as Dec 8, 2025
5460f4d
Avoid integration test timeouts on Windows.
mitchell-as Dec 12, 2025
5a2aa0b
Attempt to fix failing integration tests by bumping their projects' t…
mitchell-as Dec 15, 2025
5e3a8c3
Merge pull request #3786 from ActiveState/mitchell/cp-1129-2
mitchell-as Dec 15, 2025
7976d86
Merge pull request #3787 from ActiveState/mitchell/cp-1144
mitchell-as Dec 16, 2025
bdca0d7
Updated integration test to use proper solving timeout.
mitchell-as Dec 18, 2025
b110228
Merge pull request #3788 from ActiveState/mitchell/cp-1276
mitchell-as Dec 18, 2025
89da775
Increase nightly integration test timeout.
mitchell-as Dec 18, 2025
8127b02
Merge pull request #3789 from ActiveState/mitchell/cp-1278
mitchell-as Dec 18, 2025
45fe383
Login as the integration test user during teardown.
mitchell-as Dec 19, 2025
1088462
We no longer create users in tests, so delete the associated code.
mitchell-as Dec 19, 2025
00d88b9
Merge pull request #3790 from ActiveState/mitchell/cp-1277
mitchell-as Dec 19, 2025
93d912e
Do not assume shell rc file exists during setup.
mitchell-as Dec 19, 2025
589d443
Fix S3 promoter to use the right staging area and allow beta releases.
mitchell-as Dec 22, 2025
a163625
Merge pull request #3792 from ActiveState/mitchell/cp-1280
mitchell-as Dec 23, 2025
0cfb9fd
Increase overall job timeout.
mitchell-as Dec 23, 2025
442daeb
Merge pull request #3794 from ActiveState/mitchell/cp-1278-2
mitchell-as Dec 23, 2025
68dc331
Do not log WaitForEvents warning.
mitchell-as Dec 23, 2025
f2a4d4b
Merge pull request #3796 from ActiveState/mitchell/cp-1284-2
mitchell-as Dec 24, 2025
9dd94b4
Fix install suggest integration test on Linux.
mitchell-as Dec 29, 2025
d7d453c
Merge pull request #3798 from ActiveState/mitchell/cp-1288
mitchell-as Dec 29, 2025
cf99f09
Linux 4.18.0 is now obsolete on the Platform.
mitchell-as Jan 5, 2026
e7c31d7
Merge pull request #3800 from ActiveState/mitchell/cp-1290
mitchell-as Jan 5, 2026
e70d9d6
Merge pull request #3793 from ActiveState/mitchell/cp-1282
mitchell-as Jan 6, 2026
8f480c8
Merge pull request #3801 from ActiveState/mitchell/cp-1289
mitchell-as Jan 6, 2026
c978491
Merge pull request #3802 from ActiveState/mitchell/cp-1289-2
mitchell-as Jan 6, 2026
1b021eb
Skip uninstall integration test on Windows.
mitchell-as Jan 7, 2026
37118a4
Merge pull request #3805 from ActiveState/mitchell/cp-1287-3
mitchell-as Jan 7, 2026
76781ec
Forward platform JWT and version User-Agent on the build-log-streamer…
antoine-activestate Jun 1, 2026
f7e4a3a
Merge pull request #3809 from ActiveState/antoines/ENG-1372
antoine-activestate Jun 10, 2026
5315706
Merge branch 'version/0-48-1-RC2'
mitchell-as Jun 15, 2026
51f96ff
Merge branch 'mitchell/eng-1672-2'
mitchell-as Jun 15, 2026
596ac08
Merge branch 'version/0-48-1-RC2'
mitchell-as Jul 6, 2026
800c319
Merge branch 'version/0-48-1-RC2'
mitchell-as Jul 6, 2026
4791bf6
Merge branch 'version/0-48-1-RC2'
mitchell-as Jul 8, 2026
7850ff4
Merge branch 'version/0-48-1-RC2'
mitchell-as Jul 9, 2026
fe70ee9
Merge branch 'version/0-48-1-RC3'
mitchell-as Jul 9, 2026
c3c658b
Merge branch 'version/0-48-1-RC3'
mitchell-as Jul 10, 2026
8c51240
Merge branch 'version/0-48-1-RC3'
mitchell-as Jul 10, 2026
1e94318
Merge branch 'version/0-48-1-RC3'
mitchell-as Jul 10, 2026
65f9b23
Merge branch 'version/0-48-1-RC3'
mitchell-as Jul 14, 2026
072c745
serve-org-keys: run under cmd (Windows) without bash or openssl (#3839)
icanhasmath Jul 14, 2026
aae24e7
Merge branch 'version/0-48-1-RC3'
mitchell-as Jul 15, 2026
f0ebd00
ENG-2005-Environment-variable overrides for all config options (#3843)
icanhasmath Jul 16, 2026
9eb7124
Declare asInvoker execution level for all Windows binaries
icanhasmath Jul 17, 2026
9ed629a
Merge pull request #3845 from ActiveState/marcg/CS-2357-remote-instal…
mitchell-as Jul 17, 2026
b77dde0
Merge branch 'version/0-48-1-RC3'
mitchell-as Jul 20, 2026
41767dd
Merge branch 'version/0-48-1-RC4'
mitchell-as Jul 21, 2026
f9b8af4
Merge branch 'version/0-48-1-RC4'
mitchell-as Sep 11, 2026
904939d
Merge branch 'version/0-48-2-RC1'
mitchell-as Sep 21, 2026
8f473b3
Speed up file installation on Windows (#3832)
icanhasmath Oct 21, 2026
b09f7ee
Remediate CVE-2026-63209 in klauspost/compress (#3858)
icanhasmath Oct 21, 2026
44e750f
Support dependencies for encrypted private ingredients (#3857)
icanhasmath Oct 21, 2026
895b4b2
Merge branch 'master' into version/0-48-2-RC1
icanhasmath Oct 23, 2026
076493f
Add 0.48.2 changelog.
icanhasmath Oct 22, 2026
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
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ name: Build-Test-Deploy
- beta
- release
- LTS*
- mcp
pull_request:
types:
- labeled
Expand Down Expand Up @@ -188,7 +189,7 @@ jobs:
name: Check Format
id: check_format
shell: bash
if: "!contains(fromJSON('[\"refs/heads/beta\", \"refs/heads/release\", \"refs/heads/LTS\", \"refs/heads/master\"]'), github.ref) && !startsWith(github.event.pull_request.head.ref, 'version/')"
if: "!contains(fromJSON('[\"refs/heads/beta\", \"refs/heads/release\", \"refs/heads/LTS\", \"refs/heads/master\", \"refs/heads/mcp\"]'), github.ref) && !startsWith(github.event.pull_request.head.ref, 'version/')"
run: parallelize results Check-Format

- # === Raw Unit Tests ===
Expand Down Expand Up @@ -261,7 +262,7 @@ jobs:

- # === Deploy for Integration Tests # NEVER run this against production branches. This is meant for PR deployments. ===
name: Deploy for Integration Tests # NEVER run this against production branches. This is meant for PR deployments.
if: "!contains(fromJSON('[\"refs/heads/beta\", \"refs/heads/release\", \"refs/heads/LTS\"]'), github.ref)"
if: "!contains(fromJSON('[\"refs/heads/beta\", \"refs/heads/release\", \"refs/heads/LTS\", \"refs/heads/mcp\"]'), github.ref)"
shell: bash
run: |
if [ "$GITHUB_EVENT_NAME" != "schedule" ]; then
Expand All @@ -287,7 +288,7 @@ jobs:
- # === Integration Tests ===
name: Integration Tests
id: integration_tests
if: "!contains(fromJSON('[\"refs/heads/beta\", \"refs/heads/release\", \"refs/heads/LTS\"]'), github.ref)"
if: "!contains(fromJSON('[\"refs/heads/beta\", \"refs/heads/release\", \"refs/heads/LTS\", \"refs/heads/mcp\"]'), github.ref)"
shell: bash
run: |
export CGO_ENABLED=0
Expand Down Expand Up @@ -428,7 +429,7 @@ jobs:
GITHUB_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SHA_OVERRIDE: ${{ github.event.pull_request.head.sha || github.sha }}
timeout-minutes: 10
if: contains(fromJSON('["refs/heads/master", "refs/heads/beta", "refs/heads/release", "refs/heads/LTS"]'), github.ref) || startsWith(github.event.pull_request.head.ref, 'version/')
if: contains(fromJSON('["refs/heads/master", "refs/heads/beta", "refs/heads/release", "refs/heads/LTS", "refs/heads/mcp"]'), github.ref) || startsWith(github.event.pull_request.head.ref, 'version/')

# === Deploy Steps ===
steps:
Expand Down
8 changes: 4 additions & 4 deletions activestate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,15 @@ scripts:
value: |
set -e
$constants.SET_ENV

PREFIX="remote-installer"
if [ "$DEPLOY_TO_STAGING" = "true" ]; then
PREFIX="staging/$PREFIX"
echo "Deploying remote installer to staging: $PREFIX"
else
echo "Deploying remote installer to production: $PREFIX"
fi

go run scripts/ci/s3-deployer/main.go $BUILD_TARGET_DIR/remote-installer us-east-1 state-tool $PREFIX
- name: promote-staging-to-production
language: bash
Expand All @@ -319,8 +319,8 @@ scripts:
echo "Promotion cancelled."
exit 1
fi
go run scripts/ci/s3-promoter/main.go us-east-1 state-tool

go run scripts/ci/s3-promoter/main.go us-east-1 state-tool update/state
- name: build-workflow-assets
language: bash
standalone: true
Expand Down
29 changes: 29 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,35 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.48.2

### Added

- `state publish --build` now reads `[project].dependencies` from `pyproject.toml` and publishes them as runtime
dependencies of the encrypted private ingredient. Version ranges carry over, and OS and Python version markers become
dependency conditions (unsupported markers are skipped with a notice).
- Added `state export ingredient-meta <namespace>/<name>[@version]`, which writes an existing ingredient's meta file for
use with `state publish --edit --meta`.

### Changed

- Installing runtimes on Windows is significantly faster: link paths are resolved once per tree instead of once per
file, and artifacts are linked concurrently.
- A `--meta` file's name, version, and description now feed the built wheel (flags take precedence over the meta file,
which takes precedence over `pyproject.toml`).

### Fixed

- `state publish --edit` no longer overwrites the meta file's dependencies and authors with the previous revision's,
keeps inherited dependency types and conditions, and rejects author or description changes on an existing version
up front.
- `state publish --edit --meta` with an exported meta file now edits the version named in the file rather than the
latest version.

### Security

- Updated `github.com/klauspost/compress` to v1.18.7 to remediate CVE-2026-63209 (GHSA-259r-337f-4rfw).

## 0.48.1

### Added
Expand Down
1 change: 1 addition & 0 deletions cmd/state/internal/cmdtree/cmdtree.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func New(prime *primer.Values, args ...string) *CmdTree {
newExportLogCommand(prime),
newExportRuntimeCommand(prime),
newExportBuildPlanCommand(prime),
newExportIngredientMetaCommand(prime),
deptree,
)

Expand Down
24 changes: 24 additions & 0 deletions cmd/state/internal/cmdtree/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,3 +370,27 @@ func newExportDepTreeIngredientsCommand(prime *primer.Values) *captain.Command {
cmd.SetUnstable(true)
return cmd
}

func newExportIngredientMetaCommand(prime *primer.Values) *captain.Command {
runner := export.NewIngredientMeta(prime)
params := &export.IngredientMetaParams{}

return captain.NewCommand(
"ingredient-meta",
locale.Tl("export_ingredient_meta_title", "Exporting Ingredient Meta File"),
locale.Tl("export_ingredient_meta_description", "Export the meta file of a published ingredient, to modify and pass to '[ACTIONABLE]state publish --edit --meta[/RESET]'"),
prime,
[]*captain.Flag{},
[]*captain.Argument{
{
Name: "namespace/name[@version]",
Description: locale.Tl("export_ingredient_meta_arg_description", "The ingredient to export, e.g. private/<org>/python/mypkg@1.0. Defaults to the latest version."),
Value: &params.Ingredient,
Required: true,
},
},
func(_ *captain.Command, _ []string) error {
return runner.Run(params)
},
)
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ require (
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/klauspost/compress v1.18.7 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/kr/pty v1.1.8 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,8 @@ github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQL
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
github.com/klauspost/compress v1.18.7 h1:aUyZsS4kH3QTKurYhAOwAHxllVPnOthb3vPfnF1Ehjw=
github.com/klauspost/compress v1.18.7/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
Expand Down
3 changes: 3 additions & 0 deletions internal/python/wheel/distinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ func buildMetadata(meta Metadata) []byte {
if meta.Summary != "" {
b.WriteString("Summary: " + meta.Summary + "\n")
}
for _, req := range meta.Requires {
b.WriteString("Requires-Dist: " + req + "\n")
}
return b.Bytes()
}

Expand Down
31 changes: 18 additions & 13 deletions internal/python/wheel/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@ import (

// ResolveMetadata reads srcDir's pyproject.toml [project] table and applies the
// non-empty fields of override on top, producing the metadata to pack with. It
// errors when neither source supplies a name or version.
// errors when neither source supplies a name or version. Requires always comes
// from pyproject.toml's dependencies.
func ResolveMetadata(srcDir string, override Metadata) (*Metadata, error) {
proj, err := readPyProject(filepath.Join(srcDir, "pyproject.toml"))
if err != nil {
return nil, err
}

meta := Metadata{
Name: firstNonEmpty(override.Name, proj.Name),
Version: firstNonEmpty(override.Version, proj.Version),
Summary: firstNonEmpty(override.Summary, proj.Description),
Name: firstNonEmpty(override.Name, proj.Name),
Version: firstNonEmpty(override.Version, proj.Version),
Summary: firstNonEmpty(override.Summary, proj.Description),
Requires: proj.Dependencies,
}
if meta.Name == "" || meta.Version == "" {
return nil, ErrMissingMetadata
Expand All @@ -31,9 +33,10 @@ func ResolveMetadata(srcDir string, override Metadata) (*Metadata, error) {
}

type pyProject struct {
Name string
Version string
Description string
Name string
Version string
Description string
Dependencies []string
}

// readPyProject reads the [project] table from a pyproject.toml. A missing file
Expand All @@ -49,18 +52,20 @@ func readPyProject(path string) (pyProject, error) {

var parsed struct {
Project struct {
Name string `toml:"name"`
Version string `toml:"version"`
Description string `toml:"description"`
Name string `toml:"name"`
Version string `toml:"version"`
Description string `toml:"description"`
Dependencies []string `toml:"dependencies"`
} `toml:"project"`
}
if err := toml.Unmarshal(data, &parsed); err != nil {
return pyProject{}, errs.Wrap(err, "could not parse pyproject.toml")
}
return pyProject{
Name: parsed.Project.Name,
Version: parsed.Project.Version,
Description: parsed.Project.Description,
Name: parsed.Project.Name,
Version: parsed.Project.Version,
Description: parsed.Project.Description,
Dependencies: parsed.Project.Dependencies,
}, nil
}

Expand Down
12 changes: 12 additions & 0 deletions internal/python/wheel/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ func TestResolveMetadata(t *testing.T) {
}
})

t.Run("pyproject dependencies become Requires", func(t *testing.T) {
dir := t.TempDir()
writePyproject(t, dir, "[project]\nname = \"proj\"\nversion = \"3.1\"\ndependencies = [\"requests>=2\", \"click\"]\n")
res, err := ResolveMetadata(dir, Metadata{Name: "override"})
if err != nil {
t.Fatal(err)
}
if len(res.Requires) != 2 || res.Requires[0] != "requests>=2" || res.Requires[1] != "click" {
t.Errorf("Requires = %q", res.Requires)
}
})

t.Run("caller overrides pyproject", func(t *testing.T) {
dir := t.TempDir()
writePyproject(t, dir, "[project]\nname = \"proj\"\nversion = \"3.1\"\n")
Expand Down
2 changes: 2 additions & 0 deletions internal/python/wheel/wheel.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ type Metadata struct {
Name string
Version string
Summary string
// Requires holds PEP 508 requirement strings, recorded as Requires-Dist.
Requires []string
}

// sourceFile is one file destined for the wheel, identified by its slash path
Expand Down
4 changes: 2 additions & 2 deletions internal/python/wheel/wheel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func TestPackProducesValidWheel(t *testing.T) {
})

out := t.TempDir()
wheelPath, err := Pack(src, Metadata{Name: "My.Pkg-Name", Version: "1.0", Summary: "a pkg"}, out)
wheelPath, err := Pack(src, Metadata{Name: "My.Pkg-Name", Version: "1.0", Summary: "a pkg", Requires: []string{"requests>=2"}}, out)
if err != nil {
t.Fatalf("Pack: %v", err)
}
Expand All @@ -94,7 +94,7 @@ func TestPackProducesValidWheel(t *testing.T) {

// METADATA / WHEEL contents.
metaFile := string(entries[di+"/METADATA"])
for _, want := range []string{"Metadata-Version: 2.1", "Name: My.Pkg-Name", "Version: 1.0", "Summary: a pkg"} {
for _, want := range []string{"Metadata-Version: 2.1", "Name: My.Pkg-Name", "Version: 1.0", "Summary: a pkg", "Requires-Dist: requests>=2"} {
if !bytes.Contains([]byte(metaFile), []byte(want)) {
t.Errorf("METADATA missing %q; got:\n%s", want, metaFile)
}
Expand Down
6 changes: 6 additions & 0 deletions internal/runbits/reqop_runbit/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ func UpdateAndReload(prime primeable, script *buildscript.BuildScript, oldCommit
if err := script.SetDynamic(false); err != nil {
return errs.Wrap(err, "Setting dynamic failed")
}
// StageCommitAndPoll needs to be called with atTime=now, not the previous script's atTime.
latest, err := model.FetchLatestRevisionTimeStamp(prime.Auth())
if err != nil {
return errs.Wrap(err, "Failed to fetch latest timestamp")
}
script.SetAtTime(latest, true)
}

commitParams := buildplanner.StageCommitParams{
Expand Down
40 changes: 40 additions & 0 deletions internal/runners/export/ingredientmeta.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package export

import (
"github.com/ActiveState/cli/internal/captain"
"github.com/ActiveState/cli/internal/errs"
"github.com/ActiveState/cli/internal/locale"
"github.com/ActiveState/cli/internal/runners/publish"
)

type IngredientMetaParams struct {
Ingredient captain.PackageValueNSRequired
}

type IngredientMeta struct {
prime primeable
}

func NewIngredientMeta(p primeable) *IngredientMeta {
return &IngredientMeta{p}
}

func (i *IngredientMeta) Run(params *IngredientMetaParams) error {
auth := i.prime.Auth()
if !auth.Authenticated() {
return locale.NewInputError("err_auth_required")
}

meta, err := publish.FetchMeta(params.Ingredient.Namespace, params.Ingredient.Name, params.Ingredient.Version, auth)
if err != nil {
return errs.Wrap(err, "Could not fetch ingredient meta data")
}

b, err := meta.MarshalYaml(false)
if err != nil {
return errs.Wrap(err, "Could not marshal ingredient meta data")
}

i.prime.Output().Print(string(b))
return nil
}
5 changes: 1 addition & 4 deletions internal/runners/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package install
import (
"errors"
"fmt"
"regexp"
"strings"
"time"

Expand Down Expand Up @@ -269,8 +268,6 @@ func (i *Install) resolveRequirements(packages captain.PackagesValue, ts time.Ti
return reqs, nil
}

var versionRe = regexp.MustCompile(`^\d(\.\d+)*$`)

func resolveVersion(req *requirement) error {
version := req.Requested.Version

Expand All @@ -283,7 +280,7 @@ func resolveVersion(req *requirement) error {
// Verify that the version provided can be resolved
// Note: if the requirement does not have an ingredient, it is being dynamically imported, so
// we cannot resolve its versions yet.
if versionRe.MatchString(version) && req.Resolved.ingredient != nil {
if req.Resolved.ingredient != nil {
match := false
for _, knownVersion := range req.Resolved.ingredient.Versions {
if knownVersion.Version == version {
Expand Down
Loading
Loading