问题标签 [dry-run]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
711 浏览

powershell - 执行使用 Chocolatey 的 Powershell 脚本的试运行

我正在编写一个脚本来自动将新机器设置为特定规格,其中包括下载一堆程序和更改用户偏好。

我只想为下载和注册表编辑设置一个变量,但大多数下载的包都是通过 Chocolatey 的,它似乎没有空运行(假设)模式。

有没有办法以仅打印要执行的操作的模式运行脚本,以便在我测试程序时实际上没有下载或更改任何内容?

0 投票
0 回答
36 浏览

testing - Impala 中是否有空运行选项?

有什么方法可以测试运行查询并深入了解可能的查询性能?

0 投票
0 回答
269 浏览

git - How to check for not pushed changes to Gerrit

When working with regular git and pushing to master you can easily know what you're about to push. Even better if you simply check for not pushed changes. When working with Gerrit on the other hand you want to see if your changes are present in your review/branch. Unfortunately running something like this gives no difference if you have changes or not.

Produces

While push itself is rejected by remote:

The only alternative I see for such case is something like using generated link on Gerrit to access to remote branch created for review but even this is too complex for my git knowledge.

So in overall, how can I check if my local changes were pushed to Gerrit? I have lots of subprojects synchronized with repo but in overall I use custom script just to track down what happens. Quite often I change multiple repositories at once through IDE and I don't even check which repository I'm editing. After that I run my script which can already show me unstaged, staged and modified repositories. The only thing that's missing is actually showing repositories in which I already committed changed but did not push them to review yet (or did not update review). Obviously diff origin/master..HEAD --quiet does not work as review has some custom generated branch. Is there a way to easily show if I have to push something?

0 投票
3 回答
263 浏览

java - 可以使用 dryRun 应用撤消吗?

早上好,

我们正在使用带有 Java API 的 flyway。flyway 版本:6.5.0 企业版。数据库:h2(版本 1.4.197)。

我们正在尝试以编程方式应用撤消操作,设置多个版本并应用撤消,直到当前版本相等。例如从 03 到 02 的 undoVersion。

如果我们以这种方式使用 dryRunOutput 创建 flyway 实例,则不会真正执行撤消操作,因此当前版本永远不会改变。如果我删除 .dryRunOutput(outputFileName) 撤消执行得很好,但我无法得到报告。

有没有办法使用 dryRun 应用撤消,以便使用 SQL 中应用的撤消查询获取报告?

先感谢您。

最好的问候阿尔瓦罗纳瓦罗

0 投票
2 回答
39 浏览

npm - NPM 包安装受影响的依赖列表

这可能是关于 npm 的一个完全新手问题,但我想知道如何提取在安装时将安装的依赖项,例如使用干运行。

原因是我想在实际执行安装之前知道要安装哪些软件包。

通过这种方式,我可以确保避免使用一个特定的包,如果我想这样定义它。

0 投票
0 回答
128 浏览

google-bigquery - 不能使用带有 big_query 钩子的空运行参数

Bigquery 查询作业提供了在实际运行查询之前预运行查询的选择。它有助于了解计费以及 BigQuery 将处理多少数据。以下是 QueryRequest 的片段:

我试图在 google-cloud-composer 中的 BigQueryHook 的帮助下使用 dry-run 参数,但没有任何运气。下面是我的代码片段:

输出返回一个 bigquery job_id。我正在使用 job_id 来访问 BigQuery jobs.get api 来分析查询结果。在那里我可以看到我为查询付费,所以我可以推断出空运行参数实际上并没有运行。

任何人都可以帮助如何使用 big_query 挂钩中的 dry-run 参数或提供替代解决方案吗?

0 投票
1 回答
443 浏览

kubernetes - 如何使用 --dry-run=client 创建多容器 pod?

我正在为 CKAD 考试练习,遇到了一个有趣的问题,即我似乎无法找到答案的多容器吊舱。假设我运行这个命令式命令来创建一个 pod.yaml:

然后我编辑该 yaml 定义以添加仅具有名称和图像的 sidecar nginx 容器。当我去创建这个吊舱时

即使busybox容器仍在pod规范yaml中定义,我也得到了一个带有单个nginx容器的pod。我怀疑这是由于使用--dry-run=client和/或运行命令与空运行相结合,但我似乎找不到一个好的答案。提前致谢。

编辑:pod.yaml

0 投票
1 回答
19 浏览

numpy - num 向量化的空运行

当我运行一个用 numpy 向量化的函数时,它总是比我预期的多执行一次。因此,在实际调用开始之前,似乎有一个空运行。最近,我因此遇到了麻烦。请参阅以下最小示例:

通常,我会猜到,两个人的年龄都是 1。所以我的问题是:

  1. 现在有人知道这次试运行的目的吗?对我来说,我似乎只是一个潜在麻烦的来源。

  2. 示例说明了处理问题的pythonic方法是什么?

0 投票
1 回答
102 浏览

ssh - 尽管 --dry-run rsync 删除文件

当我在指定 --delete 和 --dry-run 的情况下运行 rsync 时,已删除的本地文件实际上会在远程被删除。命令输出最后包含(DRY RUN),但远程文件被删除。我正在运行的命令:

样本输出:

(注意(DRY RUN)最后的)

但是在远程服务器上,那里的文件被删除了。这里发生了什么事?

0 投票
1 回答
60 浏览

kubernetes - 有什么不同的 --dry-run 机会?

之间有什么不同

机会?

除了创建定义文件之外还有其他目的吗?

感谢您的时间。