Repository navigation
docs: move published docs to volcano-docs #373
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,8 +4,31 @@ | |
| require 'timeout' | ||
| require_relative '../../spec/support/recording_server' | ||
|
|
||
| # Executes the unchanged public example with the isolated gem selected by smoke-gem.sh. | ||
| # Executes the public quickstart with the isolated gem selected by smoke-gem.sh. | ||
| class PackageQuickstart | ||
| # The public quickstart, as published in Kong/volcano-docs | ||
| # content/sdk/ruby/index.md ("Sign in and read a profile"). Change both together. | ||
| EXAMPLE = <<~'RUBY' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⚪ P3: Package check can drift from the published quickstart
Found by gpt-6.1-sol |
||
| require "volcano" | ||
|
|
||
| client = Volcano::Client.new( | ||
| anon_key: ENV.fetch("VOLCANO_ANON_KEY"), | ||
| api_url: ENV.fetch("VOLCANO_API_URL", "https://api.volcano.dev") | ||
| ) | ||
| session = client.auth.sign_in( | ||
| email: ENV.fetch("VOLCANO_USER_EMAIL"), | ||
| password: ENV.fetch("VOLCANO_USER_PASSWORD") | ||
| ) | ||
| begin | ||
| user = client.auth.user | ||
| raise "Unexpected user" unless user.id == session.user_id | ||
|
|
||
| puts "Signed in as #{user.email}" | ||
| ensure | ||
| client.auth.sign_out | ||
| end | ||
| RUBY | ||
|
|
||
| USER = { | ||
| id: '22222222-2222-4222-8222-222222222222', | ||
| project_id: '11111111-1111-4111-8111-111111111111', | ||
|
|
@@ -45,18 +68,9 @@ def configure(url) | |
| ) | ||
| end | ||
|
|
||
| def example | ||
| document = File.read(File.expand_path('../../docs/README.md', __dir__)) | ||
| section = document.split("## Sign in and read a profile\n").fetch(1).split("\n## ").first | ||
| examples = section.scan(/```ruby\n(.*?)\n```/m).flatten | ||
| raise 'Expected one complete documented quickstart' unless examples.length == 1 | ||
|
|
||
| examples.first | ||
| end | ||
|
|
||
| def execute | ||
| previous_stdout = $stdout | ||
| File.write('quickstart.rb', example) | ||
| File.write('quickstart.rb', EXAMPLE) | ||
| output = StringIO.new | ||
| $stdout = output | ||
| Timeout.timeout(30) { load File.expand_path('quickstart.rb') } | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,9 @@ | |
|
|
||
| Official Ruby SDK for Volcano. Requires Ruby 3.3 or later. | ||
|
|
||
| Start with the [Ruby quickstart](https://github.com/Kong/volcano-sdk-ruby/blob/main/docs/README.md). | ||
| Start with the [Ruby quickstart](https://docs.volcano.dev/sdk/ruby). | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⚪ P3: Links in already-published gem READMEs to blob/main/docs/ will 404 once docs/ is deleted Released gems up to 0.35.1 bundle a Found by claude-opus-5-5 |
||
|
|
||
| See [Authentication](https://github.com/Kong/volcano-sdk-ruby/blob/main/docs/authentication.md) for account, session, email, and OAuth workflows. | ||
| See [Authentication](https://docs.volcano.dev/sdk/ruby/authentication) for account, session, email, and OAuth workflows. | ||
|
|
||
| ## Install | ||
|
|
||
|
|
@@ -393,7 +393,7 @@ without changing credentials. Without a refresh token, `refresh_session` raises | |
| `Volcano::Error::AuthenticationError`. `sign_out` clears local state and revokes the server | ||
| session when the access JWT contains a readable UUID `session_id`. Supplied credentials require both a refresh token and an access JWT with a readable UUID | ||
| `session_id` to enable refresh. | ||
| See the [token bootstrap example](https://github.com/Kong/volcano-sdk-ruby/blob/main/docs/README.md#use-a-supplied-access-token). | ||
| See the [token bootstrap example](https://docs.volcano.dev/sdk/ruby#use-a-supplied-access-token). | ||
|
|
||
| ### Adopt an existing session | ||
|
|
||
|
|
@@ -493,7 +493,7 @@ prevents replay under another identity. The call preserves its original payload | |
| A function's own response, HTTP 403, or a network failure never triggers this retry. | ||
| Anonymous and service keys do not refresh. | ||
|
|
||
| See the [functions guide](https://github.com/Kong/volcano-sdk-ruby/blob/main/docs/functions.md). | ||
| See the [functions guide](https://docs.volcano.dev/sdk/ruby/functions). | ||
|
|
||
| ### Start and follow a durable execution | ||
|
|
||
|
|
@@ -680,7 +680,7 @@ they started; the anon key, or another user, passes the execution's | |
| `client_token:`, which only the creating start returns. Pass `project_id:` to | ||
| `send_message`, `list`, or `subscribe` to use the owner's route with a platform | ||
| user token or a project access token; `subscribe` reads back over it. See the | ||
| [functions guide](https://github.com/Kong/volcano-sdk-ruby/blob/main/docs/functions.md#message-a-durable-execution). | ||
| [functions guide](https://docs.volcano.dev/sdk/ruby/functions#message-a-durable-execution). | ||
|
|
||
| ### Read project logs | ||
|
|
||
|
|
@@ -708,7 +708,7 @@ events. Pass `next_cursor` back as `cursor` to continue a search. `activity` | |
| returns immutable time buckets using the same resource selector and query | ||
| syntax. Both methods require a platform user token or a project access token. | ||
| A `read_only` project token is sufficient; end-user sessions cannot read project logs. | ||
| See the [logs guide](https://github.com/Kong/volcano-sdk-ruby/blob/main/docs/logs.md). | ||
| See the [logs guide](https://docs.volcano.dev/sdk/ruby/logs). | ||
|
|
||
| ### Query a database | ||
|
|
||
|
|
@@ -890,7 +890,7 @@ Acquisition accepts caller-owned UUID `token` and `request_id` values and retrie | |
| an ambiguous transport failure or HTTP 503 once with the same request and credential. | ||
| Retain those IDs to recover an uncertain acquisition. Other lock methods accept | ||
| `request_id`; block-scoped helpers forward initial IDs only to acquisition. | ||
| See the [lock guide](https://github.com/Kong/volcano-sdk-ruby/blob/main/docs/locks.md) | ||
| See the [lock guide](https://docs.volcano.dev/sdk/ruby/locks) | ||
| for examples and fencing requirements. | ||
|
|
||
| `locks.get` returns immutable lock availability, expiry, and fencing-token | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚪ P3: Package quickstart check now runs a hand-copied snippet and can drift from the published quickstart
The check used to pull the quickstart out of
docs/README.md, so changing the published example automatically changed whatsmoke-gem.shran against the built gem. NowEXAMPLEis a separate copy, kept in sync only by the comment "Change both together." If someone edits the quickstart in Kong/volcano-docscontent/sdk/ruby/index.md, this check keeps passing on the old copy. It still printsDocumented quickstart passed(.github/scripts/smoke-gem.sh:40), andmaintainers/releasing.md:39still calls it "the exact public quickstart." Neither is accurate any more. One fix is to have volcano-docs run its own snippet against a released gem. Another is to reword the message and the release guide so they say the check runs a local copy, not the published page.Found by claude-opus-5-5