• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

agama-project / agama / 14378718928
73%

Build:
DEFAULT BRANCH: master
Ran 10 Apr 2025 11:00AM UTC
Jobs 0
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

Canceled at 06 Dec 2025 02:12PM UTC via web
14378718928

push

github

web-flow
Add `--api URL`  support to `agama profile` (#2103)

## Problem

`agama profile` still executes its actions directly from the CLI client,
not using the web service. Fix it to make it work like `agama --api $URL
config ...` already does.

- https://trello.com/c/fqPGL2qe

`agama profile` command summary... it is a diverse bunch! (related,
unplanned stub:
https://trello.com/c/3aUupc2F/461-unify-config-and-profile-commands-in-the-cli
)
```
profile_evaluate(jsonnet_path) -> json stdout
profile_validate(json_path) -> print whether valid, what problems
profile_autoyast(autoyast_url) -> json stdout
profile_import(url) -> performs config_load
  # oh fun!
  if url ends with .xml OR .erb OR /
    profile_autoyast
  else download the file and analyze content
    if is_script # starts with hash-bang and the program is not "jsonnet"
      EXECVE it # which means replace current process. OMG WTF inconsistent UX
    else if is_jsonnet
      profile_evaluate
    else if is_json
      cat
    else
      return Error
  # at this point we have a JSON file
  profile_validate # NOTE that invalid profile is just a message and we continue
  agama_config_load
```

## Solution

Added these 3 new web API paths corresponding 1-1 to the CLI commands:
- POST /api/profile/validate ?url= ?path= (or body)
- POST /api/profile/evaluate ?url= ?path= (or body)
- POST /api/profile/autoyast ?url=

But `agama profile import` is notable that it effectively includes an
`agama
config load` which is implemented as multiple backend calls, so `import`
stays at the front end and the back end only gets what's needed to make
it work,
which is running a script:
- POST /api/profile/execute_script ?url= ?path= (or body)

(TODO explain the rest)

### Backend errors now include their causes 

Before:
> Anyhow(Backend call failed with status 400 and text '{"error":"Error:
Could not evaluate the profile"}')
    
After:
> Anyhow(Backend call failed with status 400 and text '{"error":"Error:
Could not evalua... (continued)
Source Files on build 14378718928
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #14378718928
  • 0c9a37b5 on github
  • Prev Build on master (#14356287526)
  • Next Build on master (#14397094345)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc