|
26 | 26 | import java.nio.file.FileStore;
|
27 | 27 | import java.nio.file.Files;
|
28 | 28 | import java.nio.file.Paths;
|
29 |
| -import java.security.MessageDigest; |
30 | 29 | import java.security.NoSuchAlgorithmException;
|
31 | 30 | import java.time.temporal.ChronoUnit;
|
32 | 31 | import java.time.temporal.TemporalUnit;
|
|
48 | 47 | import java.util.stream.Stream;
|
49 | 48 |
|
50 | 49 | import com.google.common.annotations.VisibleForTesting;
|
51 |
| -import org.apache.commons.codec.binary.Hex; |
52 | 50 | import org.apache.logging.log4j.LogManager;
|
53 | 51 | import org.apache.logging.log4j.Logger;
|
54 | 52 | import org.jruby.Ruby;
|
@@ -146,8 +144,6 @@ public class AbstractPipelineExt extends RubyBasicObject {
|
146 | 144 | @SuppressWarnings({"rawtypes", "serial"})
|
147 | 145 | private List<SourceWithMetadata> configParts;
|
148 | 146 |
|
149 |
| - private RubyString configHash; |
150 |
| - |
151 | 147 | private transient IRubyObject settings;
|
152 | 148 |
|
153 | 149 | private transient IRubyObject pipelineSettings;
|
@@ -263,11 +259,6 @@ private AbstractPipelineExt initialize(final ThreadContext context,
|
263 | 259 | pipelineSettings = pipelineConfig;
|
264 | 260 | configString = (RubyString) pipelineSettings.callMethod(context, "config_string");
|
265 | 261 | configParts = pipelineSettings.toJava(PipelineConfig.class).getConfigParts();
|
266 |
| - configHash = context.runtime.newString( |
267 |
| - Hex.encodeHexString( |
268 |
| - MessageDigest.getInstance("SHA1").digest(configString.getBytes()) |
269 |
| - ) |
270 |
| - ); |
271 | 262 | settings = pipelineSettings.callMethod(context, "settings");
|
272 | 263 | final IRubyObject id = getSetting(context, SettingKeyDefinitions.PIPELINE_ID);
|
273 | 264 | if (id.isNil()) {
|
@@ -356,11 +347,6 @@ public final RubyString configStr() {
|
356 | 347 | return configString;
|
357 | 348 | }
|
358 | 349 |
|
359 |
| - @JRubyMethod(name = "config_hash") |
360 |
| - public final RubyString configHash() { |
361 |
| - return configHash; |
362 |
| - } |
363 |
| - |
364 | 350 | @JRubyMethod(name = "ephemeral_id")
|
365 | 351 | public final RubyString ephemeralId() {
|
366 | 352 | return ephemeralId;
|
|
0 commit comments