Skip to content

Test webhooks#261

Open
alexkarp-umd wants to merge 2539 commits intomainfrom
test-webhooks
Open

Test webhooks#261
alexkarp-umd wants to merge 2539 commits intomainfrom
test-webhooks

Conversation

@alexkarp-umd
Copy link
Collaborator

Testing webhooks to jenkins to verify that the connection works before closing https://umd-dit.atlassian.net/browse/LIBDEVOPS-2488

dsteelma-umd and others added 30 commits March 15, 2023 13:55
Fixed all the Checkstyle warnings uncovered by running:

```
$ mvn clean install -Dcheckstyle.skip=false
```

https://umd-dit.atlassian.net/browse/LIBDRUM-667
Removed the "-Dcheckstyle.skip=true" flag when building code using
Jenkins. This ensures that the Checkstyle checks will be run, and
any warnings flagged.

Added "recordIssues" so that Checkstyle results would be available
in Jenkins.

Configured "recordIssues" so that the hundreds of INFO-level
Checkstyle warnings about TODO comments from the stock DSpace
code are not included in the health check count, or in the
number of violations sent in the email.

https://umd-dit.atlassian.net/browse/LIBDRUM-667
LIBDRUM-748. Implementation of "wufoo-feedback" REST endpoint
LIBDRUM-667. Fixed all Checkstyle warnings
LIBDRUM-757. Fix quote handling in "Browse by Title"
Fixed a CheckStyle violation that was missed because the change was in
an outstanding pull request when the CheckStyle violations were fixed
in the original pass through the codebase.

https://umd-dit.atlassian.net/browse/LIBDRUM-667
Fixed a typo that was preventing the Subject line from being used
in the email that is sent notifying subscribers of new items.

https://umd-dit.atlassian.net/browse/LIBDRUM-770
LIBDRUM-770. Fixed Subject line for "subscription" email template
Added documentation regarding DRUM cron tasks.

Placing in the "umd-lib/dspace" repository, instead of in
"umd-lib/k8s-drum", since this seemed like the most likely place
someone would look first, as the repository contains other DRUM
customization information.

https://umd-dit.atlassian.net/browse/LIBDRUM-720
LIBDRUM-720. Added "DrumCronTasks.md" file
Refactored CASAuthentication, adding a "queryLdap" method that is
responsible for querying the LdapService implementation. This will
enable other methods in the class to query the LDAP server.

Update the unit tests.

https://umd-dit.atlassian.net/browse/LIBDRUM-769
Refactored LdapServiceImpl, creating an LdapClient inner
class that configures and performs operations against the real
LDAP server. Intent is to make the actual LDAP server operations
simpler to replace with a mock implementation for testing.

https://umd-dit.atlassian.net/browse/LIBDRUM-769
Modified CASAuthentication to retrieve an impersonated user's special
groups.

Moved the retrieval of the "Ldap" object into a separate "getLdap"
method. The method handles retrieving the Ldap object from the
request's session object (for normal authentication), and generating
an Ldap object for impersonated users (i.e., when the context
is switched), by querying the LDAP server.

Added additional unit tests for the impersonated user special groups
handling.

https://umd-dit.atlassian.net/browse/LIBDRUM-769
When impersonating users, an LDAP query may need to be performed for
each HTTP request, so a simple in-memory expiring cache, using the Apace
Commons "PassiveExpiringMap" class was added.

By default, this will store an LDAP result for 5 minutes before
the entry in the cache expires.

Added value for "drum.ldap.cacheTimeout" to "local.cfg.EXAMPLE".

Added unit tests to verify cache behavior.

https://umd-dit.atlassian.net/browse/LIBDRUM-769
Updates the "CASAuthentication.md" with information on impersonation
and special groups.

https://umd-dit.atlassian.net/browse/LIBDRUM-769
Fixed the following warning:

```
[WARNING] [ClassCanBeStatic] Inner class is non-static but does not reference enclosing class
    (see https://errorprone.info/bugpattern/ClassCanBeStatic)
  Did you mean 'static class TestableLdapServiceImpl extends LdapServiceImpl {'?
```

Fixed by moving class outside of the enclosing class.

https://umd-dit.atlassian.net/browse/LIBDRUM-769
Deleted configuration files and scripts that are not present in the
stock DSpace 7.4 distribution, or (for UMD-added scripts/configuration
files) are no longer used.

Also removed obsolete documentation.

See https://confluence.umd.edu/display/~dsteelma/Jira+-+LIBDRUM-712
for information about why files appeared to be obsolete.

https://umd-dit.atlassian.net/browse/LIBDRUM-712
LIBDRUM-769. Add special groups for impersonated users
LIBDRUM-712. Delete obsolete configuration files, scripts, and docs
As part of the DSpace 7 promotion process, decided to move to the
"GitHub Flow" model of branching, so the "drum-main" branch is now
the main branch for DRUM development.

Replaced references to "drum-develop" branch with "drum-main" in
documentation and scripts.

https://umd-dit.atlassian.net/browse/LIBDRUM-777
The license violations that were previously being reported appear to
have been fixed. CheckStyle warnings were fixed as part of LIBDRUM=667.

Modified the GitHub Action ".github/workflows/build.yml" file to restore
running both the license and CheckStyle checks.

Modified the "Jenkinsfile" using by Jenkins to restore the license
checks (CheckStyle checking had previously been restored).

https://umd-dit.atlassian.net/browse/LIBDRUM-668
Updated the "README-DRUM.md" for DSpace 7:

* Removed links to documents that are no longer included in the
  repository
* Rewrote "Building Images for K8s Deployment" instructions to use
  Kubernetes "build" namespace. This is needed because "arm64"-based
  Apple laptops can not build the "amd64" images used by Kubernetes

https://umd-dit.atlassian.net/browse/LIBDRUM-790
Reviewed and updated documentation for DSpace 7.

* Updated “dspace/docs/DrumFeatures.md” for DSpace 7, based on Jira
  issues in “Upgrade DRUM to DSpace 7” epic

* Created “dspace/docs/DrumDBRestore.md” describing using a database
  snapshot from a DSpace 7 intance

* Renamed “dspace/docs/DRUM7DBRestore.md” to
“dspace/docs/DrumDBRestoreFromDSpace6.md”

* In “dspace/docs/Drum7DockerDevelopmentEnvironment.md”, reordered the
  steps so that the database setup comes before the application build
  (it seemed more natural). Also added links to “DrumDBRestore.md” and
  “DrumDBRestoreFromDSpace6.md” documents

* In "README-DRUM.md", removed the link to the original "README.md"
  file, because it did not appear to consistently link to the
  "README.md" file.

https://umd-dit.atlassian.net/browse/LIBDRUM-791
The latest Postgres 12 version, Postgres 12.15, appears to have some
sort of issue with populating the database from downloaded sample data
at startup.

Instead of processing the Postgres dump, the following is in the
log:

```
server started
CREATE DATABASE

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/mdsoar.sql
SET
SET
SET
SET
SET
 set_config
------------

(1 row)
```

The existing steps work correctly with Postgres 12.14, so pinning
to that version until a deeper investigation can be performed (or the
problem simply corrects itself in the next version).

https://umd-dit.atlassian.net/browse/LIBDRUM-802
Added "UMD Customization/End UMD Customization" markers to files that
had been modified which did not have them.

Normalized other "customization" markers with
"UMD Customization/End UMD Customization" for consistency. This included
removing comment info about customizations for particular Jira issues,
as that is not particularly sustainable long-term.

Intention behind these markers is to make it easier to identify UMD
modifications when making DSpace upgrades.

https://umd-dit.atlassian.net/browse/LIBDRUM-812
dsteelma-umd and others added 29 commits April 15, 2025 13:55
GitHub Actions runs in UTC, instead of EST/ETD, so parameterized the
timestamp in the expected log entries so the tests won't fail no
matter what timezone the test is run in.

https://umd-dit.atlassian.net/browse/LIBDRUM-962
LIBDRUM-962. Add custom Tomcat Access Log valve to support "logFile" JSON attribute

https://umd-dit.atlassian.net/browse/LIBDRUM-962
LIBDRUM-962. Add custom Tomcat Access Log valve to support "logFile" JSON attribute

https://umd-dit.atlassian.net/browse/LIBDRUM-962
Updated the UMD "dspace/bin/mail" script to use the stock DSpace
mail configuration properties "mail.server" and "mail.server.port",
instead of a hard-coded server address and port.

https://umd-dit.atlassian.net/browse/LIBDRUM-963
Updated the UMD "dspace/bin/mail" script to use the stock DSpace
mail configuration properties "mail.server" and "mail.server.port",
instead of a hard-coded server address and port.

https://umd-dit.atlassian.net/browse/LIBDRUM-963
LIBDRUM-963. Updated "dspace/bin/mail" to use DSpace mail config props

https://umd-dit.atlassian.net/browse/LIBDRUM-963
Set the default Solr version to "dspace-8_x", so that the Solr
version doesn't change unexpectedly when running in the local
development environment.

This change matches the change in the "dspace-8_x" branch for
post-DSpace 8.0 changes.

https://umd-dit.atlassian.net/browse/LIBDRUM-971
Customized "dspace" to enable a "UMD_DSPACE_CLI_LOG_CONFIG" environment
variable to override the Log4J2 configuration used when running the
"dspace" script.

Replaced the Log4j v1 "log4j-etdloader.properties" file with a
Log4j v2 XML file with equivalent functionality.

Modified the "load-etd" script to override the default DSpace Log4J
configuration with the configuration from the "log4j2-etdloader.xml"
file, so that the email that gets sent be the cron job that runs
nightly to load the ETD files will have the proper information.

https://umd-dit.atlassian.net/browse/LIBDRUM-964
It is preferred to use JSON-formatted logs for Kubernetes, as it makes
the logs easier to search/filter in Splunk.

Modified the "script-mail-wrapper" to handle JSON-formatted logs by
extracting only the "message" field of non-DEBUG log messages to send
in the email. For Kubernetes, this preserves the existing functionality
of having non-DEBUG messages in the email sent to the mailing list,
while additional DEBUG-level information is sent to the standard out
and to Splunk.

Note that with these changes, logging in the local development
environment and Kubernetes are different -- the local development
environments uses a text-based log, instead of JSON-formatted, for
simplicity, and does not log at a DEBUG level be default.

The intention is to at least preserve similarity of the emails between
the local development environment and Kubernetes.

https://umd-dit.atlassian.net/browse/LIBDRUM-964
Added "jq" as a dependency to the Docker images, to support using
it to filter JSON in the  "script-mail-wrapper" script used for
ETD nightly cron jobs.

https://umd-dit.atlassian.net/browse/LIBDRUM-964
Added the "jq" utility used by the "script-mail-wrapper" script to
"Dockerfile.dev-additions" and updated the MailHog setup instructions
in "DockerDevelopmentEnvironment.md" to better reflect the current
code in the Dockerfile.

https://umd-dit.atlassian.net/browse/LIBDRUM-964
Removed the "etd2marc-mail" and "etd2marc-transfer" scripts because
based on a May 29, 2025 discussion with Ben Wallberg in the "Dspace"
WebEx channel, this is legacy functionality that is no longer needed.

Also removed the "drum.etdloader.transfermarc" property, which is no
longer needed from the "load-etd-nightly" script, and the
"local.cfg.EXAMPLE".

Removing these scripts at this time because the use of the
"dspace dprop" command in the "load-etd-nightly" Bash script was
failing in Kubernetes because the logs from the console were being
included in the output returned to the "transfermarc" variable,
causing the script to fail.

https://umd-dit.atlassian.net/browse/LIBDRUM-972
Removed the functionality to create MARC and CSV files from the
EtdLoader class and related scripts.

The MARC functionality is definitely legacy, and was removed based on a
May 29, 2025 conversation with Ben Wallberg in the "DSpace" WebEx
channel.

The CSV functionality was removed because it is not clear that is used
used (it is not absolutely certain that this is legacy functionality,
but is definitely suspected to be).

Removed the "etd2marc.xsl" file, because it is presumably no longer
needed.

Removed the command-line arguments related to the MARC and CSV files
from the "load-etd" and "load-etd-nightly" scripts, because they are
no longer needed.

https://umd-dit.atlassian.net/browse/LIBDRUM-972
Deleted the UMD custom 'start-handle-server-fg" script, the script has
been moved to Kubernetes (and renamed to "start-handle-server", where
it override the stock DSpace script).

https://umd-dit.atlassian.net/browse/LIBDRUM-975
Removed the "dspace/src/main/docker-compose/local.cfg" file as its
stock DSpace counterpart was removed in DSpace 7.2, see
DSpace@618aed6

Removed UMD customization in the "docker-compose-cli.yml" file that
referenced the "local.cfg" file, as it is likely inadvertently marked as
a UMD customization.

https://umd-dit.atlassian.net/browse/LIBDRUM-982
Note that there are still “d7” references, typically in comments in
other files, but these are also in the stock DSpace files, so were
left alone to simplify merging in the future.

The files modified in this commit are all UMD-added files.

https://umd-dit.atlassian.net/browse/LIBDRUM-982
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.

4 participants

Comments