Skip to content

Commit f6d22e5

Browse files
authored
Merge branch 'main' into otelbot/code-review-sweep-24966697425
2 parents e69c442 + 09f3efe commit f6d22e5

21 files changed

Lines changed: 70 additions & 47 deletions

File tree

.github/scripts/rerun-flaky-pr-jobs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from pathlib import Path
1717

1818
LOOKBACK_HOURS = 2
19-
MAX_FAILED_JOBS_PER_WORKFLOW_RUN = 2
19+
MAX_FAILED_JOBS_PER_WORKFLOW_RUN = 5
2020
MAX_RERUN_ATTEMPTS = 2
2121

2222

@@ -36,7 +36,7 @@ def main() -> None:
3636
continue
3737

3838
rerun_attempts = run["run_attempt"] - 1
39-
if rerun_attempts > MAX_RERUN_ATTEMPTS:
39+
if rerun_attempts >= MAX_RERUN_ATTEMPTS:
4040
processed_runs.append(
4141
f"Skipped {format_run(run)}: already rerun {rerun_attempts} times."
4242
)

.github/workflows/code-review-sweep.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
outputs:
2626
modules: ${{ steps.build-matrix.outputs.modules }}
2727
has_work: ${{ steps.build-matrix.outputs.has_work }}
28+
model: ${{ steps.model.outputs.model }}
2829
steps:
2930
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3031
with:
@@ -33,6 +34,12 @@ jobs:
3334
- name: Fetch progress branch
3435
run: git fetch origin otelbot/code-review-progress || true
3536

37+
- name: Resolve Copilot model
38+
id: model
39+
run: |
40+
model=$(git show origin/otelbot/code-review-progress:model.txt | xargs)
41+
echo "model=$model" >> "$GITHUB_OUTPUT"
42+
3643
- name: Build review matrix
3744
id: build-matrix
3845
env:
@@ -58,7 +65,7 @@ jobs:
5865
contents: write # for git push
5966
env:
6067
MODULES_JSON: ${{ needs.dispatch.outputs.modules }}
61-
MODEL: "gpt-5.4"
68+
MODEL: ${{ needs.dispatch.outputs.model }}
6269
# Stop processing further modules once at least this many files have been
6370
# modified (vs origin/main) at the end of a module.
6471
FILE_THRESHOLD: 10

instrumentation/gwt-2.0/javaagent/build.gradle.kts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ sourceSets {
2323
java {
2424
destinationDirectory.set(layout.buildDirectory.dir("testapp/classes"))
2525
}
26-
resources {
27-
srcDirs("src/webapp")
28-
}
2926
compileClasspath = compileClasspath.plus(sourceSets.main.get().compileClasspath)
3027
}
3128
}

instrumentation/helidon-4.3/testing/src/main/java/io/opentelemetry/instrumentation/helidon/v4_3/AbstractHelidonTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ public abstract class AbstractHelidonTest extends AbstractHttpServerTest<WebServ
3030

3131
protected void configureRoutes(HttpRouting.Builder routing) {}
3232

33-
static void sendResponse(ServerResponse res, int status, String response) {
33+
private static void sendResponse(ServerResponse res, int status, String response) {
3434
sendResponse(res, status, emptyMap(), response);
3535
}
3636

37-
static void sendResponse(ServerResponse res, int status, Map<String, String> headers) {
37+
private static void sendResponse(ServerResponse res, int status, Map<String, String> headers) {
3838
sendResponse(res, status, headers, "");
3939
}
4040

41-
static void sendResponse(
41+
private static void sendResponse(
4242
ServerResponse res, int status, Map<String, String> headers, String response) {
4343
res.header("Content-Type", "text/plain");
4444
headers.forEach(res::header);

instrumentation/hibernate/hibernate-3.3/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/hibernate/v3_3/SessionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ private static class Parameter {
575575
}
576576
}
577577

578-
static void sessionAssertion(TraceAssert trace, String methodName, String resource) {
578+
private static void sessionAssertion(TraceAssert trace, String methodName, String resource) {
579579
trace.hasSpansSatisfyingExactly(
580580
span -> span.hasName("parent").hasKind(SpanKind.INTERNAL).hasNoParent(),
581581
span -> assertSessionSpan(span, trace.getSpan(0), "Session." + methodName + " " + resource),

instrumentation/hibernate/hibernate-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/v4_0/EntityNameUtil.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212

1313
public class EntityNameUtil {
1414

15-
private EntityNameUtil() {}
15+
public static Function<Object, String> bestGuessEntityName(SharedSessionContract session) {
16+
return entity -> bestGuessEntityName(session, entity);
17+
}
1618

1719
private static String bestGuessEntityName(SharedSessionContract session, Object entity) {
1820
if (entity == null) {
@@ -28,7 +30,5 @@ private static String bestGuessEntityName(SharedSessionContract session, Object
2830
return null;
2931
}
3032

31-
public static Function<Object, String> bestGuessEntityName(SharedSessionContract session) {
32-
return (entity) -> bestGuessEntityName(session, entity);
33-
}
33+
private EntityNameUtil() {}
3434
}

instrumentation/hibernate/hibernate-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/hibernate/v4_0/EntityManagerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
class EntityManagerTest extends AbstractHibernateTest {
5252

53-
static final EntityManagerFactory entityManagerFactory =
53+
private static final EntityManagerFactory entityManagerFactory =
5454
Persistence.createEntityManagerFactory("test-pu");
5555

5656
@AfterAll

instrumentation/hibernate/hibernate-4.0/javaagent/src/test/java/spring/jpa/SpringJpaTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ class SpringJpaTest {
3939
@RegisterExtension
4040
protected static final InstrumentationExtension testing = AgentInstrumentationExtension.create();
4141

42-
AnnotationConfigApplicationContext context =
42+
private final AnnotationConfigApplicationContext context =
4343
new AnnotationConfigApplicationContext(PersistenceConfig.class);
44-
CustomerRepository repo = context.getBean(CustomerRepository.class);
44+
private final CustomerRepository repo = context.getBean(CustomerRepository.class);
4545

4646
@AfterEach
4747
void closeContext() {

instrumentation/hibernate/hibernate-6.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/v6_0/HibernateInstrumentationModule.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ public HibernateInstrumentationModule() {
2525

2626
@Override
2727
public ElementMatcher.Junction<ClassLoader> classLoaderMatcher() {
28-
return hasClassesNamed(
29-
// added in 6.0
30-
"org.hibernate.query.spi.SqmQuery");
28+
// added in 6.0
29+
return hasClassesNamed("org.hibernate.query.spi.SqmQuery");
3130
}
3231

3332
@Override

instrumentation/hibernate/hibernate-6.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/v6_0/SessionInstrumentation.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ public void transform(TypeTransformer transformer) {
8282
getClass().getName() + "$GetTransactionAdvice");
8383

8484
transformer.applyAdviceToMethod(
85-
returns(implementsInterface(named("org.hibernate.query.CommonQueryContract")))
86-
.or(named("org.hibernate.query.spi.QueryImplementor")),
85+
returns(implementsInterface(named("org.hibernate.query.CommonQueryContract"))),
8786
getClass().getName() + "$GetQueryAdvice");
8887
}
8988

0 commit comments

Comments
 (0)