Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
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
14 changes: 9 additions & 5 deletions buildSrc/src/main/kotlin/dokka-convention.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,15 @@ tasks.register("trimNavigationFiles") {
val navigation = moduleDir.resolve("navigation.html").toFile()
val doc = Jsoup.parse(navigation)

// Fix navigation links
doc.select("a[href^='../../../../']").forEach { anchor ->
val originalHref = anchor.attr("href")
val trimmedHref = originalHref.replace("../../../../", "")
anchor.attr("href", trimmedHref)
// Remove all parent directory elements from all navigation links
doc.select("a[href^=../]").forEach { anchor ->
var href = anchor.attr("href")

while (href.startsWith("../")) {
href = href.removePrefix("../")
}

anchor.attr("href", href)
}

// Trim side menus
Expand Down
32 changes: 16 additions & 16 deletions docs/dokka-presets/scripts/custom-navigation-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@
* https://sdk.amazonaws.com/kotlin/api/latest/index.html -> index.html
* https://sdk.amazonaws.com/kotlin/api/latest/s3/index.html -> s3
* https://sdk.amazonaws.com/kotlin/api/latest/s3/aws.sdk.kotlin.services.s3/index.html -> s3
* https://sdk.amazonaws.com/kotlin/api/1.4.109/s3/index.html -> s3
*/
function extractModulePath(href) {
try {
const url = new URL(href, window.location.origin);
const pathSegments = url.pathname.split('/').filter(Boolean);

var moduleIndex = -1;

for (let i = 1; i < pathSegments.length; i++) {
if (pathSegments[i].includes('.')) {
moduleIndex = i-1;
break;
}
const segments = new URL(href, window.location.origin)
.pathname
.split('/')
.filter(Boolean); // drop empty parts

// the URL pattern is always ".../kotlin/api/<version>/..." in production
const apiIndex = segments.indexOf('api');

if (apiIndex !== -1) {
// segment after "api" is the version ("latest", "1.4.109", etc.)
// segment after _that_ is the module name (or "index.html" if we're at the root)
return segments[apiIndex + 2] ?? 'index.html';
}

if (moduleIndex === -1) {
return "index.html";
} else {
return pathSegments.slice(0, moduleIndex + 1).join("/");
}
} catch (error) {
// locally-hosted docs don't have /kotlin/api segment
return segments[0] ?? 'index.html';
} catch {
return null;
}
}
Expand Down
63 changes: 0 additions & 63 deletions services/timestreamquery/e2eTest/src/EndpointDiscoveryTest.kt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness: Why are we deleting this file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This e2e test fails with

    java.lang.IllegalStateException: Unexpected response Failure(java.lang.IllegalStateException: Unexpected response Failure(aws.sdk.kotlin.services.timestreamwrite.model.TimestreamWriteException: Only existing Timestream for LiveAnalytics customers can access the service. Reach out to AWS support, for more information.))

Copy link
Member Author

@lauzadis lauzadis Jun 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~~I should have deleted the test for timestreamwrite, not timestreamquery, fixed that. ~~

edit: both timestreamwrite and timestreamquery need to be disabled

This file was deleted.

Loading