Skip to content

Releases: grafana/k6-jslib-aws

v0.13.0

08 Oct 10:14
06c4196
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.12.3...v0.13.0

v0.12.3

27 May 09:38
f6b5dce
Compare
Choose a tag to compare

Full Changelog: v0.12.2...v0.12.3

v0.12.2

27 May 08:17
11b2676
Compare
Choose a tag to compare

This v0.12.2 release brings minor bug fixes to k6-jslib-aws 🚀

What Changed

  • The S3Client methods will now use encoreURI over the object key path as it signs requests. This ensures the S3Client is compatible with object keys containing spaces and special symbol.
  • The S3Client underlying signatureV4 signer has been reverted to set the uriEscapePath option to false. After thoroughly reviewing the signature process documentation, S3 is indeed an exception in the AWS stack, and paths should not be double encoded.
  • The dist/ folder has been excluded from source control to facilitate contributions, reviews, and merges.

Full Changelog: v0.12.1...v0.12.2

v0.12.1

14 May 15:03
811ba5d
Compare
Choose a tag to compare

This release brings minor bug fixes to k6-jslib-aws v0.12.0 🚀

What Changed

  • The S3Client will now default its signer's uriEscapePath attribute to true. This is to ensure paths are always double URI encoded in S3 paths, and special symbols and space characters are supported in object keys.
  • The SignatureV4.sign and SignatureV4.presign operations ensure that a leading slash is appended to the target URL (if not present) when generating the resulting URL. That way we avoid potentially generating malformed URLs such as https://s3.amazonaws.commy-bucket/object-key as we've seen happen recently.
  • The Endpoint type is now also exposed by the aws.js bundle file.

Full Changelog: v0.12.0...v0.12.1

v0.12.0

13 May 09:01
bdc2d53
Compare
Choose a tag to compare

What's Changed

Features

Fixes

Miscelaneous

  • README improvements by @fczuardi in #68
  • Refactored client classes to make their properties private and readonly by @oleiade in #79
  • Add ESLint typescript configuration and address warnings in src folder by @oleiade in #81
  • Update Webpack version by @joanlopez in #90
  • Add GitHub Workflow to automate release generation by @joanlopez in #89
  • Rename 'build' folder to 'dist' by @joanlopez in #92
  • Update CONTRIBUTING.md with new docs link by @mstoykov in #99

New Contributors

Full Changelog: v0.11.0...v0.12.0

v0.11.0

09 Oct 13:22
c99fe38
Compare
Choose a tag to compare

What's Changed

  • Add support for attributes and delay seconds for SQS by @nickcaballero in #65
  • Fixed #30, by adding a params argument to the s3.putObject method, allowing to pass specific request parameters such as contentDisposition, contentLength, contentType or contentMD5 to such requests.
  • Fixed #52, by renaming the kinesis interfaces and type properties to lowercased camelCase to fit our existing naming convention.
  • Improved S3 test coverage.

Full Changelog: v0.10.0...v0.11.0

v0.10.0

29 Sep 14:39
7007e62
Compare
Choose a tag to compare

What's Changed

  • Replace clients host and scheme properties to cater to S3-Compatible backends by @oleiade in #61
  • Add support for Event Bridge by @jameshopkins in #55
  • Export AWSConfig from signature bundle by @oleiade in #58
  • Ensure s3 requests send a null body when unset by @oleiade in #60

New Contributors

Full Changelog: v0.9.0...v0.10.0

v0.9.0

02 Aug 12:50
822415f
Compare
Choose a tag to compare

What's changed

⚠️ Important: This release contains significant changes that might affect your existing workflows. All client methods are now asynchronous, which is a breaking change from earlier versions. ⚠️

The following public methods have become asynchronous in this release:

  • KinesisClient
  • KMSClient
  • S3Client
  • SecretsManagerClient
  • SQSClient
  • SystemsManagerClient

However, the SignatureV4 class and its methods remain synchronous.

What this Means for You

Asynchronous Methods

In version v0.9.0, client methods are now async functions, which means they return a Promise instead of a data type. For instance, the S3Client.listBuckets method, previously defined as listBuckets(): Array<S3Bucket>, is now an async function: async listBuckets(): Promise<Array<S3Bucket>>.

Using the Asynchronous Methods

You can handle the returned Promise using the await keyword. This way, your asynchronous code will have a synchronous look and feel. Here's an example:

export default async function () {
  // ...
  const buckets = await s3.listBuckets()
}
Note: k6's setup, teardown, handleSummary, and default functions can be declared as async functions.

## Full Example

```javascript
import exec from 'k6/execution'
import { AWSConfig, S3Client } from 'https://jslib.k6.io/aws/0.9.0/s3.js'

const testFile = open('bonjour.txt', 'r')
const awsConfig = new AWSConfig.fromEnvironment()
const s3 = new S3Client(awsConfig)
const testBucketName = 'test-jslib-aws'
const testFileKey = 'bonjour.txt'

export default async function () {
    const buckets = await s3.listBuckets()
    if (buckets.filter((b) => b.name === testBucketName).length == 0) {
        exec.test.abort()
    }

    await s3.putObject(testBucketName, testFileKey, testFile)
    const objects = await s3.listObjects(testBucketName)
    if (objects.filter((o) => o.key === testFileKey).length == 0) {
        exec.test.abort()
    }

    const obj = await s3.getObject(testBucketName, testFileKey)
    await s3.deleteObject(testBucketName, testFileKey)
}

Compatibility with Older k6 Versions

If you're using an older version of k6 that doesn't support asynchronous code execution, we recommend staying with v0.8.1 until you upgrade your k6 version.

v0.8.1

31 Jul 13:02
1a26de9
Compare
Choose a tag to compare

What's changed

  • S3 now has support for the copyObject operation, thanks to @bendennis in #53

New Contributors

Full changelog

v0.8.0...v0.8.1

v0.8.0

27 Jun 08:07
84c1989
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.7.2...v0.8.0