Skip to content

Commit 133f016

Browse files
authored
Merge pull request #267 from xdev-software/develop
Release
2 parents 3e523c1 + 49e1e42 commit 133f016

11 files changed

Lines changed: 100 additions & 17 deletions

File tree

.github/workflows/broken-links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
- name: Link Checker
2121
id: lychee
22-
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2
22+
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2
2323
with:
2424
fail: false # Don't fail on broken links, create an issue instead
2525

.github/workflows/check-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145

146146
- name: Upload report
147147
if: always()
148-
uses: actions/upload-artifact@v6
148+
uses: actions/upload-artifact@v7
149149
with:
150150
name: pmd-report
151151
if-no-files-found: ignore
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Report workflow security problems
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ develop ]
7+
paths:
8+
- '.github/workflows/**'
9+
10+
permissions:
11+
issues: write
12+
13+
jobs:
14+
prt:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 15
17+
# Only run this in our repos (Prevent notification spam by forks)
18+
if: ${{ github.repository_owner == 'xdev-software' }}
19+
steps:
20+
- uses: actions/checkout@v6
21+
22+
- name: Check
23+
id: check
24+
run: |
25+
grep -l 'pull_request_target:' --exclude report-gha-workflow-security-problems.yml *.yml > reported.txt && exit 1 || exit 0
26+
working-directory: .github/workflows
27+
28+
- name: Find already existing issue
29+
id: find-issue
30+
if: ${{ !cancelled() }}
31+
run: |
32+
echo "number=$(gh issue list -l 'bug' -l 'automated' -L 1 -S 'in:title "Incorrectly configure GHA workflow (prt)"' -s 'open' --json 'number' --jq '.[].number')" >> $GITHUB_OUTPUT
33+
env:
34+
GH_TOKEN: ${{ github.token }}
35+
36+
- name: Close issue if everything is fine
37+
if: ${{ success() && steps.find-issue.outputs.number != '' }}
38+
run: gh issue close -r 'not planned' ${{ steps.find-issue.outputs.number }}
39+
env:
40+
GH_TOKEN: ${{ github.token }}
41+
42+
- name: Create report
43+
if: ${{ failure() && steps.check.conclusion == 'failure' }}
44+
run: |
45+
echo 'Detected usage of `pull_request_target`. This event is dangerous and MUST NOT BE USED AT ALL COST!' > reported.md
46+
echo '' >> reported.md
47+
echo '/cc @xdev-software/gha-workflow-security' >> reported.md
48+
echo '' >> reported.md
49+
echo '```' >> reported.md
50+
cat .github/workflows/reported.txt >> reported.md
51+
echo '```' >> reported.md
52+
cat reported.md
53+
54+
- name: Create Issue From File
55+
if: ${{ failure() && steps.check.conclusion == 'failure' }}
56+
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6
57+
with:
58+
issue-number: ${{ steps.find-issue.outputs.number }}
59+
title: 'Incorrectly configure GHA workflow (prt)'
60+
content-filepath: ./reported.md
61+
labels: bug, automated

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# 2.0.0
2+
_Major version bump due to default video container format change_
3+
* Pinned recorder container to `selenium/video:ffmpeg-8.0-20260202` because the currently latest version of the container is not shutting down properly
4+
* Changed default video container format to `mkv`
5+
* This format allows to play the videos even when they are incomplete
6+
* Update default Selenium version to `4.41.0`
7+
* Updated dependencies
8+
9+
# 1.5.3
10+
* Improve error message when browser name can't be matched
11+
* Updated dependencies
12+
113
# 1.5.2
214
* Updated dependencies
315

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A re-implementation of [Testcontainer Selenium/WebDriver](https://java.testconta
99
* No VNC Server started in the browser container (unless explicitly stated) → Saves memory
1010
* Uses [Selenium's implementation](https://github.com/SeleniumHQ/docker-selenium/tree/trunk/Video) and isn't [based](https://github.com/testcontainers/vnc-recorder) on [some python code from 2010](https://pypi.org/project/vnc2flv/#history)
1111
* Way more customization options for e.g. ``framerate``, ``codec``, ``preset`` ...
12-
* Uses ``mp4`` as default recording format (wider support in comparison to ``flv``)
12+
* Uses ``mkv`` as default recording format (wider support in comparison to ``flv``)
1313
* [Renders while saving the video](https://github.com/SeleniumHQ/docker-selenium/blob/4c572afd1173b5bd49fa2def3b54ea552fccee85/Video/video.sh#L126) (not when finished which takes additional time)
1414
* Stops the recorder before saving the file so that there is no way that [it runs forever](https://github.com/testcontainers/testcontainers-java/discussions/6229).
1515
* Automatically tries to select a alternative Selenium version for the docker image if it [doesn't exist](https://github.com/SeleniumHQ/docker-selenium/issues/1979).
@@ -25,6 +25,13 @@ Usage is very similar to [Testcontainers default implementation](https://java.te
2525
Make sure to remove the original Testcontainer Webdrivers dependency to avert any mix ups while using the library.
2626
For more information take a look at [our demo](./testcontainers-selenium-demo/src/main/java/software/xdev/Application.java).
2727

28+
### Why are videos recorded as `.mkv` and how can I open them?
29+
30+
In version 2 `.mp4` was replaced with `.mkv` as the default video container format.<br/>
31+
This was done because `.mp4` requires finalization as otherwise the file/container will be consider corrupt. `.mkv` has no such problems.
32+
33+
[Most video players](https://en.wikipedia.org/wiki/Matroska#Support) (including browsers) can play `.mkv` files out of the box.
34+
2835
## Installation
2936
[Installation guide for the latest release](https://github.com/xdev-software/testcontainers-selenium/releases/latest#Installation)
3037

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>software.xdev</groupId>
88
<artifactId>testcontainers-selenium-root</artifactId>
9-
<version>1.5.4-SNAPSHOT</version>
9+
<version>2.0.0-SNAPSHOT</version>
1010
<packaging>pom</packaging>
1111

1212
<organization>
@@ -45,7 +45,7 @@
4545
<dependency>
4646
<groupId>com.puppycrawl.tools</groupId>
4747
<artifactId>checkstyle</artifactId>
48-
<version>13.2.0</version>
48+
<version>13.3.0</version>
4949
</dependency>
5050
</dependencies>
5151
<configuration>
@@ -83,12 +83,12 @@
8383
<dependency>
8484
<groupId>net.sourceforge.pmd</groupId>
8585
<artifactId>pmd-core</artifactId>
86-
<version>7.21.0</version>
86+
<version>7.22.0</version>
8787
</dependency>
8888
<dependency>
8989
<groupId>net.sourceforge.pmd</groupId>
9090
<artifactId>pmd-java</artifactId>
91-
<version>7.21.0</version>
91+
<version>7.22.0</version>
9292
</dependency>
9393
</dependencies>
9494
</plugin>

testcontainers-selenium-demo/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<parent>
88
<groupId>software.xdev</groupId>
99
<artifactId>testcontainers-selenium-root</artifactId>
10-
<version>1.5.4-SNAPSHOT</version>
10+
<version>2.0.0-SNAPSHOT</version>
1111
</parent>
1212

1313
<artifactId>testcontainers-selenium-demo</artifactId>
14-
<version>1.5.4-SNAPSHOT</version>
14+
<version>2.0.0-SNAPSHOT</version>
1515
<packaging>jar</packaging>
1616

1717
<organization>

testcontainers-selenium/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>software.xdev</groupId>
88
<artifactId>testcontainers-selenium</artifactId>
9-
<version>1.5.4-SNAPSHOT</version>
9+
<version>2.0.0-SNAPSHOT</version>
1010
<packaging>jar</packaging>
1111

1212
<name>testcontainers-selenium</name>
@@ -320,7 +320,7 @@
320320
<dependency>
321321
<groupId>com.puppycrawl.tools</groupId>
322322
<artifactId>checkstyle</artifactId>
323-
<version>13.2.0</version>
323+
<version>13.3.0</version>
324324
</dependency>
325325
</dependencies>
326326
<configuration>
@@ -358,12 +358,12 @@
358358
<dependency>
359359
<groupId>net.sourceforge.pmd</groupId>
360360
<artifactId>pmd-core</artifactId>
361-
<version>7.21.0</version>
361+
<version>7.22.0</version>
362362
</dependency>
363363
<dependency>
364364
<groupId>net.sourceforge.pmd</groupId>
365365
<artifactId>pmd-java</artifactId>
366-
<version>7.21.0</version>
366+
<version>7.22.0</version>
367367
</dependency>
368368
</dependencies>
369369
</plugin>

testcontainers-selenium/src/main/java/software/xdev/testcontainers/selenium/containers/browser/SeleniumUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public final class SeleniumUtils
3838
private static final Logger LOG = LoggerFactory.getLogger(SeleniumUtils.class);
3939

4040
// as of 2026-01
41-
public static final String DEFAULT_SELENIUM_VERSION = "4.40.0";
41+
public static final String DEFAULT_SELENIUM_VERSION = "4.41.0";
4242
private static String cachedVersion;
4343

4444
private SeleniumUtils()

testcontainers-selenium/src/main/java/software/xdev/testcontainers/selenium/containers/recorder/SeleniumRecordingContainer.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@
3131
@SuppressWarnings("java:S2160")
3232
public class SeleniumRecordingContainer extends RecordingContainer<SeleniumRecordingContainer>
3333
{
34-
public static final DockerImageName DEFAULT_IMAGE = DockerImageName.parse("selenium/video");
34+
public static final DockerImageName DEFAULT_IMAGE =
35+
// Workaround https://github.com/SeleniumHQ/docker-selenium/issues/3093
36+
// As of 2026-03 the latest version of the container is not shutting down properly
37+
DockerImageName.parse("selenium/video:ffmpeg-8.0-20260202");
3538

3639
// https://github.com/SeleniumHQ/docker-selenium/blob/033f77c02dde9d61d1a4d44be7526ef689244606/Video/Dockerfile#L103-L110
3740
public static final String ENV_DISPLAY_CONTAINER_NAME = "DISPLAY_CONTAINER_NAME";
@@ -47,7 +50,7 @@ public class SeleniumRecordingContainer extends RecordingContainer<SeleniumRecor
4750
protected String displayContainerName;
4851
protected String videoFileName;
4952
protected boolean resolutionConfigured;
50-
protected String fileExtension = "mp4";
53+
protected String fileExtension = "mkv";
5154

5255
public SeleniumRecordingContainer(final BrowserWebDriverContainer<?> target)
5356
{

0 commit comments

Comments
 (0)