Skip to content

Commit

Permalink
Merge branch 'main' into eb/update-10.0-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
eablack committed Nov 18, 2024
2 parents df31ab2 + ce7c59b commit 941d320
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 12 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
10 changes: 10 additions & 0 deletions docs/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ USAGE
ARGUMENTS
SERVICE:PLAN... unique identifier or unique name of the add-on service plan
ARGUMENTS
SERVICE:PLAN unique identifier or unique name of the add-on service plan
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
Expand Down Expand Up @@ -120,6 +123,9 @@ USAGE
ARGUMENTS
ADDONNAME... unique identifier or globally unique name of the add-on
ARGUMENTS
ADDONNAME unique identifier or globally unique name of the add-on
FLAGS
-a, --app=<value> app to run command against
-c, --confirm=<value>
Expand All @@ -134,7 +140,11 @@ EXAMPLES
addons:destroy [ADDON]... [flags]
```

<<<<<<< HEAD
_See code: [src/commands/addons/destroy.ts](https://github.com/heroku/cli/blob/v10.0.0-alpha.2/packages/cli/src/commands/addons/destroy.ts)_
=======
_See code: [src/commands/addons/destroy.ts](https://github.com/heroku/cli/blob/v9.5.0/packages/cli/src/commands/addons/destroy.ts)_
>>>>>>> main
## `heroku addons:detach ATTACHMENT_NAME`

Expand Down
6 changes: 6 additions & 0 deletions docs/pg.md
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,12 @@ ARGUMENTS
DATABASE_URL.
VALUE... boolean indicating if execution plans of queries will be logged for future connections
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
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
Expand Down
9 changes: 9 additions & 0 deletions docs/ps.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ USAGE
ARGUMENTS
DYNO name of the dyno to stop
ARGUMENTS
DYNO ID of the dyno
FLAGS
-a, --app=<value> (required) app to run command against
-d, --dyno-name=<value> name of the dyno to stop
Expand Down Expand Up @@ -225,6 +228,9 @@ USAGE
ARGUMENTS
DYNO name of the dyno to restart
ARGUMENTS
DYNO ID of the dyno
FLAGS
-a, --app=<value> (required) app to run command against
-d, --dyno-name=<value> name of the dyno to restart
Expand Down Expand Up @@ -316,6 +322,9 @@ USAGE
ARGUMENTS
DYNO name of the dyno to stop
ARGUMENTS
DYNO ID of the dyno
FLAGS
-a, --app=<value> (required) app to run command against
-d, --dyno-name=<value> name of the dyno to stop
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 941d320

Please sign in to comment.