Skip to content

Promote Staging to Main for release to production#170

Open
bkuntzelman wants to merge 5 commits intomainfrom
staging
Open

Promote Staging to Main for release to production#170
bkuntzelman wants to merge 5 commits intomainfrom
staging

Conversation

@bkuntzelman
Copy link
Collaborator

No description provided.

bridirks and others added 5 commits December 5, 2025 14:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the test database schema/data and expands integration/unit test coverage to align with the current bioactivity service behavior ahead of a production release.

Changes:

  • Replaced the test schema.sql with DDL for the aop, invitro, and ch schemas/tables used by the current JPA mappings and repository queries.
  • Added multiple new @DataJpaTest Testcontainers-based repository tests (and expanded existing ones) for assay search, aggregates, models, AOP mappings, and analytical QC.
  • Updated the test profile configuration (application-test.yml) default schema and application name; enabled H2 as a test dependency in pom.xml.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/test/resources/schema.sql Reworked test DDL to define aop, invitro, and ch schemas/tables used by current queries.
src/test/java/gov/epa/ccte/api/bioactivity/web/rest/AssayResourceTest.java Adds endpoint test for resolving AEID by assay endpoint name.
src/test/java/gov/epa/ccte/api/bioactivity/repository/SearchAssayRepositoryTest.java New Testcontainers JPA test for search_assay repository behaviors.
src/test/java/gov/epa/ccte/api/bioactivity/repository/ChemicalAggRepositoryTest.java New repository test for chemical aggregate queries.
src/test/java/gov/epa/ccte/api/bioactivity/repository/BioactivityScRepositoryTest.java New repository test for single-concentration bioactivity data queries.
src/test/java/gov/epa/ccte/api/bioactivity/repository/BioactivityModelRepositoryTest.java New repository test for model prediction queries.
src/test/java/gov/epa/ccte/api/bioactivity/repository/BioactivityDataRepositoryTest.java Updates container version and expands repository query tests/projections.
src/test/java/gov/epa/ccte/api/bioactivity/repository/AssayAnnotationRepositoryTest.java Updates imports/container version and adjusts expectations to new seeded dataset.
src/test/java/gov/epa/ccte/api/bioactivity/repository/AssayAggRepositoryTest.java New repository test for assay aggregate + CCD projection queries.
src/test/java/gov/epa/ccte/api/bioactivity/repository/AnalyticalQCRepositoryTest.java New repository test for analytical QC queries.
src/test/java/gov/epa/ccte/api/bioactivity/repository/AOPRepositoryTest.java New repository test for AOP mapping queries.
src/main/resources/config/application-test.yml Renames app and switches Hibernate default schema to invitro.
src/main/java/gov/epa/ccte/api/bioactivity/web/rest/DataApi.java Removes OpenAPI tag metadata from operations.
src/main/java/gov/epa/ccte/api/bioactivity/web/rest/BioactivityModelApi.java Removes OpenAPI tag metadata from operations.
src/main/java/gov/epa/ccte/api/bioactivity/web/rest/AOPApi.java Removes OpenAPI tag metadata from operations.
src/main/java/gov/epa/ccte/api/bioactivity/repository/BioactivityDataRepository.java Adds percentAssays to a repository query projection.
src/main/java/gov/epa/ccte/api/bioactivity/repository/AssayAggRepository.java Adds comments; no functional change.
pom.xml Adds H2 test dependency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -1,126 +1,307 @@
create schema bio4_1;
CREATE SCHEMA aop;

Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

schema.sql no longer creates the app schema or the app.api_keys / app.approved_hosts objects, but those entities are still mapped with @Table(..., schema = "app") (e.g., ApiKey, ApprovedHost). With spring.jpa.properties.hibernate.ddl-auto: validate in the test profile, Hibernate will fail validation unless the app schema (and required tables/sequences) exist in the test DB. Add the missing CREATE SCHEMA app and the DDL for these mapped objects (including the approved_hosts_id_seq sequence), or adjust the entity mappings/test profile accordingly.

Suggested change
CREATE SCHEMA app;
-- Sequence used for ApprovedHost IDs
CREATE SEQUENCE app.approved_hosts_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-- Table for API keys mapped with @Table(schema = "app", name = "api_keys")
CREATE TABLE app.api_keys (
id bigint NOT NULL,
api_key varchar(255) NOT NULL,
created_at timestamp NULL,
revoked_at timestamp NULL
);
-- Table for approved hosts mapped with @Table(schema = "app", name = "approved_hosts")
CREATE TABLE app.approved_hosts (
id bigint NOT NULL DEFAULT nextval('app.approved_hosts_id_seq'),
host varchar(255) NOT NULL,
description varchar(255) NULL
);

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@janetleeFederal janetleeFederal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for promotion to PROD for v2.8.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants