profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/aturon/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Aaron Turon aturon Fastly Portland, OR, USA http://aturon.github.io/ Engineer on the ExeucteD team at Fastly

aturon/ChemistrySet 48

A library for composable fine-grained concurrency.

aturon/aturon.github.io 17

turon's web site

aturon/Caper 10

Caper: concurrent and parallel extensions to Racket

aturon/async-benches 8

Benchmarks for async IO

aturon/ChemistrySetBench 1

Benchmarks for the Scala Chemistry Set

aturon/dotfiles 1

unixy config files

aturon/futures-rfcs 1

RFCs for changes to the `futures` crate

aturon/ba-rfcs 0

RFC process for Bytecode Alliance projects

aturon/beta.rust-lang.org 0

the home of the new rust website - now in beta!

PR opened pchickey/task-group

Reviewers
Bump to 0.2.1
+4 -2

0 comment

2 changed files

pr created time in 8 days

create barnchpchickey/task-group

branch : aturon/v0.2.1

created branch time in 8 days

delete branch aturon/task-group

delete branch : aturon/is-closed

delete time in 8 days

push eventpchickey/task-group

Aaron Turon

commit sha 8ebfd8829f1bb2c9b56295644e62dc9bcebe2444

Add `is_closed` method to `TaskGroup`

view details

Aaron Turon

commit sha 975116dbbf7fd40ea78d785da226b81247ea2872

Merge pull request #1 from aturon/aturon/is-closed Add `is_closed` method to `TaskGroup`

view details

push time in 8 days

PR merged pchickey/task-group

Add `is_closed` method to `TaskGroup`

Allows inspection of whether the task group has been shut down (due to an error or the manager being dropped).

+5 -0

0 comment

1 changed file

aturon

pr closed time in 8 days

push eventaturon/task-group

Aaron Turon

commit sha 8ebfd8829f1bb2c9b56295644e62dc9bcebe2444

Add `is_closed` method to `TaskGroup`

view details

push time in 8 days

PR opened pchickey/task-group

Add `is_closed` method to `TaskGroup`

Allows inspection of whether the task group has been shut down (due to an error or the manager being dropped).

+5 -0

0 comment

1 changed file

pr created time in 8 days

create barnchaturon/task-group

branch : aturon/is-closed

created branch time in 8 days

push eventfastly/Viceroy

katelyn martin

commit sha cbfb85be43542af2335bdb09698371aa9dc1d116

📜 changelog: update for 0.2.4 release

view details

katelyn martin

commit sha ad6489af4c0153b0c3d346c25bc06a672249f719

📬 changelog: add publish instructions

view details

katelyn martin

commit sha 970baf084fae75574b2b4f85e66f53855d601252

❺ manifests: update viceroy to 0.2.5

view details

katelyn martin

commit sha cf9225951da982731f6161172fb3128f8682edbb

📑 changelog: add unreleased header

view details

Aaron Turon

commit sha 3792888fa7453df5b1a9b7190f89476427071401

Merge pull request #72 from fastly/release-0.2.4 📜 0.2.4 release

view details

push time in 15 days

delete branch fastly/Viceroy

delete branch : release-0.2.4

delete time in 15 days

PR merged fastly/Viceroy

📜 0.2.4 release release

this branch intends to release a new version of Viceroy.

since our last version, we have merged #69 and #70. the former is a bug-fix worth releasing soon, so let's get it out there!

i'm following the instructions added here, so upon approval I'll push a tag and publish the crates.

+13 -5

1 comment

6 changed files

cratelyn

pr closed time in 15 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

push eventfastly/Viceroy

katelyn martin

commit sha 8595b389bea6bf0bddf1ea5ad1e0ffb0b7188973

🧹 error: exhaustive match in status code mapping

view details

katelyn martin

commit sha 06f015b57c3512119295121d35da7cf081e1be58

† error: outline dictionary errors into enum

view details

katelyn martin

commit sha 0d5e3abc037fad3e7b565ebb0186868ad77265c6

🔖 session: `dictionary` failures return `HandleError`

view details

katelyn martin

commit sha 618962f74e2497cc013a298fd391e4c41c4ae6f0

🤔 wiggle: remove unused error variant

view details

katelyn martin

commit sha 1d694d277ae1e6c6845f2412371d55e6e08d5b0d

🧐 wiggle: remove unused error variant this error variant is now covered by `HandleError`.

view details

katelyn martin

commit sha 57fb143d818e94fea82e97f1319986dfecb97f06

🙂 wiggle: map missing entry to `None` code ref: #68

view details

katelyn martin

commit sha a0e80c65046cca3e5d84d2886354bd7b8818742d

🔎 wiggle: keep unknown key in error (review) > Viceroy prints out the errors prior to converting them to ABI codes, > and it seems helpful to provide that info. a wise point! this commit reintroduces the payload of `UnknownDictionaryItem`. Co-Authored-By: Aaron Turon <aturon@fastly.com>

view details

Aaron Turon

commit sha 0157d82123db79e6cc5fad165aa6b7c980013ab7

Merge pull request #69 from fastly/katie/dictionary-lookups-return-none 📑 dictionary lookups can return none

view details

push time in 22 days

delete branch fastly/Viceroy

delete branch : katie/dictionary-lookups-return-none

delete time in 22 days

PR merged fastly/Viceroy

📑 dictionary lookups can return none bug

Fixes #68.

this branch makes some follow-up changes to #61, modifying the hostcall so that we return a None status code when a dictionary entry does not exist.

+57 -27

1 comment

4 changed files

cratelyn

pr closed time in 22 days

issue closedfastly/Viceroy

Fastly crate panicking when a dictionary item doesnt exist

While doing some testing today locally, i came across a panic on the fastly crate. This seems to be happening because the dictionary item lookup fails because the item does not exist in the dictionary: Aug 27 16:50:20.450 ERROR request{id=0}: Hostcall yielded an error: Unknown dictionary item: Manifest-2d98131 thread 'main' panicked at 'fastly_dictionary::get returned an unrecognized result', /Users/mmohammed/.cargo/registry/src/github.com-1ecc6299db9ec823/fastly-0.7.3/src/dictionary/handle.rs:81:23

I do not see this error on C@E.

closed time in 22 days

muda-fastly
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentfastly/Viceroy

📑 dictionary lookups can return none

 use {     crate::{         error::Error,         session::Session,-        wiggle_abi::{fastly_dictionary::FastlyDictionary, types::DictionaryHandle},+        wiggle_abi::{+            fastly_dictionary::FastlyDictionary,+            types::{DictionaryHandle, FastlyStatus},+        },     },     std::{convert::TryFrom, fs, path::Path},     wiggle::GuestPtr, }; +#[derive(Debug, thiserror::Error)]+pub enum DictionaryError {+    /// A dictionary item with the given key was not found.+    #[error("Unknown dictionary item")]+    UnknownDictionaryItem,

Quick question: what's the rationale for dropping the string paylaod here? Viceroy prints out the errors prior to converting them to ABI codes, and it seems helpful to provide that info.

cratelyn

comment created time in 24 days

PullRequestReviewEvent

pull request commentfastly/Viceroy

Add local dictionary support

Passed CI and merged! 🎉

Thanks for both doing this work, and following through these rounds of review and CI issues. This is an important improvement that will benefit a lot of people!

JakeChampion

comment created time in a month

push eventfastly/Viceroy

Jake Champion

commit sha e765522b8b02ba93d837f80376b553fcac2ec568

Add local dictionary support This reads a new section from the `local_server` part of fastly.toml named `dictionaries`. The `local_server.dictionaries` section is an array of tables with two fields: name, and file. The name field is a string which is used as the name of the dictionary and is used via the Dictionary.open method. This field uses the same validation rules asthe Fastly API (Name must start with alphabetical and contain only alphanumeric, underscore, and whitespace). The file field is a string which is a file-path pointing to a JSON file which contains all the dictionary items within an object. An example of a full local_server section of fastly.toml now looks like this: ```toml [local_server] [local_server.backends] [local_server.backends.dog] url = "http://localhost:7878/dog-mocks" [local_server.dictionaries] [local_server.dictionaries.a] name="a" file="./a.json" ```

view details

Jake Champion

commit sha 005c9d28ac25d9eeefb687d8d6775941ff3fd8b3

memoize reading a local dictionaries json file to make calls to the same dictionary be faster and avoid re-reading the same file too many times

view details

Jake Champion

commit sha 566246944189267abdabdba2b12369e386955f94

remove no required `use serde_json`

view details

Jake Champion

commit sha 8c722b63811a93b1569449bf3aacf3c877975d22

remove redundant clone of `dictionaries` within `with_dictionaries_by_id`

view details

Jake Champion

commit sha 576c25a568c23f87f9dd08e4e6f31e2f1c37c2ad

Check dictionary definitions are within the allowed limits of Fastly's platform Currently the limits are: 1000 items per dictionary 256 characters for dictionary item keys 8000 characters for dictionary item values

view details

Jake Champion

commit sha c83dd0df6df5a9b1490dce34ae18bdc0fc5136d0

Move dictionary validaton logic into dictionaries module

view details

Jake Champion

commit sha 0ec8eb82ec6b09b505e42ed1e4a3f58b265a1aed

use a PrimaryMap to avoid having to manually track the IDs for dictionary-handles

view details

Jake Champion

commit sha 107e38ea2e9701a651e6ee17c5c8f8c0751521a6

Read the dictionary files on every Dictionary.get call This mimics the 'liveness' of edge dictionaries - a user can edit a dictionary file and see the changes immediately without having to restart viceroy

view details

Jake Champion

commit sha d8f552c37524e978ed222debab260b75981919b1

use a pathbuf instead of a string for Dictionary.file field as the field is meant to point to a file

view details

Jake Champion

commit sha e9a054e7ad1e690c634a58d354a3ede9ec79a103

format the imports

view details

Jake Champion

commit sha e70788a69aa36d923318222cd6431f69532f286f

Use the name of the dictionary table as the name for the dictonary

view details

Jake Champion

commit sha 2b047a55c3257ef754faa42eb52d0ec652024e5c

remove dead code

view details

Jake Champion

commit sha d273601d88688f746bfdaa7e4d2d78ea7b2b74b1

correct the comment for the FastlyConfig.dictionaries function

view details

Jake Champion

commit sha e378898a7d402f1279d3443d2a262d9656120880

correct the comment for the DictionariesConfig struct

view details

Jake Champion

commit sha 92faacdba78c902e99f2a64aabc55d73f9710043

avoid copying `name` by using deref coercion to convert GuestStr into a &str

view details

Jake Champion

commit sha 4be64b0651ad4fc0c56fc6fcd427aa7e3328217a

avoid always copying the key in FastlyDictionary.get - instead only copy the key when using it within an error

view details

Jake Champion

commit sha 235d9a4eb23e68eff798e925a417a88b3e865f6f

assign a new DictionaryHandle for every given DictionaryName to align with what how c@e platform works. Currently on c@e, if you call Dictionary::open("some_name") twice, you'll be given back two handles with distinct inner u32 values.

view details

Jake Champion

commit sha 901e7063a9efd77c38528a1e08bc28b298558d0e

Stop double escaping strings retrieved from the dictionary files

view details

Jake Champion

commit sha d28f41ab400bb8a4e947b964ea275bc3309eb370

improve the error message for an invalid dictionary item value by mentoned the name of the invalid item

view details

Jake Champion

commit sha fef01554cc9ce36c79bb0e5194d7f37bdd75dc3f

Add error enum for when the dictionary file contents is not a json object

view details

push time in a month

PR merged fastly/Viceroy

Reviewers
Add local dictionary support

Resolves https://github.com/fastly/Viceroy/issues/11

This reads a new section from the local_server part of fastly.toml named dictionaries.

The local_server.dictionaries section is an array of tables with two fields: name, and file.

The name field is a string which is used as the name of the dictionary and is used via the Dictionary.open method. This field uses the same validation rules asthe Fastly API (Name must start with alphabetical and contain only alphanumeric, underscore, and whitespace).

The file field is a string which is a file-path pointing to a JSON file which contains all the dictionary items within an object.

An example of a full local_server section of fastly.toml now looks like this:

[local_server]
  [local_server.backends]
    [local_server.backends.dog]
      url = "http://localhost:7878/dog-mocks"
  [local_server.dictionaries]
    [local_server.dictionaries.a]
      file="./a.json"
      format = "json"

Note for reviewers:

I couldn't figure out how the tests are implements for the wiggle abi parts such as lib/src/wiggle_abi/dictionary_impl.rs. I assume they are implemented in an internal/private repo that Fastly has?


  • [X] Reading dictionaries from fasty.toml file
    • Note: I added the local dictionaries to the local_server section
  • [x] Construct Dictionary and DictionaryHandles
    • [x] Dictionaries have two fields: name, and file
    • [x] Validate name field with Fastly' validation rules (Name must start with alphabetical and contain only alphanumeric, underscore, and whitespace)
    • [x] Validate file file (perhaps by doing a file existence check and checking it is JSON which adheres to our schema)
  • [x] Implement Dictionary.open
  • [x] Implement Dictionary.get
  • [x] Tests
  • [ ] documentation
+737 -29

11 comments

14 changed files

JakeChampion

pr closed time in a month

issue closedfastly/Viceroy

Implement edge dictionary support

As mentioned in the project's README, we do not currently support all of the features provided by Compute@Edge's production environment. One of these missing features is Edge Dictionaries.

This is a tracking issue to document ongoing work to implement this support.

closed time in a month

cratelyn
PullRequestReviewEvent