Skip to content

Commit 7215bdd

Browse files
authored
Merge pull request #303 from cipherstash/multitudes-deployment-integration
Send deployment notification to multitudes
2 parents d7302d6 + 0bec935 commit 7215bdd

File tree

7 files changed

+45
-19
lines changed

7 files changed

+45
-19
lines changed

.github/workflows/release-aws-marketplace.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,12 @@ jobs:
105105
run: |
106106
mise run release:aws-marketplace
107107
108+
- name: Notify Multitudes
109+
run: |
110+
curl --request POST \
111+
--fail-with-body \
112+
--url "https://api.developer.multitudes.co/deployments" \
113+
--header "Content-Type: application/json" \
114+
--header "Authorization: ${{ secrets.MULTITUDES_ACCESS_TOKEN }}" \
115+
--data '{"commitSha": "${{ github.sha }}", "environmentName":"marketplace"}'
108116

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,12 @@ jobs:
128128
- name: Inspect image
129129
run: |
130130
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
131+
132+
- name: Notify Multitudes
133+
run: |
134+
curl --request POST \
135+
--fail-with-body \
136+
--url "https://api.developer.multitudes.co/deployments" \
137+
--header "Content-Type: application/json" \
138+
--header "Authorization: ${{ secrets.MULTITUDES_ACCESS_TOKEN }}" \
139+
--data '{"commitSha": "${{ github.sha }}", "environmentName":"dockerhub"}'

packages/cipherstash-proxy-integration/src/map_ore_index_where.rs

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,29 @@ mod tests {
7373

7474
// GT: given [1, 3], `> 1` returns [3]
7575
let sql = format!("SELECT {col_name} FROM encrypted WHERE {col_name} > $1");
76-
test_ore_op(&client, col_name, &sql, &[&low], &[high.clone()]).await;
76+
test_ore_op(
77+
&client,
78+
col_name,
79+
&sql,
80+
&[&low],
81+
std::slice::from_ref(&high),
82+
)
83+
.await;
7784

7885
// GT 2nd case: given [1, 3], `> 3` returns []
7986
let sql = format!("SELECT {col_name} FROM encrypted WHERE {col_name} > $1");
8087
test_ore_op::<T>(&client, col_name, &sql, &[&high], &[]).await;
8188

8289
// LT: given [1, 3], `< 3` returns [1]
8390
let sql = format!("SELECT {col_name} FROM encrypted WHERE {col_name} < $1");
84-
test_ore_op(&client, col_name, &sql, &[&high], &[low.clone()]).await;
91+
test_ore_op(
92+
&client,
93+
col_name,
94+
&sql,
95+
&[&high],
96+
std::slice::from_ref(&low),
97+
)
98+
.await;
8599

86100
// LT 2nd case: given [1, 3], `< 3` returns []
87101
let sql = format!("SELECT {col_name} FROM encrypted WHERE {col_name} < $1");
@@ -116,11 +130,18 @@ mod tests {
116130

117131
// EQ: given [1, 3], `= 1` returns [1]
118132
let sql = format!("SELECT {col_name} FROM encrypted WHERE {col_name} = $1");
119-
test_ore_op(&client, col_name, &sql, &[&low], &[low.clone()]).await;
133+
test_ore_op(&client, col_name, &sql, &[&low], std::slice::from_ref(&low)).await;
120134

121135
// NEQ: given [1, 3], `<> 3` returns [1]
122136
let sql = format!("SELECT {col_name} FROM encrypted WHERE {col_name} <> $1");
123-
test_ore_op(&client, col_name, &sql, &[&high], &[low.clone()]).await;
137+
test_ore_op(
138+
&client,
139+
col_name,
140+
&sql,
141+
&[&high],
142+
std::slice::from_ref(&low),
143+
)
144+
.await;
124145
}
125146

126147
/// Runs the query and checks the returned results match the expected results.

packages/cipherstash-proxy/src/config/database.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl DatabaseConfig {
7373
self.connection_timeout.map(Duration::from_millis)
7474
}
7575

76-
pub fn server_name(&self) -> Result<ServerName, Error> {
76+
pub fn server_name(&self) -> Result<ServerName<'_>, Error> {
7777
let name = ServerName::try_from(self.host.as_str()).map_err(|_| {
7878
ConfigError::InvalidServerName {
7979
name: self.host.to_owned(),

packages/cipherstash-proxy/src/config/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl ServerConfig {
6565
}
6666
}
6767

68-
pub fn server_name(&self) -> Result<ServerName, Error> {
68+
pub fn server_name(&self) -> Result<ServerName<'_>, Error> {
6969
let name = ServerName::try_from(self.host.as_str()).map_err(|_| {
7070
ConfigError::InvalidServerName {
7171
name: self.host.to_owned(),

packages/eql-mapper/src/inference/unifier/types.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -646,15 +646,3 @@ impl From<Array> for Type {
646646
Type::Value(Value::Array(array))
647647
}
648648
}
649-
650-
// Statically assert that `Type` is `Send + Sync`. If `Type` did not implement `Send` and/or `Sync` this crate would
651-
// fail to compile anyway but the error message is very obtuse. A failure here makes it obvious.
652-
const _: () = {
653-
fn assert_send<T: Send>() {}
654-
fn assert_sync<T: Sync>() {}
655-
656-
fn assert_all() {
657-
assert_send::<Type>();
658-
assert_sync::<Type>();
659-
}
660-
};

packages/eql-mapper/src/type_checked_statement.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl<'ast> TypeCheckedStatement<'ast> {
149149
fn make_transformer(
150150
&self,
151151
encrypted_literals: HashMap<NodeKey<'ast>, sqltk::parser::ast::Value>,
152-
) -> DryRunnable<impl TransformationRule<'_>> {
152+
) -> DryRunnable<'_, impl TransformationRule<'_>> {
153153
DryRunnable::new((
154154
RewriteStandardSqlFnsOnEqlTypes::new(Arc::clone(&self.node_types)),
155155
PreserveEffectiveAliases,

0 commit comments

Comments
 (0)