Skip to content

Invalid uploads break repos #244

Description

@definitelynobody

When trying to deploy: https://github.com/definitelynobody/hello-loop/tree/f997f4bf1847b5fcc4a0f824337088c4974e6240

An invalid package can be uploaded via the enarx CLI which will yield a 401 "OpenID Connect credential validation failed: Request failed".

 % enarx repo register nick/hello-loop                                                                                                                                                                                        
 % enarx user login                                                                                                                                                                                                           130 ↵
To continue, open the following link in your browser:
        https://auth.profian.com/activate
At the prompt, enter the following one-time code:
        {{AUTH CODE}}
Once entered, please wait a few moments for authorization to complete.
Credentials saved locally.
Login successful.
 % enarx repo register nick/hello-loop-tmp                                                                                                                                                                                         
 % enarx package publish nick/hello-loop-tmp:0.1.0 .                                                                                                                                                                               
Error: Failed to create tag and upload tree

Caused by:
    0: request failed with status code `401`
    1: OpenID Connect credential validation failed: Request failed

The package will still be uploaded in some state but it will not run (even if it contains main.wasm).

 % enarx repo info nick/hello-loop-tmp                                                                                                                                                                                             
{
  "config": {
    "public": true
  },
  "tags": [
    "0.1.0"
  ]
}
 % enarx deploy nick/hello-loop-tmp:0.1.0                                                                                                                                                                                                                                1 ↵
Error: failed to fetch `main.wasm`

Caused by:
    0: failed to GET `https://store.profian.com/api/v0.1.0/nick/hello-loop-tmp/_tag/0.1.0/tree/main.wasm`
    1: https://store.profian.com/api/v0.1.0/nick/hello-loop-tmp/_tag/0.1.0/tree/main.wasm: status code 404

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions