Skip to content
HOA PHAN edited this page Sep 22, 2023 · 19 revisions

Inferred versioning

Don't know who smoked what and come up with this idea. If you have a shallow clone, it's very bad:

2023-09-21T14:57:37.360+1000 [DEBUG] [org.eclipse.jgit.internal.storage.file.FileSnapshot] file=/Users/hoaphan/.gitconfig, is unmodified
2023-09-21T14:57:37.360+1000 [DEBUG] [org.eclipse.jgit.internal.storage.file.FileSnapshot] file=/Users/hoaphan/dev/code/conductor/.git/config, isRacyClean=false, read=2023-09-21 14:57:37.175419000, lastModified=2023-09-21 14:55:41.564851998, delta=115610567002 ns, racy<=2500000000 ns
2023-09-21T14:57:37.360+1000 [DEBUG] [org.eclipse.jgit.internal.storage.file.FileSnapshot] file=/Users/hoaphan/dev/code/conductor/.git/config, is unmodified
2023-09-21T14:57:37.361+1000 [WARN] [nebula.plugin.release.git.semver.SemVerStrategy] Inferred project: conductor, version: 3.14.0-SNAPSHOT
2023-09-21T14:57:37.361+1000 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Execute container callback action' completed
2023-09-21T14:57:37.361+1000 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Execute container callback action' completed

Test Config

Scrap all gradle binaries(to populate your private repo)

import requests
from bs4 import BeautifulSoup

"""
pip3 install requests beautifulsoup4 
"""

vgm_url = 'https://services.gradle.org/distributions'
html_text = requests.get(vgm_url).text
soup = BeautifulSoup(html_text, 'html.parser')



for link in soup.find_all('a'):
	artifact = link.get('href')
	if artifact not in ('', '/', '/distributions'):
		print(artifact)
		url = "https://services.gradle.org/distributions{}".format(artifact)
		file = "./downloads{}".format(artifact)
		print('Downloaded: {} ---> {}'.format(url, file))
		r = requests.get(url, allow_redirects=True)
		with open(file, 'wb') as f:
		    f.write(r.content)

DEBUG

Gradle

./gradlew build -xtest -Dorg.gradle.debug=true

!!! NOTE THAT: this option will not pause and wait for remote debugger if the port is already occupied

lsof -i:5005
COMMAND  PID    USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
java    6535 hoaphan    6u  IPv4 0xd92e38058d57f939      0t0  TCP localhost:avt-profile-2 (LISTEN)

Test

Note that this is different than above debugging ./gradlew :conductor-java-sdk:test --tests WorkflowCreationTests --debug-jvm

eye

Clone this wiki locally