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.

CML initialization is broken on GH in container mode

See original GitHub issue

Basic CML workflow like this is broken.

I’m getting:

{"level":"error","message":"Command failed: git config --get remote.origin.url","output":[null,{"data":[],"type":"Buffer"},{"data":[],"type":"Buffer"}],"pid":124,"signal":null,"stack":"Error: Command failed: git config --get remote.origin.url\n    at checkExecSyncError (node:child_process:828:11)\n    at execSync (node:child_process:902:15)\n    at gitRemoteUrl (/usr/lib/node_modules/@dvcorg/cml/src/cml.js:29:15)\n    at new CML (/usr/lib/node_modules/@dvcorg/cml/src/cml.js:76:44)\n    at Object.exports.handler (/usr/lib/node_modules/@dvcorg/cml/bin/cml/ci.js:10:15)\n    at /usr/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:9054\n    at j (/usr/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:4931)\n    at M.applyMiddlewareAndGetResult (/usr/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:9023)\n    at M.runCommand (/usr/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:7206)\n    at Xt.[runYargsParserAndExecuteCommands] (/usr/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:57164)\n    at Xt.parse (/usr/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:39275)\n    at Object.<anonymous> (/usr/lib/node_modules/@dvcorg/cml/bin/cml.js:90:4)\n    at Module._compile (node:internal/modules/cjs/loader:1103:14)\n    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)\n    at Module.load (node:internal/modules/cjs/loader:981:32)\n    at Function.Module._load (node:internal/modules/cjs/loader:822:12)","status":1,"stderr":{"data":[],"type":"Buffer"},"stdout":{"data":[],"type":"Buffer"}}

Command git config --get remote.origin.url that is triggered in CML ctr fails.

Most likely this is due to some breaking changes in action checkout (v2 and v3 both affected). They have recently had to upgrade those due to recent update of Git on GH https://github.blog/2022-04-12-git-security-vulnerability-announced/

(more info for the reference is here: https://iterativeai.slack.com/archives/C01900GSB4J/p1650245948446699 (internal link))

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
shchekleincommented, Apr 19, 2022

Right, thanks for clarifying this one more time, Helio.

If you mean setting safe.directory as part of every CML command, that would be option 2 on https://github.com/iterative/cml/issues/970#issuecomment-1101517765 more or less. 🤔

Yes, part of every command. Not exactly option 2 if I understand it right, since cml ci might be doing a bit more than that.

1reaction
0x2b3bfa0commented, Apr 19, 2022

@0x2b3bfa0 are there other way to get the same result as git config --get remote.origin.url in JS code?

Yes, see the parse-git-config package for example, but it’s not enough to replace all our other interactions with Git.

that’s the only thing that is failing, right?

It’s rather the first thing that is failing. Any git command we run will produce the same error:

fatal: unsafe repository ('/path/to/repository' is owned by someone else)
To add an exception for this directory, call:

        git config --global --add safe.directory /path/to/repository

it looks the only thing that we are using that for is to determine GH/GL/BB?

I’d wish! 😅 We use many other git commands for various purposes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

safe.directory handling broken when using Cygwin Git #767
The fix at f25a3a9 is great for the vast majority of folk, ... CML initialization is broken on GH in container mode iterative/cml#970....
Read more >
Weld Reference Guide - JBoss.org
Previous versions of Weld/CDI defaulted to all discovery mode. ... The bootstrap is split into phases, container initialization, ...
Read more >
Documentation - Spring Session
XML Servlet Container Initialization. Our Spring Configuration created a Spring bean named springSessionRepositoryFilter that implements Filter ...
Read more >
What's New In Python 3.11 — Python 3.11.1 documentation
It is called automatically during handler initialization and when emitting an event, if there is no active socket. (Contributed by Kirill Pinchuk in...
Read more >
Documentation | - Terrascan
Run Terrascan in Server Mode. You can launch server mode by executing the Terrascan binary, or with a Docker container. Use the following...
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