Skip to content

Commit

Permalink
notify_refs; rename studio_url to base_url (#9303)
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry authored Apr 4, 2023
1 parent 8be71be commit cf52efb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dvc/repo/experiments/push.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def notify_refs_to_studio(

_, repo_url = get_remote_repo(repo.scm.dulwich.repo, git_remote)
studio_url = config.get("studio_url")
d = studio.notify_refs(repo_url, token, studio_url=studio_url, **refs)
d = studio.notify_refs(repo_url, token, base_url=studio_url, **refs)
return d.get("url")


Expand Down
6 changes: 3 additions & 3 deletions dvc/utils/studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def notify_refs(
repo_url: str,
token: str,
*,
studio_url: Optional[str] = STUDIO_URL,
base_url: Optional[str] = STUDIO_URL,
**refs: List[str],
) -> Dict[str, Any]:
extra_keys = refs.keys() - {"pushed", "removed"}
Expand All @@ -52,12 +52,12 @@ def notify_refs(

logger.debug(
"notifying Studio%s about updated experiments",
f" ({studio_url})" if studio_url else "",
f" ({base_url})" if base_url else "",
)
data = {"repo_url": repo_url, "client": "dvc", "refs": refs}

try:
r = post("/webhook/dvc", token, data, base_url=studio_url)
r = post("/webhook/dvc", token, data, base_url=base_url)
except requests.RequestException as e:
logger.trace("", exc_info=True) # type: ignore[attr-defined]

Expand Down

0 comments on commit cf52efb

Please sign in to comment.