Compare commits

2 Commits

Author SHA1 Message Date
Nikola Jokic
89ff7d1155 Release 0.3.1 (#71)
* Update releaseNotes.md

* updated package.json and package lock
2023-03-20 15:26:23 +01:00
Tingluo Huang
6dbb0b61b7 Ensure response consist no matter having ports or not. (#70)
* Ensure responseconsist no matter having ports or not.

* Update packages/k8s/src/hooks/prepare-job.ts

Co-authored-by: Nikola Jokic <jokicnikola07@gmail.com>

---------

Co-authored-by: Nikola Jokic <jokicnikola07@gmail.com>
2023-03-20 10:11:19 +01:00
4 changed files with 11 additions and 18 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "hooks",
"version": "0.3.0",
"version": "0.3.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "hooks",
"version": "0.3.0",
"version": "0.3.1",
"license": "MIT",
"devDependencies": {
"@types/jest": "^27.5.1",

View File

@@ -1,6 +1,6 @@
{
"name": "hooks",
"version": "0.3.0",
"version": "0.3.1",
"description": "Three projects are included - k8s: a kubernetes hook implementation that spins up pods dynamically to run a job - docker: A hook implementation of the runner's docker implementation - A hook lib, which contains shared typescript definitions and utilities that the other packages consume",
"main": "",
"directories": {

View File

@@ -125,12 +125,11 @@ function generateResponseFile(
)
if (serviceContainers?.length) {
response.context['services'] = serviceContainers.map(c => {
if (!c.ports?.length) {
return { image: c.image }
}
const ctxPorts: ContextPorts = {}
for (const port of c.ports) {
ctxPorts[port.containerPort] = port.hostPort
if (c.ports?.length) {
for (const port of c.ports) {
ctxPorts[port.containerPort] = port.hostPort
}
}
return {

View File

@@ -1,12 +1,6 @@
## Features
- Use service container entrypoint if no entrypoint is specified [#53]
<!-- ## Features -->
## Bugs
- Fixed issue caused by promise rejection in kubernetes hook [#65]
- Fixed service container name issue when service image contains one or more `/`
in the name [#53]
- Fixed issue related to service container failures when no ports are specified
[#60]
- Allow equal signs in environment variable values [#62]
<!-- ## Misc
- Ensure the response file contains ports object for service containers in k8s [#70]
<!-- ## Misc -->