kurtosis-tech / kurtosis

A platform for packaging and launching ephemeral backend stacks with a focus on approachability for the average developer.
https://docs.kurtosistech.com/
Apache License 2.0
380 stars 53 forks source link

File Artifacts Api does not return new lines #1042

Closed Peeeekay closed 1 year ago

Peeeekay commented 1 year ago

What's your CLI version?

0.80.23

Description & steps to reproduce

The file artifacts contents are returned to th UI as a blob of text without the new lines; for example this is what i see for yaml file.

# Extends the mainnet preset# This *could* be 'minimal', but it's not recommended to use because not every client supports 'minimal'PRESET_BASE: 'mainnet'CONFIG_NAME: testnet # needs to exist because of Prysm. Otherwise it conflicts with mainnet genesis# Genesis# ---------------------------------------------------------------# `2**14` (= 16,384)MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 64MIN_GENESIS_TIME: 1690950539GENESIS_FORK_VERSION: 0x10000038GENESIS_DELAY: 120# Forking# ---------------------------------------------------------------# Some forks are disabled for now:# - These may be re-assigned to another fork-version later# - Temporarily set to max uint64 value: 2**64 - 1# Note: The module runs a merged chain so ALTAIR_FORK_EPOCH, BELLATRIX_FORK_EPOCH and TERMINAL_TOTAL_DIFFICULTY# are all hardcoded to zero.# AltairALTAIR_FORK_VERSION: 0x20000038ALTAIR_FORK_EPOCH: 0# MergeBELLATRIX_FORK_VERSION: 0x30000038BELLATRIX_FORK_EPOCH: 0TERMINAL_TOTAL_DIFFICULTY: 0# 0x0000...000 indicates that we use TERMINAL_TOTAL_DIFFICULTY instead of a block has to trigger the mergeTERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000000# NOTE: This is commented out because Nimbus warns us that it's an unrecognized parameterTERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615# CapellaCAPELLA_FORK_VERSION: 0x40000038CAPELLA_FORK_EPOCH: 1# DENEBDENEB_FORK_VERSION: 0x50000038DENEB_FORK_EPOCH: 500# Time parameters# ---------------------------------------------------------------# 12 secondsSECONDS_PER_SLOT: 12# 5 epochs ~0.5 hoursMIN_VALIDATOR_WITHDRAWABILITY_DELAY: 1# 2**8 (= 256) epochs ~27 hoursSHARD_COMMITTEE_PERIOD: 1# It's very important that SECONDS_PER_ETH1_BLOCK * ETH1_FOLLOW_DISTANCE is a good amount of time, else# jitter will cause the Beacon nodes to think they're far behind the Eth1 nodes and give up syncingSECONDS_PER_ETH1_BLOCK: 12ETH1_FOLLOW_DISTANCE: 12# Validator cycle# ---------------------------------------------------------------# 2**2 (= 4)INACTIVITY_SCORE_BIAS: 4# 2**4 (= 16)INACTIVITY_SCORE_RECOVERY_RATE: 16# 2**4 * 10**9 (= 16,000,000,000) GweiEJECTION_BALANCE: 16000000000# 2**2 (= 4)MIN_PER_EPOCH_CHURN_LIMIT: 4# 2**16 (= 65,536)CHURN_LIMIT_QUOTIENT: 65536# Fork choice# ---------------------------------------------------------------# 40%PROPOSER_SCORE_BOOST: 40# Deposit contract# ---------------------------------------------------------------DEPOSIT_CHAIN_ID: 3151908DEPOSIT_NETWORK_ID: 3151908DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242# Networking# ---------------------------------------------------------------# `10 * 2**20` (= 10485760, 10 MiB)GOSSIP_MAX_SIZE: 10485760# `2**10` (= 1024)MAX_REQUEST_BLOCKS: 1024# `2**8` (= 256)EPOCHS_PER_SUBNET_SUBSCRIPTION: 256# `MIN_VALIDATOR_WITHDRAWABILITY_DELAY + CHURN_LIMIT_QUOTIENT // 2` (= 33024, ~5 months)MIN_EPOCHS_FOR_BLOCK_REQUESTS: 33024# `10 * 2**20` (=10485760, 10 MiB)MAX_CHUNK_SIZE: 10485760# 5sTTFB_TIMEOUT: 5# 10sRESP_TIMEOUT: 10ATTESTATION_PROPAGATION_SLOT_RANGE: 32# 500msMAXIMUM_GOSSIP_CLOCK_DISPARITY: 500MESSAGE_DOMAIN_INVALID_SNAPPY: 0x00000000MESSAGE_DOMAIN_VALID_SNAPPY: 0x01000000# 2 subnets per nodeSUBNETS_PER_NODE: 2# 2**8 (= 64)ATTESTATION_SUBNET_COUNT: 64ATTESTATION_SUBNET_EXTRA_BITS: 0# ceillog2(ATTESTATION_SUBNET_COUNT) + ATTESTATION_SUBNET_EXTRA_BITSATTESTATION_SUBNET_PREFIX_BITS: 6# Deneb# `2**7` (=128)MAX_REQUEST_BLOCKS_DENEB: 128# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCKMAX_REQUEST_BLOB_SIDECARS: 768# `2**12` (= 4096 epochs, ~18 days)MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 4096# `6`BLOB_SIDECAR_SUBNET_COUNT: 6# `uint64(6)`MAX_BLOBS_PER_BLOCK: 6

The api does not return \n characters.

Desired behavior

The desired response from the api is that it returns the file contents with the \n character as well, so that they can be rendered nicely on the frontend.

What is the severity of this bug?

Papercut; this bug is frustrating, but I have a workaround.

mieubrisse commented 1 year ago

Assigning to @adschwartz as he'll be tackling this as part of Sept work

h4ck3rk3y commented 1 year ago

Anders - There's a bug in the APIC where when we are writing the files artifact we are stripping away line breaks. Bugs been there for a while