Skip to content

Commit ec2b7d0

Browse files
committed
Merge remote-tracking branch 'upstream/main' into feat/postgres
2 parents 9b50ce1 + 2993322 commit ec2b7d0

15 files changed

Lines changed: 267 additions & 139 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,11 @@ jobs:
380380
token: ${{ secrets.GITHUB_TOKEN }}
381381

382382
- name: Update Baseline Coverage
383-
uses: ncipollo/release-action@v1.11.1
383+
uses: ncipollo/release-action@v1.12.0
384384
if: ${{ github.event.inputs.updateCoverage == 'true' && github.event.inputs.dryrun == 'false' }}
385385
with:
386386
allowUpdates: true
387+
makeLatest: true
387388
tag: baseline
388389
omitBodyDuringUpdate: true
389390
omitNameDuringUpdate: true
@@ -417,7 +418,7 @@ jobs:
417418
name: Deploy to Sandbox
418419
if: ${{ always() && github.event.inputs.sandbox == 'true' }}
419420
needs: [prepare, release]
420-
runs-on: dev-server
421+
runs-on: [self-hosted, dev-server]
421422
env:
422423
PKG_VERSION: ${{needs.prepare.outputs.pkg_version}}
423424

.github/workflows/dev-assets-sync-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
sync:
5050
name: Run assets rsync
5151
if: ${{ always() }}
52-
runs-on: dev-server
52+
runs-on: [self-hosted, dev-server]
5353
needs: [build]
5454
steps:
5555
- name: Run rsync

dev/deploy-to-container/cli.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,19 @@ async function main () {
155155
} else {
156156
console.info('Existing assets docker volume found.')
157157
}
158+
159+
// Get shared test docker volume
160+
console.info('Querying shared test docker volume...')
161+
try {
162+
const testVolume = await dock.getVolume(`dt-test-${branch}`)
163+
console.info('Attempting to delete any existing shared test docker volume...')
164+
await testVolume.remove({ force: true })
165+
} catch (err) {}
166+
console.info('Creating new shared test docker volume...')
167+
await dock.createVolume({
168+
Name: `dt-test-${branch}`
169+
})
170+
console.info('Created shared test docker volume successfully.')
158171

159172
// Create DB container
160173
console.info(`Creating DB docker container... [dt-db-${branch}]`)
@@ -211,7 +224,8 @@ async function main () {
211224
],
212225
HostConfig: {
213226
Binds: [
214-
'dt-assets:/assets'
227+
'dt-assets:/assets',
228+
`dt-test-${branch}:/test`
215229
],
216230
Init: true,
217231
NetworkMode: 'shared',
@@ -243,7 +257,8 @@ async function main () {
243257
},
244258
HostConfig: {
245259
Binds: [
246-
'dt-assets:/assets'
260+
'dt-assets:/assets',
261+
`dt-test-${branch}:/test`
247262
],
248263
NetworkMode: 'shared',
249264
RestartPolicy: {

dev/deploy-to-container/settings_local.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
CELERY_BROKER_URL = '__MQCONNSTR__'
2222

2323
IDSUBMIT_IDNITS_BINARY = "/usr/local/bin/idnits"
24-
IDSUBMIT_REPOSITORY_PATH = "test/id/"
25-
IDSUBMIT_STAGING_PATH = "test/staging/"
26-
INTERNET_DRAFT_ARCHIVE_DIR = "test/archive/"
27-
INTERNET_ALL_DRAFTS_ARCHIVE_DIR = "test/archive/"
28-
RFC_PATH = "test/rfc/"
24+
IDSUBMIT_REPOSITORY_PATH = "/test/id/"
25+
IDSUBMIT_STAGING_PATH = "/test/staging/"
26+
INTERNET_DRAFT_ARCHIVE_DIR = "/test/archive/"
27+
INTERNET_ALL_DRAFTS_ARCHIVE_DIR = "/test/archive/"
28+
RFC_PATH = "/test/rfc/"
2929

3030
AGENDA_PATH = '/assets/www6s/proceedings/'
3131
MEETINGHOST_LOGO_PATH = AGENDA_PATH
@@ -67,6 +67,6 @@
6767
INTERNET_ALL_DRAFTS_ARCHIVE_DIR = '/assets/ietf-ftp/internet-drafts/'
6868

6969
NOMCOM_PUBLIC_KEYS_DIR = 'data/nomcom_keys/public_keys/'
70-
SLIDE_STAGING_PATH = 'test/staging/'
70+
SLIDE_STAGING_PATH = '/test/staging/'
7171

7272
DE_GFM_BINARY = '/usr/local/bin/de-gfm'

dev/deploy-to-container/start.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
#!/bin/bash
22

3+
echo "Creating /test directories..."
4+
for sub in \
5+
/test/id \
6+
/test/staging \
7+
/test/archive \
8+
/test/rfc \
9+
/test/media \
10+
/test/wiki/ietf \
11+
; do
12+
if [ ! -d "$sub" ]; then
13+
echo "Creating dir $sub"
14+
mkdir -p "$sub";
15+
fi
16+
done
317
echo "Fixing permissions..."
418
chmod -R 777 ./
519
echo "Ensure all requirements.txt packages are installed..."

ietf/ipr/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def edit(request, id, updates=None):
296296
ipr = get_object_or_404(IprDisclosureBase, id=id).get_child()
297297
type = class_to_type[ipr.__class__.__name__]
298298

299-
DraftFormset = inlineformset_factory(IprDisclosureBase, IprDocRel, form=DraftForm, can_delete=True, extra=1)
299+
DraftFormset = inlineformset_factory(IprDisclosureBase, IprDocRel, form=DraftForm, can_delete=True, extra=0)
300300

301301
if request.method == 'POST':
302302
form = ipr_form_mapping[ipr.__class__.__name__](request.POST,instance=ipr)
@@ -316,7 +316,7 @@ def edit(request, id, updates=None):
316316
else:
317317
valid_formsets = True
318318

319-
if form.is_valid() and valid_formsets:
319+
if form.is_valid() and valid_formsets:
320320
updates = form.cleaned_data.get('updates')
321321
disclosure = form.save(commit=False)
322322
disclosure.save()

0 commit comments

Comments
 (0)