Skip to content

Conversation

@monyarm
Copy link
Contributor

@monyarm monyarm commented Jun 20, 2024

No description provided.

@monyarm monyarm force-pushed the feat/machine_create branch from 00b941d to 8c7b681 Compare June 26, 2024 01:33
@PetarKirov PetarKirov force-pushed the feat/CD branch 3 times, most recently from b5368a3 to fcf842e Compare July 2, 2024 15:50
Base automatically changed from feat/CD to main July 2, 2024 17:45
@monyarm monyarm force-pushed the feat/machine_create branch 12 times, most recently from 66797ca to b9b7a6c Compare April 7, 2025 12:11
@monyarm monyarm force-pushed the feat/machine_create branch from 262859d to f00425a Compare April 10, 2025 10:46
@monyarm monyarm enabled auto-merge (rebase) April 10, 2025 10:46
@github-actions
Copy link
Contributor

Thanks for your Pull Request!

Below you will find a summary of the cachix status of each package, for each supported platform.

package x86_64-linux x86_64-darwin aarch64-darwin
cachix ❌ build failed ❌ build failed ❌ build failed
dcd ✅ cached 🚫 not supported 🚫 not supported
dmd ✅ cached 🚫 not supported 🚫 not supported
dscanner ✅ cached 🚫 not supported 🚫 not supported
dub ✅ cached ✅ cached ✅ cached
folder-size-metrics ✅ cached 🚫 not supported 🚫 not supported
foundry ✅ cached ✅ cached ✅ cached
geth ✅ cached 🚫 not supported ✅ cached
ldc ✅ cached 🚫 not supported 🚫 not supported
lido-withdrawals-automation ✅ cached ✅ cached ✅ cached
mcl ✅ cached 🚫 not supported 🚫 not supported
mev-boost ✅ cached 🚫 not supported 🚫 not supported
nethermind ✅ cached 🚫 not supported 🚫 not supported
nimbus ✅ cached 🚫 not supported 🚫 not supported
nix ❌ build failed ❌ build failed ❌ build failed
nix-eval-jobs ❌ build failed ❌ build failed ❌ build failed
nix-fast-build ❌ build failed ❌ build failed ❌ build failed
pyroscope ✅ cached ✅ cached ✅ cached
random-alerts ✅ cached ✅ cached ✅ cached
rustToolchain ✅ cached ✅ cached ✅ cached
secret ✅ cached 🚫 not supported ✅ cached
serve-d ✅ cached 🚫 not supported 🚫 not supported
terraform ✅ cached 🚫 not supported 🚫 not supported
terranix ✅ cached 🚫 not supported 🚫 not supported
validator-ejector ✅ cached 🚫 not supported 🚫 not supported
web3signer ✅ cached 🚫 not supported 🚫 not supported

@monyarm monyarm merged commit a26a713 into main Apr 10, 2025
23 checks passed
@monyarm monyarm deleted the feat/machine_create branch April 10, 2025 10:51
import std.array : join;
import std.algorithm : map;
import std.conv : to;
import std.stdio : writeln;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like this line is unused:

Suggested change
import std.stdio : writeln;

coda.deleteRow("dEJJPwdxcw", tables[0].id, resp[0]);
}

void updateOrInsertRow(string docId, string tableId, RowValues values) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

According to the Coda Api docs, we should be able to directly create an "Upsert" request, without first fetching the data:

https://coda.io/developers/apis/v1#tag/Rows/operation/upsertRows

Can you look into directly doing an upsert?

info.hardwareInfo.displayInfo = getDisplayInfo();
info.hardwareInfo.graphicsProcessorInfo = getGraphicsProcessorInfo();

if (params.codaApiToken) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Inform the user of this conditional behavior by logging:

  • No Coda API token specified -> not uploading to Coda
  • Coda API token specified -> uploading

(feed free to rephrase the messages)

{
}
}
Params params;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Avoid global variables, as they make the control flow harder to reason about as the codebase evolves.

export void host_info()
{
const params = parseEnv!Params;
params = parseEnv!Params;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should remain a local const variable. If necessary add parameters to the functions that need to access it.

folder-size-metrics = pkgs.callPackage ./folder-size-metrics { };
}
// optionalAttrs (system == "x86_64-linux") {
// optionalAttrs (system == "x86_64-linux") rec {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we need to make this attrset recursive:

Suggested change
// optionalAttrs (system == "x86_64-linux") rec {
// optionalAttrs (system == "x86_64-linux") {

import mcl.utils.number : humanReadableSize;
import mcl.utils.array : uniqIfSame;
import mcl.utils.nix : Literal;
import mcl.utils.coda;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use selective imports:

Suggested change
import mcl.utils.coda;
import mcl.utils.coda : CodaApiClient, RowValues, CodaCell;

@monyarm monyarm restored the feat/machine_create branch April 10, 2025 11:07
@monyarm monyarm deleted the feat/machine_create branch April 10, 2025 11:11
PetarKirov added a commit that referenced this pull request Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants