question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Private Links for `cml publish`

See original GitHub issue

I’m still learning cml, I noticed when I run:

cml publish dvc_plots/index.html

It creates a url at https://asset.cml.dev/ with a token. I’m using a private repo, so it was a little alarming to see that my data is being uploaded to a publicly available site, previously I thought it must be using some gitlab/github internals to upload the image to the mr/pr that I didn’t yet understand.

In my case I’m using gcs as a dvc remote, so I think my workaround will be to instead upload the results to gcs then only people logged into a google account with access to the gcp project will have access.

It would be great if it was made clearer in the documentation that cml publish is uploading to cml.dev and if my use case with a private dvc remote is pretty typical it would be nice to provide a flag to cml publish that let’s me instead upload to my private infrastructure.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
dacbdcommented, Aug 4, 2022

if you are using GitLab there is a --native flag you can use, additionally there is a --url component to do exactly that. It is lacking some documentation as we haven’t really put together a guide for its setup.

example

Here is an internal test using this feature which you can use/snoop around with:

jobs:
  setup:
    outputs:
      url: ${{ steps.deploy.outputs.url }}
    runs-on: ubuntu-latest
    environment: test
    steps:
      - uses: actions/checkout@v3
        with:
          repository: 0x2b3bfa0/minroud
      - name: Install Deps
        run: npm install --global serverless
      - uses: aws-actions/configure-aws-credentials@v1
        with:
          role-to-assume: arn:aws:iam::342840881361:role/SandboxUser
          aws-region: us-east-1
      - name: Deploy
        id: deploy
        run: |
          npx serverless deploy
          url=$(npx serverless info | awk 'match($0, "endpoint: "){ print substr($0, RSTART + 10)}')
          echo "$url"
          echo "::set-output name=url::$url"
      - uses: actions/upload-artifact@v3
        with:
          name: state
          path: .serverless
  test:
    runs-on: ubuntu-latest
    needs: setup
    steps:
      - name: Test a CML Branch
        if: ${{ env.TEST_CML_BRANCH }}
        run: |
          npm install -g canvas@2 vega@5 vega-cli@5 vega-lite@5 github:iterative/cml#${{ env.TEST_CML_BRANCH }}
      - name: Standard CML setup
        if: ${{ !env.TEST_CML_BRANCH }}
        uses: iterative/setup-cml@v1
        with:
          version: ${{ env.TEST_CML_VERSION || 'latest' }}
      - name: Test
        env:
          CML_PUBLISH_URL: ${{ needs.setup.outputs.url }}
        run: |
          echo "hello" >> file.md
          url=$(cml publish file.md)
          echo "$url"
          test "hello" == $(curl --silent $url)
  clean-up:
    runs-on: ubuntu-latest
    if: ${{ always() }}
    needs: test
    environment: test
    steps:
      - uses: actions/checkout@v3
        with:
          repository: 0x2b3bfa0/minroud
      - name: Install Deps
        run: npm install --global serverless
      - uses: aws-actions/configure-aws-credentials@v1
        with:
          role-to-assume: arn:aws:iam::342840881361:role/SandboxUser
          aws-region: us-east-1
      - uses: actions/download-artifact@v3
        with:
          name: state
          path: .serverless
      - name: Clean up
        run: |
          bucket_name=$(aws s3 ls | awk 'match($0, /minroud/){ print $3}')
          aws s3 rm --recursive "s3://$bucket_name"
          npx serverless remove

https://github.com/iterative/cml/blob/e87a23b11e12d72a0a8c7488348db930b4dcc121/bin/cml/publish.js#L35-L39

1reaction
0x2b3bfa0commented, Aug 8, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

comment | CML
Post a Markdown report as a comment on a commit, pull/merge or issue request. ... Create a pull/merge request comment for a specific...
Read more >
FAQ - Cisco Modeling Labs v2.x
FAQ - Cisco Modeling Labs v2.x. Reference Platform and Images Questions. 1. What are reference platforms? Reference platforms are virtual instances of ...
Read more >
Creating a CML project with CDV Runtime
Learn how to create a Cloudera Machine Learning (CML) project with Cloudera Data Visualization (CDV) Runtime as the default runtime.
Read more >
Manage ML Automation Workflow with DagsHub, GitHub ...
CML Output Pull Request Mirroring ... GitHub and DagsHub connections allow not only for the repository connected but also for recording all action ......
Read more >
How machine learning ops works with GitLab and continuous ...
CML is our approach to adapting powerful CI systems like GitLab CI to common data science and ML use cases, including: Automatic model...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found