Skip to content

Commit

Permalink
update 10.0 alpha (#3101)
Browse files Browse the repository at this point in the history
* release v9.4.0 (#3079)

* v9.4.0

* chore: remove telemetry docs

* update docs

* feat(addons): add inference disclaimer (#3076)

* Add disclaimer

* Add test

* Update inference regex

Co-authored-by: Santiago Bosio <[email protected]>

---------

Co-authored-by: Santiago Bosio <[email protected]>

* chore: read isStableRelease from JSON in publish-docs job (#3089)

* v9.5.0 (#3091)

* Update artifact download/uplaod to v4, remove extra docs md upload (#3096)

* clean up doc merges

---------

Co-authored-by: Katy Bowman <[email protected]>
Co-authored-by: Zane Whitfield <[email protected]>
Co-authored-by: Santiago Bosio <[email protected]>
  • Loading branch information
4 people authored Nov 19, 2024
1 parent df31ab2 commit c522259
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-cli-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ jobs:
needs: [ get-version-channel, promote ]
uses: ./.github/workflows/devcenter-doc-update.yml
with:
isStableRelease: ${{ needs.get-version-channel.outputs.isStableRelease }}
isStableRelease: ${{ fromJSON(needs.get-version-channel.outputs.isStableRelease) }}
secrets: inherit
5 changes: 0 additions & 5 deletions .github/workflows/devcenter-doc-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,3 @@ jobs:
./scripts/postrelease/dev_center_docs
env:
HEROKU_DEVCENTER_API_KEY: ${{ secrets.HEROKU_DEVCENTER_API_KEY }}
- name: Upload md file as artifact
uses: actions/upload-artifact@v3
with:
name: heroku-cli-commands
path: /tmp/heroku-cli-commands.md
12 changes: 6 additions & 6 deletions .github/workflows/pack-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: yarn --immutable --network-timeout 1000000
- name: Building deb
run: yarn oclif pack:deb --root="./packages/cli"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packed-deb
path: /home/runner/work/cli/cli/packages/cli/dist
Expand All @@ -40,7 +40,7 @@ jobs:
run: yarn --immutable --network-timeout 1000000
- name: Building tarballs
run: yarn oclif pack tarballs --root="./packages/cli"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packed-tarballs
path: /home/runner/work/cli/cli/packages/cli/dist
Expand All @@ -57,14 +57,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: sudo mkdir -p /build
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: packed-deb
path: /home/runner/work/cli/cli/packages/cli/dist
- run: |
cd /home/runner/work/cli/cli/packages/cli/dist/deb
/home/runner/work/cli/cli/packages/cli/scripts/sign/deb
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: signed-deb
path: /home/runner/work/cli/cli/packages/cli/dist
Expand All @@ -81,12 +81,12 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: sudo mkdir -p /build
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: signed-deb
path: /home/runner/work/cli/cli/packages/cli/dist

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: packed-tarballs
path: /home/runner/work/cli/cli/packages/cli/dist
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [10.0.0-alpha.2](https://github.com/heroku/cli/compare/v10.0.0-alpha.1...v10.0.0-alpha.2) (2024-11-12)
# [9.5.0](https://github.com/heroku/cli/compare/v9.4.0...v9.5.0) (2024-11-13)


### Features

* **addons:** add inference disclaimer ([#3076](https://github.com/heroku/cli/issues/3076)) ([6d33a56](https://github.com/heroku/cli/commit/6d33a5653df971680826d7b6006932a5920a4b93))





# [9.4.0](https://github.com/heroku/cli/compare/v9.3.2...v9.4.0) (2024-11-11)


### Bug Fixes
Expand Down
8 changes: 4 additions & 4 deletions docs/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ Create a new add-on resource.

```
USAGE
$ heroku addons:create SERVICE:PLAN... -a <value> [--name <value>] [--as <value>] [--confirm <value>] [--wait]
$ heroku addons:create SERVICE:PLAN -a <value> [--name <value>] [--as <value>] [--confirm <value>] [--wait]
[-r <value>]
ARGUMENTS
SERVICE:PLAN... unique identifier or unique name of the add-on service plan
SERVICE:PLAN unique identifier or unique name of the add-on service plan
FLAGS
-a, --app=<value> (required) app to run command against
Expand Down Expand Up @@ -115,10 +115,10 @@ permanently destroy an add-on resource

```
USAGE
$ heroku addons:destroy ADDONNAME... [-f] [-c <value>] [--wait] [-a <value>] [-r <value>]
$ heroku addons:destroy ADDONNAME [-f] [-c <value>] [--wait] [-a <value>] [-r <value>]
ARGUMENTS
ADDONNAME... unique identifier or globally unique name of the add-on
ADDONNAME unique identifier or globally unique name of the add-on
FLAGS
-a, --app=<value> app to run command against
Expand Down
8 changes: 4 additions & 4 deletions docs/pg.md
Original file line number Diff line number Diff line change
Expand Up @@ -1137,10 +1137,10 @@ USAGE
$ heroku pg:settings:auto-explain [DATABASE...] [VALUE...] -a <value> [-r <value>]
ARGUMENTS
DATABASE... config var containing the connection string, unique name, ID, or alias of the database. To access another
app's database, prepend the app name to the config var or alias with `APP_NAME::` . If omitted, we use
DATABASE_URL.
VALUE... boolean indicating if execution plans of queries will be logged for future connections
DATABASE config var containing the connection string, unique name, ID, or alias of the database. To access another
app's database, prepend the app name to the config var or alias with `APP_NAME::` . If omitted, we use
DATABASE_URL.
VALUE boolean indicating if execution plans of queries will be logged for future connections
FLAGS
-a, --app=<value> (required) app to run command against
Expand Down
12 changes: 12 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [10.0.0-alpha.2](https://github.com/heroku/cli/compare/v10.0.0-alpha.1...v10.0.0-alpha.2) (2024-11-12)
# [9.5.0](https://github.com/heroku/cli/compare/v9.4.0...v9.5.0) (2024-11-13)


### Features

* **addons:** add inference disclaimer ([#3076](https://github.com/heroku/cli/issues/3076)) ([6d33a56](https://github.com/heroku/cli/commit/6d33a5653df971680826d7b6006932a5920a4b93))





# [9.4.0](https://github.com/heroku/cli/compare/v9.3.2...v9.4.0) (2024-11-11)


### Bug Fixes
Expand Down
20 changes: 20 additions & 0 deletions packages/cli/src/commands/addons/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,32 @@ export default class Create extends Command {
const argv = (restParse.argv as string[])
// oclif duplicates specified args in argv
.filter(arg => arg !== servicePlan)
const inferenceRegex = /^heroku-inference/
const isInferenceAddon = inferenceRegex.test(servicePlan)

if (restParse.nonExistentFlags && restParse.nonExistentFlags.length > 0) {
process.stderr.write(` ${color.yellow('›')} For example: ${color.cyan(`heroku addons:create -a ${app} ${restParse.raw[0].input} -- ${restParse.nonExistentFlags.join(' ')}`)}`)
process.stderr.write(` ${color.yellow('›')} See https://devcenter.heroku.com/changelog-items/2925 for more info.\n`)
}

if (isInferenceAddon) {
ux.warn(
'\n\nThis pilot feature is a Beta Service. You may opt to try such Beta Service in your sole discretion. ' +
'Any use of the Beta Service is subject to the applicable Beta Services Terms provided at ' +
'https://www.salesforce.com/company/legal/customer-agreements/. While use of the pilot feature itself is free, ' +
'to the extent such use consumes a generally available Service, you may be charged for that consumption as set ' +
'forth in the Documentation. Your continued use of this pilot feature constitutes your acceptance of the foregoing.\n\n' +
'For clarity and without limitation, the various third-party machine learning and generative artificial intelligence ' +
'(AI) models and applications (each a “Platform”) integrated with the Beta Service are Non-SFDC Applications, ' +
'as that term is defined in the Beta Services Terms. Note that these third-party Platforms include features that use ' +
'generative AI technology. Due to the nature of generative AI, the output that a Platform generates may be ' +
'unpredictable, and may include inaccurate or harmful responses. Before using any generative AI output, Customer is ' +
'solely responsible for reviewing the output for accuracy, safety, and compliance with applicable laws and third-party ' +
'acceptable use policies. In addition, Customer’s use of each Platform may be subject to the Platform’s own terms and ' +
'conditions, compliance with which Customer is solely responsible.\n',
)
}

const config = parseConfig(argv)
let addon
try {
Expand Down
22 changes: 22 additions & 0 deletions packages/cli/test/unit/commands/addons/create.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ describe('addons:create', function () {
const addon = {
id: 201, name: 'db3-swiftly-123', addon_service: {name: 'heroku-db3'}, app: {name: 'myapp', id: 101}, config_vars: ['DATABASE_URL'], plan: {price: {cents: 10000, unit: 'month'}}, state: 'provisioned', provision_message: 'provision message',
}
const inferenceAddon = {
id: 201, name: 'claude-3-5-sonnet-acute-43973', addon_service: {name: 'heroku-inference-claude'}, app: {name: 'myapp', id: 101}, config_vars: ['INFERENCE_KEY', 'INFERENCE_MODEL_ID', 'INFERENCE_URL'], plan: {price: {cents: 0, unit: 'month'}}, state: 'provisioned', provision_message: 'provision message',
}

beforeEach(async function () {
api = nock('https://api.heroku.com:443')
Expand Down Expand Up @@ -373,4 +376,23 @@ describe('addons:create', function () {
expect(stdout.output).to.equal('provision message\nCreated db3-swiftly-123\nUse heroku addons:docs heroku-db3 to view documentation\n')
})
})

context('creating an inference addon', function () {
beforeEach(function () {
api.post('/apps/myapp/addons', {
plan: {name: 'heroku-inference:claude-3-5-sonnet'}, name: 'foobar', attachment: {}, config: {},
})
.reply(200, inferenceAddon)
})
it('displays disclaimer when creating inference addon', async function () {
await runCommand(Cmd, [
'heroku-inference:claude-3-5-sonnet',
'--app',
'myapp',
'--name',
'foobar',
])
expect(stderr.output).to.contain('This pilot feature is a Beta Service.')
})
})
})

0 comments on commit c522259

Please sign in to comment.