From 869ec626d6125e29bc66222baf846a2a6b4f8bcc Mon Sep 17 00:00:00 2001 From: stuartc Date: Wed, 23 Oct 2024 13:20:19 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20OpenFn/l?= =?UTF-8?q?ightning@6722954d64142a7fe320479d08953e810668362e=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Lightning.Accounts.html | 142 ++++++++--------- Lightning.AdaptorRegistry.Npm.html | 10 +- Lightning.AdaptorRegistry.html | 12 +- Lightning.AiAssistant.html | 4 +- Lightning.AuthProviders.OauthHTTPClient.html | 154 +++++++++---------- Lightning.AuthProviders.WellKnown.html | 10 +- Lightning.BuildMacros.html | 12 +- Lightning.CLI.Result.html | 2 +- Lightning.Config.Bootstrap.html | 4 +- Lightning.Credentials.html | 60 ++++---- Lightning.Invocation.html | 64 ++++---- Lightning.Jobs.html | 26 ++-- Lightning.KafkaTriggers.MessageRecovery.html | 2 +- Lightning.OauthClients.html | 32 ++-- Lightning.Policies.Permissions.html | 18 +-- Lightning.Projects.html | 74 ++++----- Lightning.PromEx.html | 14 +- Lightning.Repo.html | 14 +- Lightning.Runs.Query.html | 2 +- Lightning.Runs.html | 2 +- Lightning.Runtime.LogAgent.html | 6 +- Lightning.Runtime.RuntimeManager.html | 4 +- Lightning.Scrubber.html | 8 +- Lightning.Storage.GCS.html | 4 +- Lightning.Storage.Local.html | 6 +- Lightning.Storage.ProjectFileDefinition.html | 6 +- Lightning.TaskWorker.html | 2 +- Lightning.Validators.html | 6 +- Lightning.VersionControl.GithubClient.html | 154 +++++++++---------- Lightning.WebhookAuthMethods.html | 76 ++++----- Lightning.WorkOrders.ExportWorker.html | 2 +- Lightning.WorkOrders.html | 4 +- Lightning.Workflows.Job.html | 18 +-- Lightning.Workflows.Presence.html | 54 +++---- Lightning.Workflows.html | 30 ++-- Lightning.epub | Bin 658535 -> 658538 bytes LightningWeb.AccountConfirmationModal.html | 4 +- LightningWeb.Components.NewInputs.html | 4 +- LightningWeb.Components.Viewers.html | 4 +- LightningWeb.DashboardLive.Index.html | 2 +- LightningWeb.Gettext.html | 8 +- LightningWeb.OauthCredentialHelper.html | 8 +- LightningWeb.Pagination.html | 10 +- LightningWeb.Plugs.Redirect.html | 12 +- LightningWeb.Plugs.WebhookAuth.html | 8 +- LightningWeb.Telemetry.html | 8 +- Mix.Tasks.Lightning.InstallAdaptorIcons.html | 102 ++++++------ Mix.Tasks.Lightning.InstallSchemas.html | 10 +- benchmarking.md.html | 40 ++--- changelog.html | 22 +-- deployment.html | 6 +- readme.html | 10 +- 52 files changed, 648 insertions(+), 648 deletions(-) diff --git a/Lightning.Accounts.html b/Lightning.Accounts.html index db2cd1c465..960bb4ba94 100644 --- a/Lightning.Accounts.html +++ b/Lightning.Accounts.html @@ -815,10 +815,10 @@

apply_user_email(user, password, attrs)

Examples -
iex> apply_user_email(user, "valid password", %{email: ...})
-{:ok, %User{}}role: :superuser
-iex> apply_user_email(user, "invalid password", %{email: ...})
-{:error, %Ecto.Changeset{}}
+
iex> apply_user_email(user, "valid password", %{email: ...})
+{:ok, %User{}}role: :superuser
+iex> apply_user_email(user, "invalid password", %{email: ...})
+{:error, %Ecto.Changeset{}}
@@ -870,8 +870,8 @@

change_scheduled_deletion(user, attrs \\ %{ Examples

-
iex> change_scheduled_deletion(user)
-%Ecto.Changeset{data: %User{}}
+
iex> change_scheduled_deletion(user)
+%Ecto.Changeset{data: %User{}}
@@ -907,8 +907,8 @@

change_superuser_registration(attrs \\ %{}) Examples

-
iex> change_superuser_registration(user)
-%Ecto.Changeset{data: %User{}}
+
iex> change_superuser_registration(user)
+%Ecto.Changeset{data: %User{}}
@@ -960,8 +960,8 @@

change_user_email(user, attrs \\ %{})

Examples -
iex> change_user_email(user)
-%Ecto.Changeset{data: %User{}}
+
iex> change_user_email(user)
+%Ecto.Changeset{data: %User{}}
@@ -1015,8 +1015,8 @@

change_user_password(user, attrs \\ %{}) Examples

-
iex> change_user_password(user)
-%Ecto.Changeset{data: %User{}}
+
iex> change_user_password(user)
+%Ecto.Changeset{data: %User{}}
@@ -1046,8 +1046,8 @@

change_user_registration(attrs \\ %{})

Examples -
iex> change_user_registration(user)
-%Ecto.Changeset{data: %User{}}
+
iex> change_user_registration(user)
+%Ecto.Changeset{data: %User{}}
@@ -1208,11 +1208,11 @@

delete_token(token)

Examples -
iex> delete_token(token)
-{:ok, %UserToken{}}
+
iex> delete_token(token)
+{:ok, %UserToken{}}
 
-iex> delete_token(token)
-{:error, %Ecto.Changeset{}}
+
iex> delete_token(token) +{:error, %Ecto.Changeset{}}
@@ -1240,11 +1240,11 @@

delete_user(user)

Examples -
iex> delete_user(user)
-{:ok, %User{}}
+
iex> delete_user(user)
+{:ok, %User{}}
 
-iex> delete_user(user)
-{:error, %Ecto.Changeset{}}
+
iex> delete_user(user) +{:error, %Ecto.Changeset{}}
@@ -1301,11 +1301,11 @@

deliver_user_confirmation_instructions(user Examples

-
iex> deliver_user_confirmation_instructions(user)
-{:ok, %{to: ..., body: ...}}
+
iex> deliver_user_confirmation_instructions(user)
+{:ok, %{to: ..., body: ...}}
 
-iex> deliver_user_confirmation_instructions(confirmed_user)
-{:error, :already_confirmed}
+
iex> deliver_user_confirmation_instructions(confirmed_user) +{:error, :already_confirmed}
@@ -1355,8 +1355,8 @@

deliver_user_reset_password_instructions(us Examples

-
iex> deliver_user_reset_password_instructions(user, &Routes.user_reset_password_url(conn, :edit, &1))
-{:ok, %{to: ..., body: ...}}
+
iex> deliver_user_reset_password_instructions(user, &Routes.user_reset_password_url(conn, :edit, &1))
+{:ok, %{to: ..., body: ...}}
@@ -1501,10 +1501,10 @@

get_preference(user, key)

Examples -
iex> get_preference(user, "editor.orientation")
+
iex> get_preference(user, "editor.orientation")
 "vertical"
 
-iex> get_preference(user, "notifications.enabled")
+iex> get_preference(user, "notifications.enabled")
 true
@@ -1533,10 +1533,10 @@

get_token!(id)

Examples -
iex> get_token!(123)
-%UserToken{}
+
iex> get_token!(123)
+%UserToken{}
 
-iex> get_token!(456)
+iex> get_token!(456)
 ** (Ecto.NoResultsError)
@@ -1565,10 +1565,10 @@

get_user!(id)

Examples -
iex> get_user!(123)
-%User{}
+
iex> get_user!(123)
+%User{}
 
-iex> get_user!(456)
+iex> get_user!(456)
 ** (Ecto.NoResultsError)
@@ -1641,10 +1641,10 @@

get_user_by_email(email)

Examples -
iex> get_user_by_email("foo@example.com")
-%User{}
+
iex> get_user_by_email("foo@example.com")
+%User{}
 
-iex> get_user_by_email("unknown@example.com")
+iex> get_user_by_email("unknown@example.com")
 nil
@@ -1673,10 +1673,10 @@

get_user_by_email_and_password(email, passw Examples

-
iex> get_user_by_email_and_password("foo@example.com", "correct_password")
-%User{}
+
iex> get_user_by_email_and_password("foo@example.com", "correct_password")
+%User{}
 
-iex> get_user_by_email_and_password("foo@example.com", "invalid_password")
+iex> get_user_by_email_and_password("foo@example.com", "invalid_password")
 nil
@@ -1705,10 +1705,10 @@

get_user_by_reset_password_token(token)

Examples -
iex> get_user_by_reset_password_token("validtoken")
-%User{}
+
iex> get_user_by_reset_password_token("validtoken")
+%User{}
 
-iex> get_user_by_reset_password_token("invalidtoken")
+iex> get_user_by_reset_password_token("invalidtoken")
 nil
@@ -1905,8 +1905,8 @@

list_users()

Examples -
iex> list_users()
-[%User{}, ...]
+
iex> list_users()
+[%User{}, ...]
@@ -2035,11 +2035,11 @@

register_superuser(attrs)

Examples -
iex> register_superuser(%{field: value})
-{:ok, %User{}}
+
iex> register_superuser(%{field: value})
+{:ok, %User{}}
 
-iex> register_superuser(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> register_superuser(%{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -2077,11 +2077,11 @@

register_user(attrs)

Examples -
iex> register_user(%{field: value})
-{:ok, %User{}}
+
iex> register_user(%{field: value})
+{:ok, %User{}}
 
-iex> register_user(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> register_user(%{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -2131,7 +2131,7 @@

request_email_update(user, new_email)

Examples -
iex> request_email_update(user, new_email)
+
iex> request_email_update(user, new_email)
 :ok
@@ -2160,11 +2160,11 @@

reset_user_password(user, attrs)

Examples -
iex> reset_user_password(user, %{password: "new long password", password_confirmation: "new long password"})
-{:ok, %User{}}
+
iex> reset_user_password(user, %{password: "new long password", password_confirmation: "new long password"})
+{:ok, %User{}}
 
-iex> reset_user_password(user, %{password: "valid", password_confirmation: "not the same"})
-{:error, %Ecto.Changeset{}}
+
iex> reset_user_password(user, %{password: "valid", password_confirmation: "not the same"}) +{:error, %Ecto.Changeset{}}
@@ -2330,11 +2330,11 @@

update_user_password(user, password, attrs) Examples

-
iex> update_user_password(user, "valid password", %{password: ...})
-{:ok, %User{}}
+
iex> update_user_password(user, "valid password", %{password: ...})
+{:ok, %User{}}
 
-iex> update_user_password(user, "invalid password", %{password: ...})
-{:error, %Ecto.Changeset{}}
+
iex> update_user_password(user, "invalid password", %{password: ...}) +{:error, %Ecto.Changeset{}}
@@ -2369,11 +2369,11 @@

update_user_preference(user, key, value) Examples

-
iex> update_user_preference(user, "editor.orientation", "vertical")
-{:ok, %User{}}
+
iex> update_user_preference(user, "editor.orientation", "vertical")
+{:ok, %User{}}
 
-iex> update_user_preference(user, "notifications.enabled", true)
-{:ok, %User{}}
+
iex> update_user_preference(user, "notifications.enabled", true) +{:ok, %User{}}
@@ -2408,7 +2408,7 @@

update_user_preferences(user, preferences)< Examples

-
iex> update_user_preferences(%User{}, %{"editor.orientaion" => "vertical"})
+
iex> update_user_preferences(%User{}, %{"editor.orientaion" => "vertical"})
@@ -2535,8 +2535,8 @@

validate_change_user_email(user, params \\ Examples

-
iex> validate_change_user_email(user, %{"email" => "new@example.com", "current_password" => "secret"})
-%Ecto.Changeset{...}
+
iex> validate_change_user_email(user, %{"email" => "new@example.com", "current_password" => "secret"})
+%Ecto.Changeset{...}
diff --git a/Lightning.AdaptorRegistry.Npm.html b/Lightning.AdaptorRegistry.Npm.html index f34eaedfcf..29e5a693c7 100644 --- a/Lightning.AdaptorRegistry.Npm.html +++ b/Lightning.AdaptorRegistry.Npm.html @@ -1690,14 +1690,14 @@

request(request)

Examples -
request = %HTTPoison.Request{
+
request = %HTTPoison.Request{
   method: :post,
   url: "https://my.website.com",
   body: "{\"foo\": 3}",
-  headers: [{"Accept", "application/json"}]
-}
+  headers: [{"Accept", "application/json"}]
+}
 
-request(request)
+
request(request)
@@ -1755,7 +1755,7 @@

request(method, url, body \\ "", Examples

-
request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
+
request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
diff --git a/Lightning.AdaptorRegistry.html b/Lightning.AdaptorRegistry.html index 3965e6b8c0..8984cf4ea6 100644 --- a/Lightning.AdaptorRegistry.html +++ b/Lightning.AdaptorRegistry.html @@ -140,9 +140,9 @@

Registry process to query and maintain a list of adaptors available for writing jobs.

Currently it queries NPM for all modules in the @openfn organization and filters out modules that are known not to be adaptors.

Usage

# Starting the process
-AdaptorRegistry.start_link()
+AdaptorRegistry.start_link()
 # Getting a list of all adaptors
-Lightning.AdaptorRegistry.AdaptorRegistry.all()

Caching

By default the results are cached to disk, and will be reused every start.

In order to disable or configure caching pass see: start_link/1.

The process uses :continue to return before the adaptors have been queried. +Lightning.AdaptorRegistry.AdaptorRegistry.all()

Caching

By default the results are cached to disk, and will be reused every start.

In order to disable or configure caching pass see: start_link/1.

The process uses :continue to return before the adaptors have been queried. This does mean that the first call to the process will be delayed until the handle_continue/2 has finished.

Timeouts

There is a 'general' timeout of 30s, this is used for GenServer calls like all/1 and also internally when the modules are being queried. NPM can @@ -432,10 +432,10 @@

resolve_package_name(package_name)

-

Destructures an NPM style package name into module name and version.

Example

iex> resolve_package_name("@openfn/language-salesforce@1.2.3")
-{ "@openfn/language-salesforce", "1.2.3" }
-iex> resolve_package_name("@openfn/language-salesforce")
-{ "@openfn/language-salesforce", nil }
+

Destructures an NPM style package name into module name and version.

Example

iex> resolve_package_name("@openfn/language-salesforce@1.2.3")
+{ "@openfn/language-salesforce", "1.2.3" }
+iex> resolve_package_name("@openfn/language-salesforce")
+{ "@openfn/language-salesforce", nil }
diff --git a/Lightning.AiAssistant.html b/Lightning.AiAssistant.html index 967ab57627..3ff82d263a 100644 --- a/Lightning.AiAssistant.html +++ b/Lightning.AiAssistant.html @@ -508,8 +508,8 @@

query(session, content)

-

Queries the AI assistant with the given content.

Returns {:ok, session} if the query was successful, otherwise :error.

Example

iex> AiAssistant.query(session, "fn()")
-{:ok, session}
+

Queries the AI assistant with the given content.

Returns {:ok, session} if the query was successful, otherwise :error.

Example

iex> AiAssistant.query(session, "fn()")
+{:ok, session}
diff --git a/Lightning.AuthProviders.OauthHTTPClient.html b/Lightning.AuthProviders.OauthHTTPClient.html index 3e63fd199b..7adeabecac 100644 --- a/Lightning.AuthProviders.OauthHTTPClient.html +++ b/Lightning.AuthProviders.OauthHTTPClient.html @@ -495,11 +495,11 @@

delete(client, url, opts)

-

Perform a DELETE request.

See request/1 or request/2 for options definition.

delete("/users")
-delete("/users", query: [scope: "admin"])
-delete(client, "/users")
-delete(client, "/users", query: [scope: "admin"])
-delete(client, "/users", body: %{name: "Jon"})
+

Perform a DELETE request.

See request/1 or request/2 for options definition.

delete("/users")
+delete("/users", query: [scope: "admin"])
+delete(client, "/users")
+delete(client, "/users", query: [scope: "admin"])
+delete(client, "/users", body: %{name: "Jon"})
@@ -528,11 +528,11 @@

delete!(client, url, opts)

-

Perform a DELETE request.

See request!/1 or request!/2 for options definition.

delete!("/users")
-delete!("/users", query: [scope: "admin"])
-delete!(client, "/users")
-delete!(client, "/users", query: [scope: "admin"])
-delete!(client, "/users", body: %{name: "Jon"})
+

Perform a DELETE request.

See request!/1 or request!/2 for options definition.

delete!("/users")
+delete!("/users", query: [scope: "admin"])
+delete!(client, "/users")
+delete!(client, "/users", query: [scope: "admin"])
+delete!(client, "/users", body: %{name: "Jon"})
@@ -662,11 +662,11 @@

get(client, url, opts)

-

Perform a GET request.

See request/1 or request/2 for options definition.

get("/users")
-get("/users", query: [scope: "admin"])
-get(client, "/users")
-get(client, "/users", query: [scope: "admin"])
-get(client, "/users", body: %{name: "Jon"})
+

Perform a GET request.

See request/1 or request/2 for options definition.

get("/users")
+get("/users", query: [scope: "admin"])
+get(client, "/users")
+get(client, "/users", query: [scope: "admin"])
+get(client, "/users", body: %{name: "Jon"})
@@ -695,11 +695,11 @@

get!(client, url, opts)

-

Perform a GET request.

See request!/1 or request!/2 for options definition.

get!("/users")
-get!("/users", query: [scope: "admin"])
-get!(client, "/users")
-get!(client, "/users", query: [scope: "admin"])
-get!(client, "/users", body: %{name: "Jon"})
+

Perform a GET request.

See request!/1 or request!/2 for options definition.

get!("/users")
+get!("/users", query: [scope: "admin"])
+get!(client, "/users")
+get!(client, "/users", query: [scope: "admin"])
+get!(client, "/users", body: %{name: "Jon"})
@@ -727,11 +727,11 @@

head(client, url, opts)

-

Perform a HEAD request.

See request/1 or request/2 for options definition.

head("/users")
-head("/users", query: [scope: "admin"])
-head(client, "/users")
-head(client, "/users", query: [scope: "admin"])
-head(client, "/users", body: %{name: "Jon"})
+

Perform a HEAD request.

See request/1 or request/2 for options definition.

head("/users")
+head("/users", query: [scope: "admin"])
+head(client, "/users")
+head(client, "/users", query: [scope: "admin"])
+head(client, "/users", body: %{name: "Jon"})
@@ -760,11 +760,11 @@

head!(client, url, opts)

-

Perform a HEAD request.

See request!/1 or request!/2 for options definition.

head!("/users")
-head!("/users", query: [scope: "admin"])
-head!(client, "/users")
-head!(client, "/users", query: [scope: "admin"])
-head!(client, "/users", body: %{name: "Jon"})
+

Perform a HEAD request.

See request!/1 or request!/2 for options definition.

head!("/users")
+head!("/users", query: [scope: "admin"])
+head!(client, "/users")
+head!(client, "/users", query: [scope: "admin"])
+head!(client, "/users", body: %{name: "Jon"})
@@ -792,11 +792,11 @@

options(client, url, opts)

-

Perform a OPTIONS request.

See request/1 or request/2 for options definition.

options("/users")
-options("/users", query: [scope: "admin"])
-options(client, "/users")
-options(client, "/users", query: [scope: "admin"])
-options(client, "/users", body: %{name: "Jon"})
+

Perform a OPTIONS request.

See request/1 or request/2 for options definition.

options("/users")
+options("/users", query: [scope: "admin"])
+options(client, "/users")
+options(client, "/users", query: [scope: "admin"])
+options(client, "/users", body: %{name: "Jon"})
@@ -825,11 +825,11 @@

options!(client, url, opts)

-

Perform a OPTIONS request.

See request!/1 or request!/2 for options definition.

options!("/users")
-options!("/users", query: [scope: "admin"])
-options!(client, "/users")
-options!(client, "/users", query: [scope: "admin"])
-options!(client, "/users", body: %{name: "Jon"})
+

Perform a OPTIONS request.

See request!/1 or request!/2 for options definition.

options!("/users")
+options!("/users", query: [scope: "admin"])
+options!(client, "/users")
+options!(client, "/users", query: [scope: "admin"])
+options!(client, "/users", body: %{name: "Jon"})
@@ -858,10 +858,10 @@

patch(client, url, body, opts)

-

Perform a PATCH request.

See request/1 or request/2 for options definition.

patch("/users", %{name: "Jon"})
-patch("/users", %{name: "Jon"}, query: [scope: "admin"])
-patch(client, "/users", %{name: "Jon"})
-patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+

Perform a PATCH request.

See request/1 or request/2 for options definition.

patch("/users", %{name: "Jon"})
+patch("/users", %{name: "Jon"}, query: [scope: "admin"])
+patch(client, "/users", %{name: "Jon"})
+patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -890,10 +890,10 @@

patch!(client, url, body, opts)

-

Perform a PATCH request.

See request!/1 or request!/2 for options definition.

patch!("/users", %{name: "Jon"})
-patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
-patch!(client, "/users", %{name: "Jon"})
-patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+

Perform a PATCH request.

See request!/1 or request!/2 for options definition.

patch!("/users", %{name: "Jon"})
+patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
+patch!(client, "/users", %{name: "Jon"})
+patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -922,10 +922,10 @@

post(client, url, body, opts)

-

Perform a POST request.

See request/1 or request/2 for options definition.

post("/users", %{name: "Jon"})
-post("/users", %{name: "Jon"}, query: [scope: "admin"])
-post(client, "/users", %{name: "Jon"})
-post(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+

Perform a POST request.

See request/1 or request/2 for options definition.

post("/users", %{name: "Jon"})
+post("/users", %{name: "Jon"}, query: [scope: "admin"])
+post(client, "/users", %{name: "Jon"})
+post(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -954,10 +954,10 @@

post!(client, url, body, opts)

-

Perform a POST request.

See request!/1 or request!/2 for options definition.

post!("/users", %{name: "Jon"})
-post!("/users", %{name: "Jon"}, query: [scope: "admin"])
-post!(client, "/users", %{name: "Jon"})
-post!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+

Perform a POST request.

See request!/1 or request!/2 for options definition.

post!("/users", %{name: "Jon"})
+post!("/users", %{name: "Jon"}, query: [scope: "admin"])
+post!(client, "/users", %{name: "Jon"})
+post!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -986,10 +986,10 @@

put(client, url, body, opts)

-

Perform a PUT request.

See request/1 or request/2 for options definition.

put("/users", %{name: "Jon"})
-put("/users", %{name: "Jon"}, query: [scope: "admin"])
-put(client, "/users", %{name: "Jon"})
-put(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+

Perform a PUT request.

See request/1 or request/2 for options definition.

put("/users", %{name: "Jon"})
+put("/users", %{name: "Jon"}, query: [scope: "admin"])
+put(client, "/users", %{name: "Jon"})
+put(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -1018,10 +1018,10 @@

put!(client, url, body, opts)

-

Perform a PUT request.

See request!/1 or request!/2 for options definition.

put!("/users", %{name: "Jon"})
-put!("/users", %{name: "Jon"}, query: [scope: "admin"])
-put!(client, "/users", %{name: "Jon"})
-put!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+

Perform a PUT request.

See request!/1 or request!/2 for options definition.

put!("/users", %{name: "Jon"})
+put!("/users", %{name: "Jon"}, query: [scope: "admin"])
+put!(client, "/users", %{name: "Jon"})
+put!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -1097,11 +1097,11 @@

request(client \\ %Tesla.Client{}, options) Examples

-
ExampleApi.request(method: :get, url: "/users/path")
+
ExampleApi.request(method: :get, url: "/users/path")
 
 # use shortcut methods
-ExampleApi.get("/users/1")
-ExampleApi.post(client, "/users", %{name: "Jon"})
+
ExampleApi.get("/users/1") +ExampleApi.post(client, "/users", %{name: "Jon"})
@@ -1237,11 +1237,11 @@

trace(client, url, opts)

-

Perform a TRACE request.

See request/1 or request/2 for options definition.

trace("/users")
-trace("/users", query: [scope: "admin"])
-trace(client, "/users")
-trace(client, "/users", query: [scope: "admin"])
-trace(client, "/users", body: %{name: "Jon"})
+

Perform a TRACE request.

See request/1 or request/2 for options definition.

trace("/users")
+trace("/users", query: [scope: "admin"])
+trace(client, "/users")
+trace(client, "/users", query: [scope: "admin"])
+trace(client, "/users", body: %{name: "Jon"})
@@ -1270,11 +1270,11 @@

trace!(client, url, opts)

-

Perform a TRACE request.

See request!/1 or request!/2 for options definition.

trace!("/users")
-trace!("/users", query: [scope: "admin"])
-trace!(client, "/users")
-trace!(client, "/users", query: [scope: "admin"])
-trace!(client, "/users", body: %{name: "Jon"})
+

Perform a TRACE request.

See request!/1 or request!/2 for options definition.

trace!("/users")
+trace!("/users", query: [scope: "admin"])
+trace!(client, "/users")
+trace!(client, "/users", query: [scope: "admin"])
+trace!(client, "/users", body: %{name: "Jon"})
diff --git a/Lightning.AuthProviders.WellKnown.html b/Lightning.AuthProviders.WellKnown.html index 6f953e5bf5..90f78cfd20 100644 --- a/Lightning.AuthProviders.WellKnown.html +++ b/Lightning.AuthProviders.WellKnown.html @@ -1866,14 +1866,14 @@

request(request)

Examples -
request = %HTTPoison.Request{
+
request = %HTTPoison.Request{
   method: :post,
   url: "https://my.website.com",
   body: "{\"foo\": 3}",
-  headers: [{"Accept", "application/json"}]
-}
+  headers: [{"Accept", "application/json"}]
+}
 
-request(request)
+
request(request)
@@ -1931,7 +1931,7 @@

request(method, url, body \\ "", Examples

-
request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
+
request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
diff --git a/Lightning.BuildMacros.html b/Lightning.BuildMacros.html index 0408c7545f..e077753124 100644 --- a/Lightning.BuildMacros.html +++ b/Lightning.BuildMacros.html @@ -211,13 +211,13 @@

do_in(envs, list)

Examples -
do_in(:dev) do
-  IO.puts("This will only be printed in the dev environment")
-end
+
do_in(:dev) do
+  IO.puts("This will only be printed in the dev environment")
+end
 
-do_in([:dev, :test]) do
-  IO.puts("This will only be printed in the dev and test environments")
-end
+
do_in([:dev, :test]) do + IO.puts("This will only be printed in the dev and test environments") +end
diff --git a/Lightning.CLI.Result.html b/Lightning.CLI.Result.html index 6be01fb449..bdc22fb375 100644 --- a/Lightning.CLI.Result.html +++ b/Lightning.CLI.Result.html @@ -144,7 +144,7 @@

Logs

The OpenFn CLI returns JSON formatted log lines, which are decoded and added -to a Result struct.

There are two kinds of output:

{"level":"<<level>>","name":"<<module>>","message":"..."],"time":<<timestamp>>}

These are usually for general logging, and debugging.

{"message":["<<message|filepath|output>>"]}

The above is the equivalent of the output of a command

+to a Result struct.

There are two kinds of output:

{"level":"<<level>>","name":"<<module>>","message":"..."],"time":<<timestamp>>}

These are usually for general logging, and debugging.

{"message":["<<message|filepath|output>>"]}

The above is the equivalent of the output of a command

diff --git a/Lightning.Config.Bootstrap.html b/Lightning.Config.Bootstrap.html index e6f060a72e..97d3d0790e 100644 --- a/Lightning.Config.Bootstrap.html +++ b/Lightning.Config.Bootstrap.html @@ -143,8 +143,8 @@

called from other places (aside from config/runtime.exs) file.

Sourcing envs

Internally this module uses Dotenvy.source/1 to source environment variables from the .env, .env.<config_env>, and .env.<config_env>.override files. It also sources the system environment variables.

Calling configure/0 without calling source_envs/0 or Dotenvy.source/2 -first will result in no environment variables being loaded.

Usage:

Lightning.Config.Bootstrap.source_envs()
-Lightning.Config.Bootstrap.configure()
+first will result in no environment variables being loaded.

Usage:

Lightning.Config.Bootstrap.source_envs()
+Lightning.Config.Bootstrap.configure()
diff --git a/Lightning.Credentials.html b/Lightning.Credentials.html index 51ad7d3574..a3f559268a 100644 --- a/Lightning.Credentials.html +++ b/Lightning.Credentials.html @@ -406,8 +406,8 @@

change_credential(credential, attrs \\ %{}) Examples

-
iex> change_credential(credential)
-%Ecto.Changeset{data: %Credential{}}
+
iex> change_credential(credential)
+%Ecto.Changeset{data: %Credential{}}
@@ -437,11 +437,11 @@

create_credential(attrs \\ %{})

Examples -
iex> create_credential(%{field: value})
-{:ok, %Credential{}}
+
iex> create_credential(%{field: value})
+{:ok, %Credential{}}
 
-iex> create_credential(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> create_credential(%{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -469,11 +469,11 @@

delete_credential(credential)

Examples -
iex> delete_credential(credential)
-{:ok, %Credential{}}
+
iex> delete_credential(credential)
+{:ok, %Credential{}}
 
-iex> delete_credential(credential)
-{:error, %Ecto.Changeset{}}
+
iex> delete_credential(credential) +{:error, %Ecto.Changeset{}}
@@ -501,10 +501,10 @@

get_credential!(id)

Examples -
iex> get_credential!(123)
-%Credential{}
+
iex> get_credential!(123)
+%Credential{}
 
-iex> get_credential!(456)
+iex> get_credential!(456)
 ** (Ecto.NoResultsError)
@@ -617,10 +617,10 @@

has_activity_in_projects?(credential)

Examples -
iex> has_activity_in_projects?(%Credential{id: some_id})
+
iex> has_activity_in_projects?(%Credential{id: some_id})
 true
 
-iex> has_activity_in_projects?(%Credential{id: another_id})
+iex> has_activity_in_projects?(%Credential{id: another_id})
 false

@@ -659,11 +659,11 @@

invalid_projects_for_user(credential_id, us Examples

-
iex> can_credential_be_shared_to_user(credential_id, user_id)
-[]
+
iex> can_credential_be_shared_to_user(credential_id, user_id)
+[]
 
-iex> can_credential_be_shared_to_user(credential_id, user_id)
-["52ea8758-6ce5-43d7-912f-6a1e1f11dc55"]
+
iex> can_credential_be_shared_to_user(credential_id, user_id) +["52ea8758-6ce5-43d7-912f-6a1e1f11dc55"]
@@ -703,9 +703,9 @@

list_credentials(project)

Examples

-

When given a Project:

iex> list_credentials(%Project{id: 1})
-[%Credential{project_id: 1}, %Credential{project_id: 1}]

When given a User:

iex> list_credentials(%User{id: 123})
-[%Credential{user_id: 123}, %Credential{user_id: 123}]
+

When given a Project:

iex> list_credentials(%Project{id: 1})
+[%Credential{project_id: 1}, %Credential{project_id: 1}]

When given a User:

iex> list_credentials(%User{id: 123})
+[%Credential{user_id: 123}, %Credential{user_id: 123}]
@@ -816,11 +816,11 @@

schedule_credential_deletion(credential) Examples

-
iex> schedule_credential_deletion(%Credential{id: some_id})
-{:ok, %Credential{}}
+
iex> schedule_credential_deletion(%Credential{id: some_id})
+{:ok, %Credential{}}
 
-iex> schedule_credential_deletion(%Credential{})
-{:error, %Ecto.Changeset{}}
+
iex> schedule_credential_deletion(%Credential{}) +{:error, %Ecto.Changeset{}}
@@ -877,11 +877,11 @@

update_credential(credential, attrs)

Examples -
iex> update_credential(credential, %{field: new_value})
-{:ok, %Credential{}}
+
iex> update_credential(credential, %{field: new_value})
+{:ok, %Credential{}}
 
-iex> update_credential(credential, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> update_credential(credential, %{field: bad_value}) +{:error, %Ecto.Changeset{}}
diff --git a/Lightning.Invocation.html b/Lightning.Invocation.html index 334f675c64..5a35ace881 100644 --- a/Lightning.Invocation.html +++ b/Lightning.Invocation.html @@ -519,8 +519,8 @@

change_dataclip(dataclip, attrs \\ %{})

Examples -
iex> change_dataclip(dataclip)
-%Ecto.Changeset{data: %Dataclip{}}
+
iex> change_dataclip(dataclip)
+%Ecto.Changeset{data: %Dataclip{}}
@@ -550,8 +550,8 @@

change_step(step, attrs \\ %{})

Examples -
iex> change_step(step)
-%Ecto.Changeset{data: %Step{}}
+
iex> change_step(step)
+%Ecto.Changeset{data: %Step{}}
@@ -611,11 +611,11 @@

create_dataclip(attrs \\ %{})

Examples -
iex> create_dataclip(%{field: value})
-{:ok, %Dataclip{}}
+
iex> create_dataclip(%{field: value})
+{:ok, %Dataclip{}}
 
-iex> create_dataclip(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> create_dataclip(%{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -643,11 +643,11 @@

delete_dataclip(dataclip)

Examples -
iex> delete_dataclip(dataclip)
-{:ok, %Dataclip{}}
+
iex> delete_dataclip(dataclip)
+{:ok, %Dataclip{}}
 
-iex> delete_dataclip(dataclip)
-{:error, %Ecto.Changeset{}}
+
iex> delete_dataclip(dataclip) +{:error, %Ecto.Changeset{}}
@@ -682,14 +682,14 @@

get_dataclip(step)

Examples -
iex> get_dataclip("27b73932-16c7-4a72-86a3-85d805ccff98")
-%Dataclip{}
+
iex> get_dataclip("27b73932-16c7-4a72-86a3-85d805ccff98")
+%Dataclip{}
 
-iex> get_dataclip("27b73932-16c7-4a72-86a3-85d805ccff98")
+iex> get_dataclip("27b73932-16c7-4a72-86a3-85d805ccff98")
 nil
 
-iex> get_dataclip(%Step{id: "a uuid"})
-%Dataclip{}
+
iex> get_dataclip(%Step{id: "a uuid"}) +%Dataclip{}
@@ -723,10 +723,10 @@

get_dataclip!(id)

Examples -
iex> get_dataclip!(123)
-%Dataclip{}
+
iex> get_dataclip!(123)
+%Dataclip{}
 
-iex> get_dataclip!(456)
+iex> get_dataclip!(456)
 ** (Ecto.NoResultsError)
@@ -924,10 +924,10 @@

get_step!(id)

Examples -
iex> get_step!(123)
-%Step{}
+
iex> get_step!(123)
+%Step{}
 
-iex> get_step!(456)
+iex> get_step!(456)
 ** (Ecto.NoResultsError)
@@ -1056,8 +1056,8 @@

list_dataclips()

Examples -
iex> list_dataclips()
-[%Dataclip{}, ...]
+
iex> list_dataclips()
+[%Dataclip{}, ...]
@@ -1166,8 +1166,8 @@

list_steps()

Examples -
iex> list_steps()
-[%Step{}, ...]
+
iex> list_steps()
+[%Step{}, ...]
@@ -1294,7 +1294,7 @@

search_workorders(project)

Example: -
search_workorders(%Project{id: 1}, %SearchParams{status: ["completed"]})
+
search_workorders(%Project{id: 1}, %SearchParams{status: ["completed"]})
@@ -1400,11 +1400,11 @@

update_dataclip(dataclip, attrs)

Examples -
iex> update_dataclip(dataclip, %{field: new_value})
-{:ok, %Dataclip{}}
+
iex> update_dataclip(dataclip, %{field: new_value})
+{:ok, %Dataclip{}}
 
-iex> update_dataclip(dataclip, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> update_dataclip(dataclip, %{field: bad_value}) +{:error, %Ecto.Changeset{}}
diff --git a/Lightning.Jobs.html b/Lightning.Jobs.html index b36df85ba8..d5ffef4dd7 100644 --- a/Lightning.Jobs.html +++ b/Lightning.Jobs.html @@ -306,8 +306,8 @@

change_job(job, attrs \\ %{})

Examples -
iex> change_job(job)
-%Ecto.Changeset{data: %Job{}}
+
iex> change_job(job)
+%Ecto.Changeset{data: %Job{}}
@@ -337,11 +337,11 @@

create_job(attrs \\ %{})

Examples -
iex> create_job(%{field: value})
-{:ok, %Job{}}
+
iex> create_job(%{field: value})
+{:ok, %Job{}}
 
-iex> create_job(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> create_job(%{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -405,10 +405,10 @@

get_job!(id)

Examples -
iex> get_job!(123)
-%Job{}
+
iex> get_job!(123)
+%Job{}
 
-iex> get_job!(456)
+iex> get_job!(456)
 ** (Ecto.NoResultsError)
@@ -620,11 +620,11 @@

update_job(job, attrs)

Examples -
iex> update_job(job, %{field: new_value})
-{:ok, %Job{}}
+
iex> update_job(job, %{field: new_value})
+{:ok, %Job{}}
 
-iex> update_job(job, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> update_job(job, %{field: bad_value}) +{:error, %Ecto.Changeset{}}
diff --git a/Lightning.KafkaTriggers.MessageRecovery.html b/Lightning.KafkaTriggers.MessageRecovery.html index 8b0f8532e2..b06358564d 100644 --- a/Lightning.KafkaTriggers.MessageRecovery.html +++ b/Lightning.KafkaTriggers.MessageRecovery.html @@ -152,7 +152,7 @@

an error during reprocessing. These files can be reprocessed if you think the error was transient.

Usage:

alias Lightning.KafkaTriggers.MessageRecovery case MessageRecovery.recover_messages(Lightning.Config.kafka_alternate_storage_file_path) do

:ok -> # Success code
-{:error, error_count} -> # Failure code

end

+{:error, error_count} -> # Failure code

end

diff --git a/Lightning.OauthClients.html b/Lightning.OauthClients.html index bb493ea616..f70f6f6840 100644 --- a/Lightning.OauthClients.html +++ b/Lightning.OauthClients.html @@ -267,8 +267,8 @@

change_client(client, attrs \\ %{})

Examples -
iex> change_client(%OauthClient{}, %{name: "New Client"})
-%Ecto.Changeset{...}
+
iex> change_client(%OauthClient{}, %{name: "New Client"})
+%Ecto.Changeset{...}
@@ -353,11 +353,11 @@

delete_client(client)

Examples -
iex> delete_client(client)
-{:ok, %OauthClient{}}
+
iex> delete_client(client)
+{:ok, %OauthClient{}}
 
-iex> delete_client(client)
-{:error, %Ecto.Changeset{}}
+
iex> delete_client(client) +{:error, %Ecto.Changeset{}}
@@ -403,10 +403,10 @@

get_client!(id)

Examples -
iex> get_client!(123)
-%OauthClient{}
+
iex> get_client!(123)
+%OauthClient{}
 
-iex> get_client!(456)
+iex> get_client!(456)
 ** (Ecto.NoResultsError)
@@ -447,9 +447,9 @@

list_clients(project)

Examples -

When given a Project:

iex> list_clients(%Project{id: 1})
-[%OauthClient{project_id: 1}, %OauthClient{project_id: 1}]

When given a User:

iex> list_clients(%User{id: 123})
-[%OauthClient{user_id: 123}, %OauthClient{user_id: 123}]
+

When given a Project:

iex> list_clients(%Project{id: 1})
+[%OauthClient{project_id: 1}, %OauthClient{project_id: 1}]

When given a User:

iex> list_clients(%User{id: 123})
+[%OauthClient{user_id: 123}, %OauthClient{user_id: 123}]
@@ -489,11 +489,11 @@

update_client(client, attrs)

Examples -
iex> update_client(client, %{field: new_value})
-{:ok, %OauthClient{}}
+
iex> update_client(client, %{field: new_value})
+{:ok, %OauthClient{}}
 
-iex> update_client(client, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> update_client(client, %{field: bad_value}) +{:error, %Ecto.Changeset{}}
diff --git a/Lightning.Policies.Permissions.html b/Lightning.Policies.Permissions.html index fb693ee227..b9ef0cc650 100644 --- a/Lightning.Policies.Permissions.html +++ b/Lightning.Policies.Permissions.html @@ -138,13 +138,13 @@

This module defines a unique interface managing authorizations in Lightning.

Users in Lightning have instance-wide and project-wide roles which determine their level of access to resources in the application. Fo rmore details see the documentation.

These authorizations policies are all implemented under the lib/lightning/policies folder. In that folder you can find 3 files:

  • The users.ex file has all the policies for the instances wide access levels
  • The project_users.ex file has all the policies for the project wide access levels
  • The permissions.ex file defines the Lightning.Policies.Permissions.can/4 interface. Which is a wrapper around the Bodyguard.permit/4 function. -We use that interface to be able to harmonize the use of policies accross the entire app.

All the policies are tested in the test/lightning/policies folder. And the test are written in a way that allows the reader to quickly who can do what in the app.

We have two variants of the Lightning.Policies.Permissions.can/4 interface:

  • Lightning.Policies.Permissions.can(policy, action, actor, resource) returns :ok if the actor can perform the action on the resource and {:error, :unauthorized} otherwise.
  • Lightning.Policies.Permissions.can?(policy, action, actor, resource) returns true if the actor can perform the action on the resource and false otherwise.

Here is an example of how we the Lightning.Policies.Permissions.can/4 interface to check if the a user can edit a job or not

can_edit_workflow = Lightning.Policies.ProjectUsers |> Lightning.Policies.Permissions.can?(:edit_workflow, socket.assigns.current_user, socket.assigns.project)
+We use that interface to be able to harmonize the use of policies accross the entire app.

All the policies are tested in the test/lightning/policies folder. And the test are written in a way that allows the reader to quickly who can do what in the app.

We have two variants of the Lightning.Policies.Permissions.can/4 interface:

  • Lightning.Policies.Permissions.can(policy, action, actor, resource) returns :ok if the actor can perform the action on the resource and {:error, :unauthorized} otherwise.
  • Lightning.Policies.Permissions.can?(policy, action, actor, resource) returns true if the actor can perform the action on the resource and false otherwise.

Here is an example of how we the Lightning.Policies.Permissions.can/4 interface to check if the a user can edit a job or not

can_edit_workflow = Lightning.Policies.ProjectUsers |> Lightning.Policies.Permissions.can?(:edit_workflow, socket.assigns.current_user, socket.assigns.project)
 
-if can_edit_workflow do
+if can_edit_workflow do
   # allow user to edit the workflow
-else
+else
   # quick user out
-end
+
end
@@ -220,11 +220,11 @@

can(policy, action, user, params \\ [])

Examples -
iex> can(Lightning.Policies.Users, :create_workflow, user, project)
+
iex> can(Lightning.Policies.Users, :create_workflow, user, project)
 :ok
 
-iex> can(Lightning.Policies.Users, :create_project, user, %{})
-{:error, :unauthorized}
+
iex> can(Lightning.Policies.Users, :create_project, user, %{}) +{:error, :unauthorized}
@@ -254,10 +254,10 @@

can?(policy, action, user, params \\ []) Examples

-
iex> can(Lightning.Policies.Users, :create_workflow, user, project)
+
iex> can(Lightning.Policies.Users, :create_workflow, user, project)
 true
 
-iex> can(Lightning.Policies.Users, :create_project, user, %{})
+iex> can(Lightning.Policies.Users, :create_project, user, %{})
 false
diff --git a/Lightning.Projects.html b/Lightning.Projects.html index 082a4abf87..9d08fb28cb 100644 --- a/Lightning.Projects.html +++ b/Lightning.Projects.html @@ -662,8 +662,8 @@

change_project(project, attrs \\ %{})

Examples -
iex> change_project(project)
-%Ecto.Changeset{data: %Project{}}
+
iex> change_project(project)
+%Ecto.Changeset{data: %Project{}}
@@ -695,11 +695,11 @@

create_project(attrs \\ %{}, schedule_email Examples

-
iex> create_project(%{field: value})
-{:ok, %Project{}}
+
iex> create_project(%{field: value})
+{:ok, %Project{}}
 
-iex> create_project(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> create_project(%{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -728,11 +728,11 @@

delete_project(project)

Examples -
iex> delete_project(project)
-{:ok, %Project{}}
+
iex> delete_project(project)
+{:ok, %Project{}}
 
-iex> delete_project(project)
-{:error, %Ecto.Changeset{}}
+
iex> delete_project(project) +{:error, %Ecto.Changeset{}}
@@ -797,8 +797,8 @@

export_project(atom, project_id, snapshot_i Examples

-
iex> export_project(:yaml, project_id)
-{:ok, string}
+
iex> export_project(:yaml, project_id)
+{:ok, string}
@@ -870,10 +870,10 @@

get_project!(id)

Examples -
iex> get_project!(123)
-%Project{}
+
iex> get_project!(123)
+%Project{}
 
-iex> get_project!(456)
+iex> get_project!(456)
 ** (Ecto.NoResultsError)
@@ -968,10 +968,10 @@

get_project_user!(id)

Examples -
iex> get_project_user!(123)
-%ProjectUser{}
+
iex> get_project_user!(123)
+%ProjectUser{}
 
-iex> get_project_user!(456)
+iex> get_project_user!(456)
 ** (Ecto.NoResultsError)
@@ -1001,16 +1001,16 @@

get_project_user_role(user, project)

Examples -
iex> get_project_user_role(user, project)
+
iex> get_project_user_role(user, project)
 :admin
 
-iex> get_project_user_role(user, project)
+iex> get_project_user_role(user, project)
 :viewer
 
-iex> get_project_user_role(user, project)
+iex> get_project_user_role(user, project)
 :editor
 
-iex> get_project_user_role(user, project)
+iex> get_project_user_role(user, project)
 :owner
@@ -1061,10 +1061,10 @@

get_project_with_users!(id)

Examples -
iex> get_project!(123)
-%Project{}
+
iex> get_project!(123)
+%Project{}
 
-iex> get_project!(456)
+iex> get_project!(456)
 ** (Ecto.NoResultsError)
@@ -1242,8 +1242,8 @@

list_projects()

Examples -
iex> list_projects()
-[%Project{}, ...]
+
iex> list_projects()
+[%Project{}, ...]
@@ -1723,11 +1723,11 @@

update_project(project, attrs)

Examples -
iex> update_project(project, %{field: new_value})
-{:ok, %Project{}}
+
iex> update_project(project, %{field: new_value})
+{:ok, %Project{}}
 
-iex> update_project(project, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> update_project(project, %{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -1755,11 +1755,11 @@

update_project_user(project_user, attrs) Examples

-
iex> update_project_user(project_user, %{field: new_value})
-{:ok, %ProjectUser{}}
+
iex> update_project_user(project_user, %{field: new_value})
+{:ok, %ProjectUser{}}
 
-iex> update_project_user(projectUser, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> update_project_user(projectUser, %{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -1840,8 +1840,8 @@

validate_for_deletion(project, attrs)

Examples -
iex> validate_for_deletion(project)
-%Ecto.Changeset{data: %Project{}}
+
iex> validate_for_deletion(project)
+%Ecto.Changeset{data: %Project{}}
diff --git a/Lightning.PromEx.html b/Lightning.PromEx.html index ef0c878461..8d7a393777 100644 --- a/Lightning.PromEx.html +++ b/Lightning.PromEx.html @@ -142,24 +142,24 @@

more details regarding configuring PromEx:

config :lightning, Lightning.PromEx,
   disabled: false,
   manual_metrics_start_delay: :no_delay,
-  drop_metrics_groups: [],
+  drop_metrics_groups: [],
   grafana: :disabled,
   metrics_server: :disabled
  • Add this module to your application supervision tree. It should be one of the first things that is started so that no Telemetry events are missed. For example, if PromEx is started after your Repo module, you will miss Ecto's init events and the dashboards -will be missing some data points:

    def start(_type, _args) do
    -  children = [
    +will be missing some data points:

    def start(_type, _args) do
    +  children = [
         Lightning.PromEx,
     
         ...
    -  ]
    +  ]
     
       ...
    -end
  • Update your endpoint.ex file to expose your metrics (or configure a standalone +end

  • Update your endpoint.ex file to expose your metrics (or configure a standalone server using the :metrics_server config options). Be sure to put this plug before your Plug.Telemetry entry so that you can avoid having calls to your /metrics endpoint create their own metrics and logs which can pollute your logs/metrics given -that Prometheus will scrape at a regular interval and that can get noisy:

    defmodule LightningWeb.Endpoint do
    +that Prometheus will scrape at a regular interval and that can get noisy:

    defmodule LightningWeb.Endpoint do
       use Phoenix.Endpoint, otp_app: :lightning
     
       ...
    @@ -167,7 +167,7 @@ 

    plug PromEx.Plug, prom_ex_module: Lightning.PromEx ... -end

  • Update the list of plugins in the plugins/0 function return list to reflect your +end

  • Update the list of plugins in the plugins/0 function return list to reflect your application's dependencies. Also update the list of dashboards that are to be uploaded to Grafana in the dashboards/0 function.

  • diff --git a/Lightning.Repo.html b/Lightning.Repo.html index e4b46a7cc2..395cbdc3f0 100644 --- a/Lightning.Repo.html +++ b/Lightning.Repo.html @@ -1738,13 +1738,13 @@

    transact(fun, opts \\ [])

    A small wrapper around Repo.transaction/2.

    Commits the transaction if the lambda returns :ok or {:ok, result}, rolling it back if the lambda returns :error or {:error, reason}. In both -cases, the function returns the result of the lambda.

    Example:

    Repo.transact(fn ->
    -  with {:ok, user} <- Accounts.create_user(params),
    -      {:ok, _log} <- Logs.log_action(:user_registered, user),
    -      {:ok, _job} <- Mailer.enqueue_email_confirmation(user) do
    -    {:ok, user}
    -  end
    -end)

    From blog post found here

    +cases, the function returns the result of the lambda.

    Example:

    Repo.transact(fn ->
    +  with {:ok, user} <- Accounts.create_user(params),
    +      {:ok, _log} <- Logs.log_action(:user_registered, user),
    +      {:ok, _job} <- Mailer.enqueue_email_confirmation(user) do
    +    {:ok, user}
    +  end
    +end)

    From blog post found here

    diff --git a/Lightning.Runs.Query.html b/Lightning.Runs.Query.html index ef44070bfd..f1877fc25e 100644 --- a/Lightning.Runs.Query.html +++ b/Lightning.Runs.Query.html @@ -241,7 +241,7 @@

    eligible_for_claim()

    This query does not currently take into account the priority of the run. To allow for prioritization, the query should be updated to order by -priority.

    eligible_for_claim() |> prepend_order_by([:priority])
    +priority.

    eligible_for_claim() |> prepend_order_by([:priority])
    diff --git a/Lightning.Runs.html b/Lightning.Runs.html index f5ea36a1c4..9078c7f3ad 100644 --- a/Lightning.Runs.html +++ b/Lightning.Runs.html @@ -477,7 +477,7 @@

    get(id, opts \\ [])

    -

    Get a run by id.

    Optionally preload associations by passing a list of atoms to :include.

    Lightning.Runs.get(id, include: [:workflow])
    +

    Get a run by id.

    Optionally preload associations by passing a list of atoms to :include.

    Lightning.Runs.get(id, include: [:workflow])
    diff --git a/Lightning.Runtime.LogAgent.html b/Lightning.Runtime.LogAgent.html index a9c100ed90..c50548d364 100644 --- a/Lightning.Runtime.LogAgent.html +++ b/Lightning.Runtime.LogAgent.html @@ -138,9 +138,9 @@

    Agent facility to consume STDOUT/STDERR byte by byte.

    Since it works on a byte by byte basis, you will need to perform line-splitting -yourself.

    Usage:

    {:ok, log} = LogAgent.start_link()
    -"foo" = LogAgent.process_chunk(log, {:stdout, "foo"})
    -"foobar" = LogAgent.process_chunk(log, {:stdout, "bar"})
    +yourself.

    Usage:

    {:ok, log} = LogAgent.start_link()
    +"foo" = LogAgent.process_chunk(log, {:stdout, "foo"})
    +"foobar" = LogAgent.process_chunk(log, {:stdout, "bar"})
    diff --git a/Lightning.Runtime.RuntimeManager.html b/Lightning.Runtime.RuntimeManager.html index cbf504dcee..5a9e1f9ee4 100644 --- a/Lightning.Runtime.RuntimeManager.html +++ b/Lightning.Runtime.RuntimeManager.html @@ -146,8 +146,8 @@

    Sample:

    config :lightining, Elixir.Lightning.Runtime.RuntimeManager,

    version: "0.1.0",
     start: true,
     args: ~w(js/app.js --bundle --target=es2016 --outdir=../priv/static/assets),
    -cd: Path.expand("../assets", __DIR__),
    -env: %{}

    Options:

    • :version - the expected runtime version

    • :start - flag to start the runtime manager. If false the GenServer +cd: Path.expand("../assets", __DIR__), +env: %{}

    Options:

    • :version - the expected runtime version

    • :start - flag to start the runtime manager. If false the GenServer won't be started

    • :path - the path to find the runtime executable at. By default, it is automatically downloaded and placed inside the _build directory of your current app

    Overriding the :path is not recommended, as we will automatically diff --git a/Lightning.Scrubber.html b/Lightning.Scrubber.html index 90fd64e885..037f473dc9 100644 --- a/Lightning.Scrubber.html +++ b/Lightning.Scrubber.html @@ -137,11 +137,11 @@

    -

    Process used to scrub strings of sensitive information.

    Can be started via start_link/1.

    {:ok, scrubber} =
    -  Lightning.Scrubber.start_link(
    +

    Process used to scrub strings of sensitive information.

    Can be started via start_link/1.

    {:ok, scrubber} =
    +  Lightning.Scrubber.start_link(
         samples:
    -      Lightning.Credentials.sensitive_values_for(credential)
    -  )

    Takes an optional :name key, in case you need to name the process.

    +
    Lightning.Credentials.sensitive_values_for(credential) + )

    Takes an optional :name key, in case you need to name the process.

    diff --git a/Lightning.Storage.GCS.html b/Lightning.Storage.GCS.html index 2d8a480fb5..1f457f6f1b 100644 --- a/Lightning.Storage.GCS.html +++ b/Lightning.Storage.GCS.html @@ -150,10 +150,10 @@

    Example Usage

    # Store a file in GCS
    -Lightning.Storage.GCS.store("/path/to/source", "destination/path")
    +Lightning.Storage.GCS.store("/path/to/source", "destination/path")
     
     # Get a signed URL for the stored file
    -{:ok, url} = Lightning.Storage.GCS.get_url("destination/path")
    +
    {:ok, url} = Lightning.Storage.GCS.get_url("destination/path")
    diff --git a/Lightning.Storage.Local.html b/Lightning.Storage.Local.html index c33f7cbc83..03e29540bd 100644 --- a/Lightning.Storage.Local.html +++ b/Lightning.Storage.Local.html @@ -156,11 +156,11 @@

    Example Usage

    # Store a file
    -{:ok, filename} =
    -  Lightning.Storage.Local.store("/path/to/source", "destination/path")
    +{:ok, filename} =
    +  Lightning.Storage.Local.store("/path/to/source", "destination/path")
     
     # Get the URL for the stored file
    -{:ok, url} = Lightning.Storage.Local.get_url("destination/path")
    +
    {:ok, url} = Lightning.Storage.Local.get_url("destination/path")
    diff --git a/Lightning.Storage.ProjectFileDefinition.html b/Lightning.Storage.ProjectFileDefinition.html index dd76e1f5cb..d757cb1afe 100644 --- a/Lightning.Storage.ProjectFileDefinition.html +++ b/Lightning.Storage.ProjectFileDefinition.html @@ -138,13 +138,13 @@

    This module provides functionality for managing the storage and retrieval of project files.

    It handles operations related to storing project files, generating URLs for accessing these files, and constructing storage paths for exported files. It serves as an abstraction layer over the underlying storage mechanism provided by the Lightning.Storage module.

    ## Functions

    • store/2: Stores a file from a given source path into the storage system based on the file's path.
    • get_url/1: Retrieves the URL for accessing a stored file.
    • storage_path_for_exports/2: Constructs a storage path for exported files, defaulting to a .zip extension.

    ## Example Usage

      # Store a file
    -  Lightning.Storage.ProjectFileDefinition.store("/path/to/source", project_file)
    +  Lightning.Storage.ProjectFileDefinition.store("/path/to/source", project_file)
     
       # Get a URL for the stored file
    -  url = Lightning.Storage.ProjectFileDefinition.get_url(project_file)
    +  url = Lightning.Storage.ProjectFileDefinition.get_url(project_file)
     
       # Get the storage path for an exported file
    -  path = Lightning.Storage.ProjectFileDefinition.storage_path_for_exports(project_file)
    + path = Lightning.Storage.ProjectFileDefinition.storage_path_for_exports(project_file)

    diff --git a/Lightning.TaskWorker.html b/Lightning.TaskWorker.html index c44faaf133..11aeb1b2ea 100644 --- a/Lightning.TaskWorker.html +++ b/Lightning.TaskWorker.html @@ -140,7 +140,7 @@

    A TaskWorker with concurrency limits.

    A simple concurrency limiter that wraps Task.Supervisor, which already does have the ability to specify max_children; it throws an error when that limit is exceeded.

    To use it, start it like any other process; ideally in your supervision tree.

      ...,
    -  {Lightning.TaskWorker, name: :cli_task_worker, max_tasks: 4}

    Options

    • :max_tasks Defaults to the number of system schedulers available to the vm.
    + {Lightning.TaskWorker, name: :cli_task_worker, max_tasks: 4}

    Options

    • :max_tasks Defaults to the number of system schedulers available to the vm.
    diff --git a/Lightning.Validators.html b/Lightning.Validators.html index b093d9fe08..cdd6321271 100644 --- a/Lightning.Validators.html +++ b/Lightning.Validators.html @@ -233,10 +233,10 @@

    validate_exclusive(changeset, fields, messa

    Validate that only one of the fields is set at a time.

    Example:

    changeset
    -|> validate_exclusive(
    -  [:source_job_id, :source_trigger_id],
    +|> validate_exclusive(
    +  [:source_job_id, :source_trigger_id],
       "source_job_id and source_trigger_id are mutually exclusive"
    -)
    +)

    diff --git a/Lightning.VersionControl.GithubClient.html b/Lightning.VersionControl.GithubClient.html index 20a03e70dd..b957f0023f 100644 --- a/Lightning.VersionControl.GithubClient.html +++ b/Lightning.VersionControl.GithubClient.html @@ -868,11 +868,11 @@

    delete(client, url, opts)

    -

    Perform a DELETE request.

    See request/1 or request/2 for options definition.

    delete("/users")
    -delete("/users", query: [scope: "admin"])
    -delete(client, "/users")
    -delete(client, "/users", query: [scope: "admin"])
    -delete(client, "/users", body: %{name: "Jon"})
    +

    Perform a DELETE request.

    See request/1 or request/2 for options definition.

    delete("/users")
    +delete("/users", query: [scope: "admin"])
    +delete(client, "/users")
    +delete(client, "/users", query: [scope: "admin"])
    +delete(client, "/users", body: %{name: "Jon"})
    @@ -901,11 +901,11 @@

    delete!(client, url, opts)

    -

    Perform a DELETE request.

    See request!/1 or request!/2 for options definition.

    delete!("/users")
    -delete!("/users", query: [scope: "admin"])
    -delete!(client, "/users")
    -delete!(client, "/users", query: [scope: "admin"])
    -delete!(client, "/users", body: %{name: "Jon"})
    +

    Perform a DELETE request.

    See request!/1 or request!/2 for options definition.

    delete!("/users")
    +delete!("/users", query: [scope: "admin"])
    +delete!(client, "/users")
    +delete!(client, "/users", query: [scope: "admin"])
    +delete!(client, "/users", body: %{name: "Jon"})
    @@ -1021,11 +1021,11 @@

    get(client, url, opts)

    -

    Perform a GET request.

    See request/1 or request/2 for options definition.

    get("/users")
    -get("/users", query: [scope: "admin"])
    -get(client, "/users")
    -get(client, "/users", query: [scope: "admin"])
    -get(client, "/users", body: %{name: "Jon"})
    +

    Perform a GET request.

    See request/1 or request/2 for options definition.

    get("/users")
    +get("/users", query: [scope: "admin"])
    +get(client, "/users")
    +get(client, "/users", query: [scope: "admin"])
    +get(client, "/users", body: %{name: "Jon"})
    @@ -1054,11 +1054,11 @@

    get!(client, url, opts)

    -

    Perform a GET request.

    See request!/1 or request!/2 for options definition.

    get!("/users")
    -get!("/users", query: [scope: "admin"])
    -get!(client, "/users")
    -get!(client, "/users", query: [scope: "admin"])
    -get!(client, "/users", body: %{name: "Jon"})
    +

    Perform a GET request.

    See request!/1 or request!/2 for options definition.

    get!("/users")
    +get!("/users", query: [scope: "admin"])
    +get!(client, "/users")
    +get!(client, "/users", query: [scope: "admin"])
    +get!(client, "/users", body: %{name: "Jon"})
    @@ -1262,11 +1262,11 @@

    head(client, url, opts)

    -

    Perform a HEAD request.

    See request/1 or request/2 for options definition.

    head("/users")
    -head("/users", query: [scope: "admin"])
    -head(client, "/users")
    -head(client, "/users", query: [scope: "admin"])
    -head(client, "/users", body: %{name: "Jon"})
    +

    Perform a HEAD request.

    See request/1 or request/2 for options definition.

    head("/users")
    +head("/users", query: [scope: "admin"])
    +head(client, "/users")
    +head(client, "/users", query: [scope: "admin"])
    +head(client, "/users", body: %{name: "Jon"})
    @@ -1295,11 +1295,11 @@

    head!(client, url, opts)

    -

    Perform a HEAD request.

    See request!/1 or request!/2 for options definition.

    head!("/users")
    -head!("/users", query: [scope: "admin"])
    -head!(client, "/users")
    -head!(client, "/users", query: [scope: "admin"])
    -head!(client, "/users", body: %{name: "Jon"})
    +

    Perform a HEAD request.

    See request!/1 or request!/2 for options definition.

    head!("/users")
    +head!("/users", query: [scope: "admin"])
    +head!(client, "/users")
    +head!(client, "/users", query: [scope: "admin"])
    +head!(client, "/users", body: %{name: "Jon"})
    @@ -1327,11 +1327,11 @@

    options(client, url, opts)

    -

    Perform a OPTIONS request.

    See request/1 or request/2 for options definition.

    options("/users")
    -options("/users", query: [scope: "admin"])
    -options(client, "/users")
    -options(client, "/users", query: [scope: "admin"])
    -options(client, "/users", body: %{name: "Jon"})
    +

    Perform a OPTIONS request.

    See request/1 or request/2 for options definition.

    options("/users")
    +options("/users", query: [scope: "admin"])
    +options(client, "/users")
    +options(client, "/users", query: [scope: "admin"])
    +options(client, "/users", body: %{name: "Jon"})
    @@ -1360,11 +1360,11 @@

    options!(client, url, opts)

    -

    Perform a OPTIONS request.

    See request!/1 or request!/2 for options definition.

    options!("/users")
    -options!("/users", query: [scope: "admin"])
    -options!(client, "/users")
    -options!(client, "/users", query: [scope: "admin"])
    -options!(client, "/users", body: %{name: "Jon"})
    +

    Perform a OPTIONS request.

    See request!/1 or request!/2 for options definition.

    options!("/users")
    +options!("/users", query: [scope: "admin"])
    +options!(client, "/users")
    +options!(client, "/users", query: [scope: "admin"])
    +options!(client, "/users", body: %{name: "Jon"})
    @@ -1393,10 +1393,10 @@

    patch(client, url, body, opts)

    -

    Perform a PATCH request.

    See request/1 or request/2 for options definition.

    patch("/users", %{name: "Jon"})
    -patch("/users", %{name: "Jon"}, query: [scope: "admin"])
    -patch(client, "/users", %{name: "Jon"})
    -patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    +

    Perform a PATCH request.

    See request/1 or request/2 for options definition.

    patch("/users", %{name: "Jon"})
    +patch("/users", %{name: "Jon"}, query: [scope: "admin"])
    +patch(client, "/users", %{name: "Jon"})
    +patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    @@ -1425,10 +1425,10 @@

    patch!(client, url, body, opts)

    -

    Perform a PATCH request.

    See request!/1 or request!/2 for options definition.

    patch!("/users", %{name: "Jon"})
    -patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
    -patch!(client, "/users", %{name: "Jon"})
    -patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    +

    Perform a PATCH request.

    See request!/1 or request!/2 for options definition.

    patch!("/users", %{name: "Jon"})
    +patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
    +patch!(client, "/users", %{name: "Jon"})
    +patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    @@ -1457,10 +1457,10 @@

    post(client, url, body, opts)

    -

    Perform a POST request.

    See request/1 or request/2 for options definition.

    post("/users", %{name: "Jon"})
    -post("/users", %{name: "Jon"}, query: [scope: "admin"])
    -post(client, "/users", %{name: "Jon"})
    -post(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    +

    Perform a POST request.

    See request/1 or request/2 for options definition.

    post("/users", %{name: "Jon"})
    +post("/users", %{name: "Jon"}, query: [scope: "admin"])
    +post(client, "/users", %{name: "Jon"})
    +post(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    @@ -1489,10 +1489,10 @@

    post!(client, url, body, opts)

    -

    Perform a POST request.

    See request!/1 or request!/2 for options definition.

    post!("/users", %{name: "Jon"})
    -post!("/users", %{name: "Jon"}, query: [scope: "admin"])
    -post!(client, "/users", %{name: "Jon"})
    -post!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    +

    Perform a POST request.

    See request!/1 or request!/2 for options definition.

    post!("/users", %{name: "Jon"})
    +post!("/users", %{name: "Jon"}, query: [scope: "admin"])
    +post!(client, "/users", %{name: "Jon"})
    +post!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    @@ -1521,10 +1521,10 @@

    put(client, url, body, opts)

    -

    Perform a PUT request.

    See request/1 or request/2 for options definition.

    put("/users", %{name: "Jon"})
    -put("/users", %{name: "Jon"}, query: [scope: "admin"])
    -put(client, "/users", %{name: "Jon"})
    -put(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    +

    Perform a PUT request.

    See request/1 or request/2 for options definition.

    put("/users", %{name: "Jon"})
    +put("/users", %{name: "Jon"}, query: [scope: "admin"])
    +put(client, "/users", %{name: "Jon"})
    +put(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    @@ -1553,10 +1553,10 @@

    put!(client, url, body, opts)

    -

    Perform a PUT request.

    See request!/1 or request!/2 for options definition.

    put!("/users", %{name: "Jon"})
    -put!("/users", %{name: "Jon"}, query: [scope: "admin"])
    -put!(client, "/users", %{name: "Jon"})
    -put!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    +

    Perform a PUT request.

    See request!/1 or request!/2 for options definition.

    put!("/users", %{name: "Jon"})
    +put!("/users", %{name: "Jon"}, query: [scope: "admin"])
    +put!(client, "/users", %{name: "Jon"})
    +put!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    @@ -1598,11 +1598,11 @@

    request(client \\ %Tesla.Client{}, options) Examples

    -
    ExampleApi.request(method: :get, url: "/users/path")
    +
    ExampleApi.request(method: :get, url: "/users/path")
     
     # use shortcut methods
    -ExampleApi.get("/users/1")
    -ExampleApi.post(client, "/users", %{name: "Jon"})
    +
    ExampleApi.get("/users/1") +ExampleApi.post(client, "/users", %{name: "Jon"})
    @@ -1660,11 +1660,11 @@

    trace(client, url, opts)

    -

    Perform a TRACE request.

    See request/1 or request/2 for options definition.

    trace("/users")
    -trace("/users", query: [scope: "admin"])
    -trace(client, "/users")
    -trace(client, "/users", query: [scope: "admin"])
    -trace(client, "/users", body: %{name: "Jon"})
    +

    Perform a TRACE request.

    See request/1 or request/2 for options definition.

    trace("/users")
    +trace("/users", query: [scope: "admin"])
    +trace(client, "/users")
    +trace(client, "/users", query: [scope: "admin"])
    +trace(client, "/users", body: %{name: "Jon"})
    @@ -1693,11 +1693,11 @@

    trace!(client, url, opts)

    -

    Perform a TRACE request.

    See request!/1 or request!/2 for options definition.

    trace!("/users")
    -trace!("/users", query: [scope: "admin"])
    -trace!(client, "/users")
    -trace!(client, "/users", query: [scope: "admin"])
    -trace!(client, "/users", body: %{name: "Jon"})
    +

    Perform a TRACE request.

    See request!/1 or request!/2 for options definition.

    trace!("/users")
    +trace!("/users", query: [scope: "admin"])
    +trace!(client, "/users")
    +trace!(client, "/users", query: [scope: "admin"])
    +trace!(client, "/users", body: %{name: "Jon"})
    diff --git a/Lightning.WebhookAuthMethods.html b/Lightning.WebhookAuthMethods.html index dd25c314ed..c4890c6375 100644 --- a/Lightning.WebhookAuthMethods.html +++ b/Lightning.WebhookAuthMethods.html @@ -347,15 +347,15 @@

    create_auth_method(attrs, list)

    Examples -
    • Creating a WebhookAuthMethod without an associated trigger:

      iex> create_auth_method(%{valid_attributes}, actor: %User{})
      -{:ok, %WebhookAuthMethod{}}
      +
      • Creating a WebhookAuthMethod without an associated trigger:

        iex> create_auth_method(%{valid_attributes}, actor: %User{})
        +{:ok, %WebhookAuthMethod{}}
         
        -iex> create_auth_method(%{invalid_attributes}, actor: %User{})
        -{:error, %Ecto.Changeset{}}
      • Creating a WebhookAuthMethod with an associated trigger:

        iex> create_auth_method(%Trigger{}, %{valid_attributes}, actor: %User{})
        -{:ok, %WebhookAuthMethod{}}
        +iex> create_auth_method(%{invalid_attributes}, actor: %User{})
        +{:error, %Ecto.Changeset{}}
      • Creating a WebhookAuthMethod with an associated trigger:

        iex> create_auth_method(%Trigger{}, %{valid_attributes}, actor: %User{})
        +{:ok, %WebhookAuthMethod{}}
         
        -iex> create_auth_method(%Trigger{}, %{invalid_attributes}, actor: %User{})
        -{:error, %Ecto.Changeset{}}

      +iex> create_auth_method(%Trigger{}, %{invalid_attributes}, actor: %User{}) +{:error, %Ecto.Changeset{}}

    @@ -440,9 +440,9 @@

    create_changeset(webhook_auth_method, param Examples

    -
    • Creating a changeset for an API type auth method:

      iex> Lightning.Workflows.create_changeset(%WebhookAuthMethod{auth_type: :api}, %{})
      -%WebhookAuthMethod{api_key: some_new_api_key}
    • Creating a changeset for a non-API type auth method:

      iex> Lightning.Workflows.create_changeset(%WebhookAuthMethod{auth_type: :other}, %{})
      -%WebhookAuthMethod{}
    +
    • Creating a changeset for an API type auth method:

      iex> Lightning.Workflows.create_changeset(%WebhookAuthMethod{auth_type: :api}, %{})
      +%WebhookAuthMethod{api_key: some_new_api_key}
    • Creating a changeset for a non-API type auth method:

      iex> Lightning.Workflows.create_changeset(%WebhookAuthMethod{auth_type: :other}, %{})
      +%WebhookAuthMethod{}
    @@ -490,9 +490,9 @@

    delete_auth_method(auth_method)

    Examples -
    • Successful deletion:

      iex> delete_auth_method(%WebhookAuthMethod{id: "some_id"})
      -{:ok, %WebhookAuthMethod{}}
    • Deletion fails due to the item not existing or other conflict:

      iex> delete_auth_method(%WebhookAuthMethod{id: "non_existing_id"})
      -{:error, reason}

    +
    • Successful deletion:

      iex> delete_auth_method(%WebhookAuthMethod{id: "some_id"})
      +{:ok, %WebhookAuthMethod{}}
    • Deletion fails due to the item not existing or other conflict:

      iex> delete_auth_method(%WebhookAuthMethod{id: "non_existing_id"})
      +{:error, reason}

    @@ -545,8 +545,8 @@

    find_by_api_key(api_key, project)

    Examples -
    • When a matching WebhookAuthMethod is found:

      iex> Lightning.Workflows.find_by_api_key("existing_api_key", %Project{id: "existing_project_id"})
      -%WebhookAuthMethod{}
    • When there is no matching WebhookAuthMethod:

      iex> Lightning.Workflows.find_by_api_key("non_existing_api_key", %Project{id: "existing_project_id"})
      +
      • When a matching WebhookAuthMethod is found:

        iex> Lightning.Workflows.find_by_api_key("existing_api_key", %Project{id: "existing_project_id"})
        +%WebhookAuthMethod{}
      • When there is no matching WebhookAuthMethod:

        iex> Lightning.Workflows.find_by_api_key("non_existing_api_key", %Project{id: "existing_project_id"})
         nil
    @@ -599,8 +599,8 @@

    find_by_id!(id)

    Examples -

    + {:ok, snapshots} +end)

    @@ -2456,7 +2456,7 @@

    will be less than v0.10.0 and the final states are not guaranteed to be accurate for workflows with multiple branches and leaf nodes with varying exit reasons.

    The migration scripts can be run with a single function call in SetupUtils from -a connect iex session:

    Lightning.SetupUtils.approximate_state_for_attempts_and_workorders()

    Note that (like lots of other functionality in SetupUtils, calling this +a connect iex session:

    Lightning.SetupUtils.approximate_state_for_attempts_and_workorders()

    Note that (like lots of other functionality in SetupUtils, calling this function is a destructive action and you should only do it if you've backed up your data and you know what you're doing.)

    As always, we recommend backing up your data before migrating. (And thanks for bearing with us as we move towards our first stable Lightning release.)

    diff --git a/deployment.html b/deployment.html index 9940e188e5..5fc7cd45e0 100644 --- a/deployment.html +++ b/deployment.html @@ -261,9 +261,9 @@

    within the subdirectory. The file will be named based on the pattern <trigger_id>_<message_topic>_<message_partition>_<message_offset>.json.

    To recover the persisted messages, it is suggested that the affected triggers be disabled before commencing. Once this is done, the following code needs to -be run from an IEx console on each node that is running Lightning:

    Lightning.KafkaTriggers.MessageRecovery.recover_messages(
    -  Lightning.Config.kafka_alternate_storage_file_path()
    -)

    Further details regarding the behaviour of MessageRecovery.recover_messages/1 +be run from an IEx console on each node that is running Lightning:

    Lightning.KafkaTriggers.MessageRecovery.recover_messages(
    +  Lightning.Config.kafka_alternate_storage_file_path()
    +)

    Further details regarding the behaviour of MessageRecovery.recover_messages/1 can be found in the module documentation of MessageRecovery. Recovered messages will have the .json extension modified to .json.recovered but they will be left in place. Future recovery runs will not process files that have diff --git a/readme.html b/readme.html index 876ff50e75..362e2157e7 100644 --- a/readme.html +++ b/readme.html @@ -408,7 +408,7 @@

    Problems with Debian

    If you're getting this error on debian

    ==> earmark_parser
    -Compiling 1 file (.yrl)
    +Compiling 1 file (.yrl)
     /usr/lib/erlang/lib/parsetools-2.3.1/include/yeccpre.hrl: no such file or directory
     could not compile dependency :earmark_parser, "mix compile" failed. You can recompile this dependency with "mix deps.compile earmark_parser", update it with "mix deps.update earmark_parser" or clean it with "mix deps.clean earmark_parser"

    You need to install erlang development environment sudo apt install erlang-dev refer to this issue

    @@ -431,12 +431,12 @@

    Versions

    The build may not work on old versions of Docker and Docker docker compose run --rm web mix ecto.migrate docker compose up -

    Apple Silicon

    When running docker compose up on Apple Silicon (M1, M2, M3), you might encounter the following error:

    > [web 20/20] RUN npm install --prefix assets:
    +

    Apple Silicon

    When running docker compose up on Apple Silicon (M1, M2, M3), you might encounter the following error:

    > [web 20/20] RUN npm install --prefix assets:
     0.091 rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
     0.091  Trace/breakpoint trap
     ------
     failed to solve: process "/bin/sh -c npm install --prefix assets" did not complete successfully: exit code: 133

    You can solve this by setting the default docker platform to linux/amd64, i.e. DOCKER_DEFAULT_PLATFORM=linux/amd64. -You can read more on this here: https://stackoverflow.com/questions/71040681/qemu-x86-64-could-not-open-lib64-ld-linux-x86-64-so-2-no-such-file-or-direc

    You might also run into:

    [notice] Application ssl exited: exited in: :ssl_app.start(:normal, [])
    +You can read more on this here: https://stackoverflow.com/questions/71040681/qemu-x86-64-could-not-open-lib64-ld-linux-x86-64-so-2-no-such-file-or-direc

    You might also run into:

    [notice] Application ssl exited: exited in: :ssl_app.start(:normal, [])
      ** (EXIT) an exception was raised:
          ** (ArgumentError) could not call Module.put_attribute/3 because the module Lightning.MixProject is already compiled
              (elixir 1.16.2) lib/module.ex:2360: Module.assert_not_readonly!/2
    @@ -460,8 +460,8 @@ 

    Versions

    The build may not work on old versions of Docker and Docker lib/mix/tasks/compile.rambo.ex:89: Mix.Tasks.Compile.Rambo.compile!/0 lib/mix/tasks/compile.rambo.ex:51: Mix.Tasks.Compile.Rambo.run/1 - (mix 1.14.2) lib/mix/task.ex:421: anonymous fn/3 in Mix.Task.run_task/4 - (mix 1.14.2) lib/mix/cli.ex:84: Mix.CLI.run_task/2

    You can resolve this error by installing the Rust compiler using Homebrew. Run + (mix 1.14.2) lib/mix/task.ex:421: anonymous fn/3 in Mix.Task.run_task/4 + (mix 1.14.2) lib/mix/cli.ex:84: Mix.CLI.run_task/2

    You can resolve this error by installing the Rust compiler using Homebrew. Run the following command in your terminal: brew install rust

    If you have already compiled Rambo explicitly via mix compile.rambo, and you are still seeing the following error:

    sh: /path_to_directory/Lightning/_build/dev/lib/rambo/priv/rambo: No such file or directory
     sh: line 0: exec: /path_to_directory/Lightning/_build/dev/lib/rambo/priv/rambo: cannot execute: No such file or directory

    You can try renaming deps/rambo/priv/rambo-mac to deps/rambo/priv/rambo.

    If neither of the approaches above work, please raise an issue.