Skip to content

Conversation

himanshusinghs
Copy link
Contributor

@himanshusinghs himanshusinghs commented Aug 2, 2023

This PR updates our method of publishing download center config. Earlier we used to replace the download center config entirely with the to-be released version. With this change, we instead will be taking into account the already published config, if any, and will insert the version info for the to-be released version while keeping the other, earlier released major versions.

Pointing this to main only because it does not block us from releasing main as of now for 1.x.x

Earlier

Existing Config Current Release Version Updated Config
{
	versions: [{
		_id_: '1.2.2'
		version: '1.2.2',
		platform: [{ ... }]
	}],
	...
}
1.2.3
{
	versions: [{
		_id_: '1.2.3'
		version: '1.2.3',
		platform: [{ ... }]
	}],
	...
}
{
	versions: [{
		_id_: '1.2.2'
		version: '1.2.2',
		platform: [{ ... }]
	}],
	...
}
2.0.0
{
	versions: [{
		_id_: '2.0.0'
		version: '2.0.0',
		platform: [{ ... }]
	}],
	...
}

Now

Existing Config Current Release Version Updated Config
{
	versions: [{
		_id_: '1.2.2'
		version: '1.2.2',
		platform: [{ ... }]
	}],
	...
}
1.2.3
{
	versions: [{
		_id_: '1.2.3'
		version: '1.2.3',
		platform: [{ ... }]
	}],
	...
}
{
	versions: [{
		_id_: '1.2.2'
		version: '1.2.2',
		platform: [{ ... }]
	}],
	...
}
2.0.0
{
	versions: [{
		_id_: '1.2.2'
		version: '1.2.2',
		platform: [{ ... }]
	}, {
		_id_: '2.0.0'
		version: '2.0.0',
		platform: [{ ... }]
	}],
	...
}
{
	versions: [{
		_id_: '1.2.2'
		version: '1.2.2',
		platform: [{ ... }]
	}, {
		_id_: '2.0.0'
		version: '2.0.0',
		platform: [{ ... }]
	}],
	...
}
2.1.0
{
	versions: [{
		_id_: '1.2.2'
		version: '1.2.2',
		platform: [{ ... }]
	}, {
		_id_: '2.1.0'
		version: '2.1.0',
		platform: [{ ... }]
	}],
	...
}

…will update an existing config instead of replacing it entirely
@himanshusinghs himanshusinghs marked this pull request as ready for review August 3, 2023 05:47
@himanshusinghs himanshusinghs requested a review from addaleax August 3, 2023 09:10
Copy link
Collaborator

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

Nice work!

@himanshusinghs himanshusinghs merged commit efde03e into main Aug 3, 2023
@himanshusinghs himanshusinghs deleted the MONGOSH-1348-non-replacing-download-center-config-updates branch August 3, 2023 10:40
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.

2 participants