Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hello, Clearml! Let'S Say That I Have A Git Repository In Format

Hello, ClearML!
Let's say that I have a git repository in format ssh://git@repo.com:2222/jks/experiment.git
I have found out that Task removes git@ part from url at clearml/backend_interface/task/repo/scriptinfo.py:976
script_info = dict( repository=remove_user_pass_from_url(repo_info.url), ...
How to restore it?
Scenario is as follows:

` from clearml import Task
import pandas as pd

task = Task.init(task_name="Pipeline step 1")
task.execute_remotely(queue_name="queue")
df = pd.DataFrame()
task.upload_artifact("df", df) `

  
  
Posted one year ago
Votes Newest

Answers 11


VexedElephant56 the line of code you pointed to only removes basic user auth (i.e. https://foo:bar@github.com/ ... is turned in https://github.com/ ... ) - it will not remove the git scheme from the URL

  
  
Posted one year ago

VexedElephant56 as far as I know the agent will only remove this if you provided user/pass for non-ssh authentication

  
  
Posted one year ago

On the other hand: remove_user_pass_from_url("git@repo.com:2222/jks/experiment.git") works correctly as it results in git@repo.com:2222/jks/experiment.git

  
  
Posted one year ago

Hi VexedElephant56 , does it fail when it runs on the agent?

  
  
Posted one year ago

Got you 🙂 , thanks, we'll take a look

  
  
Posted one year ago

I think it should be something like this:
f = furl(url) if f.scheme in ['http', 'https', 'ssh'] and f.password: url = f.remove(username=True, password=True).tostr()instead of:
url = furl(url).remove(username=True, password=True).tostr()

  
  
Posted one year ago

I think it works now by accident, as mailto:git@repo.com is not a valid scheme URL, so it doesn't get parsed at all by furl library

  
  
Posted one year ago

I need to use SSH-based authentication, so I guess that's not an option. Well the removal affects cloning URL, i.e. while ssh://git@repo.com:2222/jks/experiment.git works fine ssh://repo.com:2222/jks/experiment.git doesn't, because it assumes current user as SSH user.

  
  
Posted one year ago

Yes, it's the same, because the passed url is the same. I need to have git url in the mentioned format or the agent cannot clone the repo.

  
  
Posted one year ago

What about if you specify the repo user/pass in clearml.conf?
I think it removes the user/pass so it wouldn't be shown in the logs

  
  
Posted one year ago

Therefore it's a minor bug and not working as intended because that function converts:
ssh://git@repo.com:2222/jks/experiment.git into
ssh://repo.com:2222/jks/experiment.git

  
  
Posted one year ago
1K Views
11 Answers
one year ago
one year ago
Tags