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

feat: Place project_id before environments in initial meltano.yml #6756

Merged
merged 1 commit into from Sep 14, 2022

Conversation

WillDaSilva
Copy link
Member

The only functional change is the addition of project_id: 00000000-0000-0000-0000-000000000000 to src/meltano/core/bundle/initialize.yml. The rest is just style/formatting changes I made while trying other approaches to solving this.

src/meltano/core/bundle/initialize.yml is only used during meltano init, and meltano init replaces the project_id with a randomly generated UUID. The reason I have a default one there is because ProjectFiles.update calls ProjectFiles._split_config_dict, which in turn calls ProjectFiles._restore_file_key_order, which re-orders keys based on how they were initially. The initial order comes from initialize.yml

I had originally tried re-ordering the CommentedMap produced by Canonical.as_canonical based on a default order in MeltanoFile, but that order was being undone by ProjectFiles._restore_file_key_order, hence the current approach.

Closes #6734

@netlify
Copy link

netlify bot commented Sep 14, 2022

Deploy Preview for meltano canceled.

Name Link
🔨 Latest commit 0ac33c1
🔍 Latest deploy log https://app.netlify.com/sites/meltano/deploys/632219f136df9d0008a88a4f

@codecov
Copy link

codecov bot commented Sep 14, 2022

Codecov Report

Merging #6756 (0ac33c1) into main (fa573a4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #6756   +/-   ##
=======================================
  Coverage   88.56%   88.56%           
=======================================
  Files         280      280           
  Lines       20226    20222    -4     
  Branches     2002     2000    -2     
=======================================
- Hits        17913    17910    -3     
  Misses       1976     1976           
+ Partials      337      336    -1     
Impacted Files Coverage Δ
src/meltano/core/discovery_file.py 100.00% <100.00%> (ø)
src/meltano/core/project.py 91.19% <100.00%> (ø)
src/meltano/core/setting_definition.py 89.13% <100.00%> (ø)
src/meltano/core/settings_store.py 94.56% <100.00%> (-0.05%) ⬇️
src/meltano/core/plugin_discovery_service.py 88.88% <0.00%> (+0.58%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@WillDaSilva WillDaSilva merged commit 39e3af1 into main Sep 14, 2022
@WillDaSilva WillDaSilva deleted the project-id-init-meltano-yml branch September 14, 2022 21:24
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.

feat: enforce consistent default structure of meltano.yml
3 participants