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

[tyr] Loki: enrich ntfs with addresses/admins #4137

Merged
merged 4 commits into from
Oct 18, 2023

Conversation

datanel
Copy link
Member

@datanel datanel commented Oct 16, 2023

https://navitia.atlassian.net/browse/NAV-2217?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-53940

Just before putting the NTFS to S3 for Loki, it is enriched with addresses and administrative regions calling bragi.
For that an intermediate folder ntfs_with_addreses is created

@datanel datanel force-pushed the loki/enrich-ntfs-with-admins branch from 8a81968 to 1fa854a Compare October 16, 2023 15:10
@datanel datanel force-pushed the loki/enrich-ntfs-with-admins branch from 1fa854a to 8a33041 Compare October 17, 2023 09:13
"--input",
filename,
"--output",
filename,
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure if this is a good idea to replace the input ntfs with the enriched one.
Maybe write to a different location ?

Copy link
Member Author

Choose a reason for hiding this comment

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

it works and it should not be a problem imho.
if there is a problem, filename should not be atered by the output.
if the job succeed, the ntfs is just replaced.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok I see, the ntfs is sent to fusio2ed after, we should keep the original; ok

Copy link
Contributor

@pbench pbench Oct 17, 2023

Choose a reason for hiding this comment

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

Yeah I don't know exactly what happen with the ntfs (nor when), but I know that some things can happen (sent to fusio2ed, moved to a backup directory, ... ?).
So better be safe than sorry :)

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed in the last commit.
How can I increase the code coverage ? Sonar is warning

@datanel datanel requested a review from pbench October 18, 2023 07:35
res = launch_exec("enrich-ntfs-with-addresses", params, logger)
if res != 0:
raise ValueError("enrich-ntfs-with-addresses failed")
dataset.state = "done"
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure when we should set the dataset.state to done ?

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

7.4% 7.4% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@datanel datanel merged commit c0c3076 into dev Oct 18, 2023
@datanel datanel deleted the loki/enrich-ntfs-with-admins branch October 18, 2023 09:46
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.

3 participants