-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(contributions) : ajout d'un titre par défaut si pas du titre ou si c'est un 1er publication #1477
Merged
Merged
fix(contributions) : ajout d'un titre par défaut si pas du titre ou si c'est un 1er publication #1477
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6a7c41f
fix(contributions) : ajout d'un titre par défaut si pas du titre ou s…
carolineBda 00a7e89
fix fix !
carolineBda ee856c6
refacto tests
carolineBda 2b0dcf8
fix
carolineBda 1f19f2f
try to remove migration to see if it deploys
carolineBda bdb4f4f
put back migrations
carolineBda 625f29c
Merge branch 'master' into linked-contribution-title
carolineBda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 0 additions & 118 deletions
118
...rt-elasticsearch/src/ingester/contributions/__tests__/filterContributionToPublish.test.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,19 +40,21 @@ export class ExportService { | |
environment, | ||
Status.running | ||
); | ||
const envName = | ||
environment === Environment.preproduction | ||
? "Préproduction" | ||
: "Production"; | ||
try { | ||
if (!process.env.DISABLE_INGESTER) { | ||
const startMessage = `**${envName}:** mise à jour lancée par *${exportEs.user?.name}* 🚀`; | ||
await sendMattermostMessage( | ||
startMessage, | ||
process.env.MATTERMOST_CHANNEL_EXPORT | ||
); | ||
logger.info(startMessage); | ||
if (environment === Environment.preproduction) { | ||
await sendMattermostMessage( | ||
`**Préproduction:** mise à jour lancée par *${exportEs.user?.name}* 😎`, | ||
process.env.MATTERMOST_CHANNEL_EXPORT | ||
); | ||
await runWorkerIngesterPreproduction(); | ||
} else { | ||
await sendMattermostMessage( | ||
`**Production:** mise à jour lancée par *${exportEs.user?.name}* 🚀`, | ||
process.env.MATTERMOST_CHANNEL_EXPORT | ||
); | ||
await runWorkerIngesterProduction(); | ||
} | ||
} | ||
|
@@ -66,27 +68,22 @@ export class ExportService { | |
await this.copyContainerService.runCopy(environment); | ||
} | ||
const exportEsDone = await this.exportRepository.getOne(id); | ||
if (environment === Environment.preproduction) { | ||
await sendMattermostMessage( | ||
`**Préproduction:** mise à jour terminée (${exportEsDone.documentsCount?.total} documents) 😁`, | ||
process.env.MATTERMOST_CHANNEL_EXPORT | ||
); | ||
} else { | ||
await sendMattermostMessage( | ||
`**Production:** mise à jour terminée (${exportEsDone.documentsCount?.total} documents) 🎉`, | ||
process.env.MATTERMOST_CHANNEL_EXPORT | ||
); | ||
} | ||
|
||
const message = `**${envName}:** mise à jour terminée (${exportEsDone.documentsCount?.total} documents) 🎉`; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. j'ai reformatté les messages pour les avoir aussi dans les logs pour aider au debug |
||
logger.info(message); | ||
await sendMattermostMessage( | ||
message, | ||
process.env.MATTERMOST_CHANNEL_EXPORT | ||
); | ||
|
||
return await this.exportRepository.updateOne( | ||
id, | ||
Status.completed, | ||
new Date() | ||
); | ||
} catch (e: any) { | ||
await sendMattermostMessage( | ||
environment === Environment.preproduction | ||
? " La mise à jour de la préproduction a échouée. 😢" | ||
: "La mise à jour de la production a échouée. 😭", | ||
`⚠️ **${envName}:** La mise à jour a échouée. ⚠️`, | ||
process.env.MATTERMOST_CHANNEL_EXPORT | ||
); | ||
return await this.exportRepository.updateOne( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,5 +26,6 @@ module.exports = { | |
}, | ||
}, | ||
}, | ||
spacing: jest.fn() | ||
}, | ||
}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
j'ai juste rajouté
DISABLE_COPY=true