Skip to content
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

[backend/frontend] Fix ingestion creation (#4020) #4042

Merged
merged 5 commits into from
Aug 15, 2023
Merged

Conversation

SouadHadjiat
Copy link
Member

@SouadHadjiat SouadHadjiat commented Aug 10, 2023

Proposed changes

  • migrate current_state field to current_state_date with date type (schema definition)
  • fix prepareElementsForIndexing method to better handle objects

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@SouadHadjiat SouadHadjiat linked an issue Aug 10, 2023 that may be closed by this pull request
@SouadHadjiat SouadHadjiat marked this pull request as ready for review August 10, 2023 15:22
@richard-julien richard-julien added the filigran team use to identify PR from the Filigran team label Aug 11, 2023
+ '}'
+ 'ctx._source.remove("current_state")',
params: {
emptyCurrentState: {},
Copy link
Member

Choose a reason for hiding this comment

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

Should not be as string here? '{}'

Copy link
Contributor

Choose a reason for hiding this comment

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

We tested it against problematic stored document and the migration executed flawlessly. What benefit do you see to make it a string?

Copy link
Member Author

Choose a reason for hiding this comment

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

no it's an empty object, not a string


export const up = async (next) => {
const defaultDate = new Date();
defaultDate.setHours(0, 0, 0, 0);
Copy link
Member

Choose a reason for hiding this comment

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

Using now() is not sufficient? Why round on hour?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it is, though we replicated this behavior from the creation process for compliance.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes we used the same default date as the one used in SyncCreation (dayStartDate())

Copy link
Member

@SarahBocognano SarahBocognano left a comment

Choose a reason for hiding this comment

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

Tested : ✅ Everything works fine for the ingestion page.

I have just notice some minor stuff :

  • The banner message is not tranlasted
  • There is no gap between "stream ID" and "running", I think it's not really pretty (even if it was already the case)
  • The button "start" and "stop" does not have the right color

Capture d’écran (1)
Capture d’écran (2)

@richard-julien richard-julien merged commit f3a9907 into master Aug 15, 2023
6 checks passed
@richard-julien richard-julien deleted the issue/4020 branch August 15, 2023 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ingestion page is broken
4 participants